Agent-coreΒΆ A clean Python runtime for multi-provider LLM apps and agent workflows. Getting Started Installation Guide Requirements Basic Installation Provider Extras Development Installation Verifying Installation Troubleshooting Next Steps Quick Start Guide Basic Usage Async Usage Streaming Structured Outputs Tool Calling Sessions (Multi-turn Conversations) Configuration Options Error Handling Next Steps Configuration Agent Configuration Model Aliases Provider Configuration Retry Configuration Tool Loop Configuration Middleware Configuration Router Configuration Configuration Best Practices Configuration Reference Next Steps Core Concepts Providers Supported Providers OpenAI Anthropic Google Gemini DeepSeek Custom Endpoints Provider Capabilities Provider-Agnostic Code Cost Optimization Next Steps Tool System Basic Usage Tool Configuration Type Annotations Async Tools Tool Results Error Handling Manual Tool Registration Tool Registry Best Practices Next Steps Structured Outputs Basic Usage Complex Schemas Field Descriptions Validation Native vs Prompt-Based JSON Schema Directly With Sessions Async Support Error Handling Repair Attempts Best Practices Next Steps Streaming Basic Streaming Stream Events StreamResponse Streaming with Tools Session Streaming Router Streaming Web Streaming (FastAPI) WebSocket Streaming Progress Indicators Error Handling Configuration Best Practices Next Steps Sessions Basic Usage Session Configuration Session Methods History Management Session Forking Serialization Session Stores Sessions with Tools Best Practices Next Steps Middleware Basic Usage Middleware Hooks Built-in Middleware Chaining Middleware Custom Middleware Examples Middleware Chain Best Practices Next Steps Routing & Fallback Basic Usage Routing Strategies Async Support Streaming with Routing Structured Output with Routing Error Handling Configuration Use Cases Monitoring Best Practices Next Steps Advanced Custom Providers Provider Interface Converting Requests Converting Responses Converting Stream Events Error Handling Registering Your Provider OpenAI-Compatible Providers Testing Your Provider Complete Example Next Steps Error Handling Error Hierarchy Basic Error Handling Error Types Retry Strategies Error Handling Patterns Async Error Handling Streaming Error Handling Best Practices Next Steps Type System Type Organization Importing Types Message Types Response Types Tool Types Stream Types Configuration Types Router Types Type Validation Serialization Type Hints Next Steps API Reference Agent Agent get_api_key() get_base_url() resolve_model() estimate_cost() AgentConfig Usage AgentResponse ContentPart Message AgentRequest Providers Base Provider Provider Registry OpenAI Anthropic Gemini DeepSeek Tools tool() Tool ToolSpec ToolCall ToolResult ToolRegistry Schema schema_to_prompt() extract_json() repair_json() ToolLoopConfig ToolLoop ExecutionRuntime Middleware Middleware LoggingMiddleware MetricsMiddleware RedactionMiddleware RetryPolicyMiddleware MiddlewareChain Sessions Session Stores Router AgentRouter Streaming StreamEvent StreamResponse AsyncStreamResponse Errors AgentError AuthenticationError ProviderError RateLimitError RequestTimeoutError TimeoutError ToolExecutionError SchemaValidationError UnsupportedFeatureError RoutingError Types ContentPart Message AgentRequest Usage AgentResponse ToolSpec ToolCall ToolResult StreamEvent AgentConfig ProviderCapabilities RetryConfig ToolLoopConfig RoutingStrategy RouteResult Config Messages Response Router Stream Tools