PyAgentic Documentation
Build sophisticated AI agents with declarative Python syntax. PyAgentic provides a type-safe, extensible framework for creating LLM agents with persistent context, powerful tools, and seamless integration with multiple LLM providers including OpenAI, Anthropic, and others.
Quick Start
New to PyAgentic? Start here to build your first agent in minutes:
-
Complete tutorial building a research assistant agent from scratch. Learn core concepts through practical examples.
Core Documentation
Dive deeper into PyAgentic's powerful features:
-
Give agents capabilities with the @tool decorator, parameter validation, and dynamic constraints.
-
Persistent, type-safe state fields with Pydantic models, computed fields, and access control.
-
Structure agent workflows with finite state machines, phase-based tool filtering, and conditional transitions.
-
React to state changes with validation, history tracking, persistence, and custom behaviors.
-
Understanding structured response objects with tool execution details and type safety.
-
Three ways to run agents: simple calls, run(), and step() for streaming responses.
-
Using Pydantic models to enforce structured output schemas for your agents.
-
Build complex multi-agent workflows where agents call other agents as specialized tools.
-
Create agent hierarchies and add cross-cutting capabilities with extensions.
-
:material-search: Observability
Observe and trace all steps and interactions of an agent.
- GitHub: rmikulec/pyagentic - Source code, issues, and contributions
- Installation:
pip install pyagentic-core - Python Support: 3.13+