weather_agent.py
Run Your Agent
How It Works
- The agent sends your message and tool definitions to the model.
- The model decides which tools to call (if any).
- Tools execute and results are returned to the model.
- The model produces a final text response.
max_iterations is reached.
Development vs Production
Useagent.run() for production. It returns a typed RunOutput with content, messages, metrics, and status.
Next Steps
| Task | Guide |
|---|---|
| Configure retries, limits, and compression | Configuration |
| Run agents sync, async, and streaming | Running agents |
| Add reasoning before responses | Thinking |
| Add persistent memory | Memory |
| Ground agents in documents | Knowledge |
| Define custom tools | Tools |
| Deploy to messaging platforms | Interfaces |
| Coordinate multiple agents | Teams |