pi-llm-agent¶
General-purpose agent framework with tool execution and event streaming.
Built on pi-llm, pi-llm-agent provides a stateful Agent class that manages the multi-turn loop of prompting an LLM, executing tool calls, and repeating until the task is done.
Key Concepts¶
- Agent Lifecycle — The Agent class, state, and lifecycle methods
- Agent Loop — The low-level multi-turn execution engine
- Events — The 10 agent event types
- Tools — Creating tools with
AgentTool - Hooks —
before_tool_callandafter_tool_call - Steering & Follow-up — Interrupt and extend agent runs
- Cancellation — Cooperative cancellation
How-to Guides¶
API Reference¶
See the auto-generated API Reference for complete documentation of all public types and functions.