For Python devs
Pythonic on the surface. Rust where it counts.
Type-checked, async-first, pip install-able. The runtime is compiled Rust under
a PyO3 wheel — no GIL contention in the hot path.
Install
pip install agentmatic
# Prebuilt wheels for CPython 3.10–3.13 on Linux/macOS/Windows × x64/arm64. Five-line agent
from agentmatic import Agent, OpenAI, tool
@tool
def calculator(expression: str) -> str:
"""Evaluate a math expression."""
return str(eval(expression))
agent = Agent.build("math-helper", llm=OpenAI(), tools=[calculator])
print(agent.invoke("What is 42 * 17?")) What's different from pure-Python frameworks
- GIL doesn't matter in the hot path. The Pregel scheduler is Rust; tool calls re-enter Python only at the boundary.
- Cold start ≈ 80 ms on the prebuilt wheel. No lazy-import-the-world tax.
- Async-first. Every method has
ainvoke / astreamvariants. Tokio runtime under the hood, asyncio bridge. - Type-hinted end-to-end.
StateGraph[YourState]is generic; mypy + pyright catch invalid edges.
What we ship for Python specifically
- Pydantic v2 model support for state types.
- FastAPI adapter — mount any agent at a route.
- Jupyter rendering — graphs visualize inline; checkpoint timeline as a widget.
uvloopauto-detection for max throughput.
Ship your next agent in minutes, not weeks.
MIT licensed. Drop-in for LangGraph. Native SDKs in 5 languages. Battle-tested resilience primitives in the box.