-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomerssdk:pythonPython SDK relatedPython SDK related
Description
Summary
The Agent.run() method is one of the most important methods in the Python SDK but lacks a docstring explaining its purpose, parameters, and behavior.
Current State
- File:
sdk/python/agentfield/agent.py - Method:
Agent.run() - Documentation: Missing docstring
What to Document
- Purpose: Explain that this method starts the agent and registers it with the control plane
- Parameters: Document any parameters the method accepts
- Return value: What does the method return (if anything)
- Blocking behavior: Note that this method blocks until the agent is stopped
- Network setup: Mention automatic port binding and callback URL resolution
- Example usage: Include a simple code example
Docstring Format
Use NumPy docstring style (consistent with existing SDK documentation):
def run(self, ...):
"""
Start the agent and register with the AgentField control plane.
This method starts the agent's HTTP server, registers with the control
plane, and begins processing incoming execution requests. The method
blocks until the agent is stopped.
Parameters
----------
param_name : type
Description of parameter.
Returns
-------
None
Examples
--------
>>> agent = Agent(node_id="my-agent")
>>> agent.run() # Blocks until stopped
"""Acceptance Criteria
-
Agent.run()has a complete docstring - Docstring follows NumPy style
- Includes at least one usage example
- Documentation renders correctly in IDE tooltips
Files
sdk/python/agentfield/agent.py
Using AI to solve this issue? Read our AI-Assisted Contributions guide for testing requirements, prompt strategies, and common pitfalls to avoid.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomerssdk:pythonPython SDK relatedPython SDK related