Agent
The core class for AI agents with tools, memory, knowledge, and handoffs.Param Cluster Map
Note:
base_url and api_key remain separate (connection/auth constraint).
Precedence Ladder
Instance > Config > Array > Dict > String > Bool > Default
Quick Start
Parameters Table
Core Identity
LLM Configuration
Tools & Capabilities
Deprecated Standalone Params
These still work for backward compatibility but emitDeprecationWarning. Use the consolidated config objects instead.
Consolidated Feature Params
Each follows:False=disabled, True=defaults, Config=custom
Precedence Ladder
Resolution Order: Instance > Config > Array > Dict > String > Bool > DefaultWhen you pass a consolidated param, the resolver checks in this order:
- Instance - Already a config object? Use as-is
- Config - Dataclass instance? Use as-is
- Array -
["preset", {"override": value}]? Apply overrides - Dict -
{"key": value}? Convert to config - String -
"preset_name"or URL? Look up preset or parse URL - Bool -
True? Use defaults.False? Disable - Default -
None? Use default value
Usage Forms Table
Examples for Each Form
Presets & Options
Output Presets
Aliases:
"text", "actions" → "status" | "plain", "minimal" → "silent" | "normal" → "verbose"
Execution Presets
Memory Presets
Web Presets
Reflection Presets
Guardrail Presets
Methods
Execution Methods
Async Execution Methods
Other Methods
Class Methods
Common Recipes
Simple Agent with Instructions
Agent with Tools
Agent with Handoffs
Agent with Knowledge Base
Agent with Streaming
Choose the right method based on your use case:Streaming Precedence:
start(stream=True/False) overrides OutputConfig.stream.output="stream"setsstream=Trueby defaultstart(stream=False)can disable streaming even withoutput="stream"start(stream=True)enables streaming for any preset
Agent with Custom LLM
Agent with Consolidated Config
Async Support
The Agent class provides full async support:Multi-Agent Safe
Agents are designed to be multi-agent safe. Each agent maintains its own:- Chat history
- Memory instance
- Knowledge base
- Session state
See Also
- Agents Module - Multi-agent orchestration
- Handoff Module - Agent-to-agent handoffs
- Tools Module - Tool system
- Memory Module - Memory management
- Knowledge Module - Knowledge bases

