Built to build on
Most agent frameworks are over-engineered. Thousands of lines, dozens of abstractions, patterns on patterns.
pureagents gives you all the features without the complexity. Fork it, modify it, make it yours.
- Every feature is optional and modular
- One parameter = one feature
- No magic, no hidden behaviour
from pure_agents import Agent, tool
@tool
def search(query: str) -> str:
"""Search the web."""
return f"Results for {query}..."
agent = Agent(tools=[search])
result = await agent.run("Find the weather in Madrid")
Everything you need
All the features for production. Each one optional and modular.
Tools
@tool decorator. Type hints become JSON schemas automatically.
Providers
Mistral, OpenAI, Anthropic. Switch with one parameter.
Streaming
Real-time responses, token by token.
Memory
Persist conversations. Built-in or bring your own.
Structured outputs
Get typed responses with dataclasses.
Hooks
Monitor tool calls, results, and reasoning.
Batch
Run multiple prompts in parallel.
Chaining
Run agents in sequence. Output feeds into the next.
Routing
Direct prompts to specialised agents.
Planning
Create a plan before executing.
Graph
Multi-agent workflows with conditional routing.
Reliability
Retry with backoff, timeouts, context limits.
Usage tracking
Token counts and cost estimates.
Many features ≠ complicated
We believe powerful software can be simple. Every feature in pureagents is optional, modular, and adds exactly one parameter to the API.
Read the entire codebase in 30 minutes. Understand how everything works. Then make it your own.
Read
Understand the entire codebase in 30 minutes
Copy
Fork and modify, don't depend on upstream
Build
Base for your own implementation, not a black box
Start building
Get up and running in minutes. Read the docs, explore the examples.