agentfield icon indicating copy to clipboard operation
agentfield copied to clipboard

[Python SDK] Create custom exception classes

Open santoshkumarradha opened this issue 11 months ago • 7 comments

Summary

The Python SDK currently uses generic exceptions like RuntimeError and Exception. Creating domain-specific exception classes will improve error handling and debugging.

Current State

  • Location: sdk/python/agentfield/
  • Issue: Generic exceptions throughout the codebase
  • Current: Only RateLimitError exists as a custom exception

Proposed Exception Classes

Create the following exception hierarchy:

class AgentFieldError(Exception):
    """Base exception for all AgentField SDK errors."""
    pass

class AgentFieldClientError(AgentFieldError):
    """Error communicating with the AgentField control plane."""
    pass

class ExecutionTimeoutError(AgentFieldError):
    """Execution timed out waiting for completion."""
    pass

class MemoryAccessError(AgentFieldError):
    """Error accessing agent memory storage."""
    pass

class RegistrationError(AgentFieldError):
    """Error registering agent with control plane."""
    pass

class ValidationError(AgentFieldError):
    """Input validation error."""
    pass

Tasks

  1. Create sdk/python/agentfield/exceptions.py with exception classes
  2. Export exceptions from sdk/python/agentfield/__init__.py
  3. Update docstrings with raised exceptions information

Acceptance Criteria

  • [ ] Exception classes created in exceptions.py
  • [ ] Exceptions exported in package __init__.py
  • [ ] Each exception class has a clear docstring
  • [ ] Tests pass (pytest)
  • [ ] Linting passes (ruff check)

Files

  • sdk/python/agentfield/exceptions.py (new)
  • sdk/python/agentfield/__init__.py (update exports)

Using AI to solve this issue? Read our AI-Assisted Contributions guide for testing requirements, prompt strategies, and common pitfalls to avoid.

santoshkumarradha avatar Dec 23 '25 16:12 santoshkumarradha

Hey! I've finished with my first issue. May I continue with this one?

1khazipov avatar Feb 24 '26 13:02 1khazipov

Thanks for picking this up, @1khazipov! :tada:

Here's what to expect:

  • We'll check in after 7 days if we haven't heard an update
  • After 14 days, we'll send a second reminder
  • After 21 days without activity, we'll unassign to let others contribute

Tips for success:

  • Drop a comment when you start working on it
  • Share any blockers - we're here to help!
  • Link your PR with Fixes #111 in the description

Happy coding! :rocket:

github-actions[bot] avatar Feb 24 '26 18:02 github-actions[bot]

Hey @1khazipov! :wave:

Just a friendly reminder that you're assigned to this issue. It's been about a week since assignment.

How's it going? We'd love to hear:

  • Any progress updates?
  • Running into any blockers we can help with?
  • Need more time? (Totally fine!)

A quick comment helps us know you're still interested. If your plans have changed, no worries at all - just let us know and we can find another contributor.

Thanks for contributing to AgentField! :rocket:

github-actions[bot] avatar Mar 04 '26 09:03 github-actions[bot]

Hi @1khazipov,

Just checking in again! It's been 14 days since we last heard from you on this issue.

Quick options:

  • :speech_balloon: Drop a comment with a progress update
  • :link: Link a draft PR if you've started working on it
  • :wave: Let us know if you'd like to be unassigned (no judgment!)

If we don't hear back in 7 days, we'll unassign this issue to give other contributors a chance to help.

Thanks for understanding!

github-actions[bot] avatar Mar 11 '26 09:03 github-actions[bot]

Hi @1khazipov,

It's been 21 days since the last update on this issue. To keep the project moving, we've unassigned this issue so other contributors can pick it up.

No worries at all! Life happens, and we totally understand. If you'd like to continue working on this, just comment here and we'll reassign it to you.

This issue is now available for anyone who'd like to contribute. Check out our contribution guidelines if you're interested!

Thanks for your interest in AgentField! :heart:

github-actions[bot] avatar Mar 18 '26 09:03 github-actions[bot]

Hey, I'm new to open contribution can I give it a try on this issue ?

Baradwaz-122 avatar Apr 21 '26 06:04 Baradwaz-122

Thanks for picking this up, @Baradwaz-122! :tada:

Here's what to expect:

  • We'll check in after 7 days if we haven't heard an update
  • After 14 days, we'll send a second reminder
  • After 21 days without activity, we'll unassign to let others contribute

Tips for success:

  • Drop a comment when you start working on it
  • Share any blockers - we're here to help!
  • Link your PR with Fixes #111 in the description

Happy coding! :rocket:

github-actions[bot] avatar Apr 21 '26 13:04 github-actions[bot]