Agentor makes it easy to build AI agents with tool access, model flexibility, and production-ready features. This guide covers everything from basic agent creation to advanced patterns.
Quick Start
Create your first agent in just a few lines:
Core Concepts
Agent Configuration
Every agent has three key components:
- name: Identifies your agent
- model: The LLM to use (supports any LiteLLM model)
- instructions: System prompt that defines agent behavior
Model Selection
A bare name goes to OpenAI. A provider/model-name string is routed through LiteLLM:
To reach a provider directly over its OpenAI-compatible endpoint, set base_url. The model string is then passed through as that provider spells it:
See Model providers for endpoints and the routing rules.
Model Settings
Customize model behavior with ModelSettings:
Running Agents
Synchronous Execution
For simple, blocking execution:
Async Execution
For better performance and concurrent operations:
Batch Processing
Process multiple prompts concurrently:
Conversation Context
Maintain conversation history with message format:
Agent from Markdown
Create agents from markdown files with frontmatter:
Load the agent:
Advanced Features
Fallback Models
Automatically retry with fallback models on rate limits or errors:
Structured Outputs
Get typed responses with Pydantic models:
Open-ended map fields such as dict[str, int] are rejected when the agent is built — strict structured output cannot describe them. See Structured output for the workarounds.
Durable Runs
Give the agent a store and every step is written to disk, so another process can finish an interrupted run:
See Durable runs for stores, limits, and the resume semantics.
Agent Skills
Skills are folders of instructions and scripts that agents load dynamically:
Skill folder structure:
Thinking Mode
Get the agent’s reasoning process:
Best Practices
Next Steps
Last modified on July 30, 2026