Overview
Agentor agents are built on top of theAgent class from the agents library, providing a high-level abstraction for creating production-ready AI agents with tools, skills, and external integrations.
Agent Class
The coreAgentor class (src/agentor/core/agent.py:138) provides the primary interface for building agents:
Constructor Parameters
Agent name used in logs, traces, and A2A protocol agent cards
System prompt defining agent behavior and personality
Model identifier. Supports any LiteLLM provider format:
"gpt-5-mini"- OpenAI models"gemini/gemini-2.5-pro"- Google models"anthropic/claude-3.5"- Anthropic models
Tools available to the agent. Can be:
- String names from the tool registry (e.g.,
"get_weather") - FunctionTool instances decorated with
@function_tool - BaseTool subclasses with
@capabilitymethods - MCP server connections
Pydantic model for structured output validation
Model configuration including temperature, top_p, max_tokens
Enable Celesto AI tracing and observability
API key for the LLM provider
Creating Agents from Markdown
Agents can be defined in markdown files with YAML frontmatter (src/agentor/core/agent.py:236):Agent Lifecycle
Synchronous Execution
Therun() method (src/agentor/core/agent.py:367) provides synchronous execution:
Asynchronous Execution
Thearun() method (src/agentor/core/agent.py:370) supports async execution with batch processing:
Fallback Models
Handle rate limits gracefully with fallback models (src/agentor/core/agent.py:415):Streaming Responses
Stream agent responses in real-time (src/agentor/core/agent.py:487):stream_chat() method (src/agentor/core/agent.py:498) returns an async iterator of AgentOutput objects:
Model Configuration
Configure model behavior withModelSettings (src/agentor/core/agent.py:211):
Multi-Agent Systems
Agentor supports hierarchical multi-agent orchestration. The framework includes specialized agents:- Concept Research Agent - Topic research and information gathering
- Coder Agent - Code-related operations
- Google Agent - Workspace integration
- Main Triage Agent - Request routing and delegation
src/agentor/agenthub/main.py for the orchestration implementation.
Agent Context
Agents receive aRunContextWrapper with configuration (src/agentor/tools/registry.py:33):
Tracing and Observability
Enable automatic tracing with Celesto AI (src/agentor/core/agent.py:119):https://celesto.ai/observe.
To disable auto-tracing: