Agent Configuration Schema Reference
Complete reference for all agent configuration fields based on Agno Agent schema.
Reference: Agno Agent Documentation
Schema Overview
Agent configurations are dictionaries that map to Agno Agent parameters. All fields are optional unless specified, and follow Agno's default behavior when omitted.
Core Agent Fields
| Field |
Type |
Required |
Default |
Description |
name |
str |
No |
Auto-generated |
Agent name (usually set during creation) |
id |
str |
No |
Auto-generated |
Agent ID |
description |
str |
No |
None |
Agent description |
instructions |
List[str] |
Yes |
[] |
Agent instructions (system prompt) |
Model Settings
| Field |
Type |
Required |
Default |
Description |
model |
Model |
Yes |
Set during creation |
Model instance (usually passed separately) |
Memory Fields
Agentic Memory
| Field |
Type |
Required |
Default |
Description |
enable_agentic_memory |
bool |
No |
False |
Enable agentic memory (can create/update/delete) |
memory_manager |
MemoryManager |
No |
None |
Memory manager instance (usually passed separately) |
User Memories
| Field |
Type |
Required |
Default |
Description |
enable_user_memories |
bool |
No |
False |
Enable user memories (can create/update only) |
add_memories_to_context |
bool |
No |
False |
Add memories to context |
Reference: Agno Memory Documentation
Storage & Sessions Fields
Chat History
| Field |
Type |
Required |
Default |
Description |
add_history_to_context |
bool |
No |
False |
Add chat history to context |
num_history_runs |
int |
No |
0 |
Number of history runs to include (0-100 recommended) |
read_chat_history |
bool |
No |
False |
Read chat history |
Session Management
| Field |
Type |
Required |
Default |
Description |
session_id |
str |
No |
None |
Session ID (usually set at runtime) |
cache_session |
bool |
No |
False |
Cache session state |
search_session_history |
bool |
No |
False |
Search across sessions |
num_history_sessions |
int |
No |
0 |
Number of sessions to search (0-100 recommended) |
enable_session_summaries |
bool |
No |
False |
Generate session summaries |
add_session_summary_to_context |
bool |
No |
False |
Add session summary to context |
Agent State
| Field |
Type |
Required |
Default |
Description |
enable_agentic_state |
bool |
No |
False |
Enable agentic state management |
add_session_state_to_context |
bool |
No |
False |
Add session state to context |
session_state |
Dict |
No |
None |
Session state (usually set at runtime) |
Reference: Agno Storage Documentation
Knowledge (Agentic RAG) Fields
| Field |
Type |
Required |
Default |
Description |
knowledge |
Knowledge |
No |
None |
Knowledge instance (usually passed separately) |
search_knowledge |
bool |
No |
False |
Enable knowledge search at runtime |
knowledge_filters |
List |
No |
None |
Knowledge filters |
enable_agentic_knowledge_filters |
bool |
No |
False |
Let agent decide when to filter |
add_knowledge_to_context |
bool |
No |
False |
Add knowledge to context |
references_format |
str |
No |
"json" |
Format for references ("json", "markdown", etc.) |
Reference: Agno Knowledge Documentation
| Field |
Type |
Required |
Default |
Description |
tools |
List[Tool] |
No |
[] |
List of tool instances |
tool_call_limit |
int |
No |
None |
Maximum tool calls per run |
tool_choice |
str |
No |
"auto" |
Tool choice strategy: "auto", "required", "none" |
tool_hooks |
List[Callable] |
No |
None |
Tool execution hooks |
Reference: Agno Tools Documentation
Reasoning Fields
| Field |
Type |
Required |
Default |
Description |
reasoning |
bool |
No |
False |
Enable reasoning mode |
reasoning_model |
Model |
No |
None |
Model for reasoning (if different from main model) |
reasoning_agent |
Agent |
No |
None |
Reasoning agent instance |
reasoning_min_steps |
int |
No |
1 |
Minimum reasoning steps (1-100 recommended) |
reasoning_max_steps |
int |
No |
10 |
Maximum reasoning steps (1-100 recommended) |
Reference: Agno Reasoning Documentation
Dependencies Fields
| Field |
Type |
Required |
Default |
Description |
dependencies |
List[Agent] |
No |
None |
List of agent dependencies |
add_dependencies_to_context |
bool |
No |
False |
Add dependencies to context |
Reference: Agno Dependencies Documentation
Context Engineering Fields
| Field |
Type |
Required |
Default |
Description |
build_context |
bool |
No |
True |
Enable context building |
resolve_in_context |
bool |
No |
True |
Resolve variables in context |
add_name_to_context |
bool |
No |
False |
Add agent name to context |
add_datetime_to_context |
bool |
No |
False |
Add current datetime to context |
add_location_to_context |
bool |
No |
False |
Add location to context |
timezone_identifier |
str |
No |
None |
Timezone for datetime context (e.g., "America/New_York") |
additional_context |
str |
No |
None |
Additional context to include |
Reference: Agno Context Engineering Documentation
Hooks & Guardrails Fields
| Field |
Type |
Required |
Default |
Description |
pre_hooks |
List[Callable] |
No |
None |
Functions to run before agent execution |
post_hooks |
List[Callable] |
No |
None |
Functions to run after agent execution |
guardrails |
List[Callable] |
No |
None |
Functions to validate/constrain agent behavior |
Reference:
- Agno Pre-hooks & Post-hooks Documentation
- Agno Guardrails Documentation
| Field |
Type |
Required |
Default |
Description |
output_schema |
Type[BaseModel] |
No |
None |
Pydantic BaseModel for structured output |
input_schema |
Type[BaseModel] |
No |
None |
Pydantic BaseModel for structured input |
use_json_mode |
bool |
No |
False |
Use JSON mode for structured output |
markdown |
bool |
No |
False |
Enable markdown formatting |
parse_response |
bool |
No |
True |
Parse response |
Pre-defined Output Schemas
Located in: dto/output/
EarlyExitDecision
Output schema for early exit decision analysis. Used with early_exit_agent_config.
Fields:
- action: Literal["HARD_EXIT", "SOFT_EXIT", "KEEP_GOING"] (Required)
- HARD_EXIT: Must exit the conversation
- SOFT_EXIT: Caller decides whether to exit
- KEEP_GOING: Continue the conversation
- reason: str (Required)
- Brief explanation of why exit is or isn't needed
- Common values: "EMPTY_INPUT", "HAS_ENDING_PHRASE", "GREETING_MSG", "NO_EXIT", etc.
Usage:
from bast_ai_agno.dto.agent_configs import early_exit_agent_config, EarlyExitDecision
agent = factory.create_openai_chat_agent(
name="early_exit_agent",
model=model,
db=storage,
config_raw=early_exit_agent_config # Includes output_schema
)
response = agent.run(input="Thank you!")
decision: EarlyExitDecision = response.content
Advanced Fields
Retries & Error Handling
| Field |
Type |
Required |
Default |
Description |
retries |
int |
No |
0 |
Number of retries on failure |
delay_between_retries |
float |
No |
1.0 |
Delay between retries (seconds) |
exponential_backoff |
bool |
No |
False |
Use exponential backoff for retries |
Streaming
| Field |
Type |
Required |
Default |
Description |
stream |
bool |
No |
None |
Enable streaming (defaults to model setting) |
stream_intermediate_steps |
bool |
No |
False |
Stream intermediate reasoning steps |
| Field |
Type |
Required |
Default |
Description |
send_media_to_model |
bool |
No |
True |
Send media to model |
store_media |
bool |
No |
True |
Store media in database |
Debugging & Telemetry
| Field |
Type |
Required |
Default |
Description |
debug_mode |
bool |
No |
False |
Enable debug mode |
debug_level |
int |
No |
1 |
Debug level (1-5) |
telemetry |
bool |
No |
True |
Enable telemetry |
Team & Workflow
| Field |
Type |
Required |
Default |
Description |
role |
str |
No |
None |
Agent role in team/workflow |
team_id |
str |
No |
None |
Team ID |
workflow_id |
str |
No |
None |
Workflow ID |
Field Dependencies
Required Dependencies
add_datetime_to_context=True requires build_context=True
add_dependencies_to_context=True requires dependencies to be set
add_session_summary_to_context=True requires enable_session_summaries=True
- Reasoning fields require
reasoning=True to be effective
Recommended Combinations
- Memory: Enable both
enable_agentic_memory and enable_user_memories for full memory capabilities
- Sessions: Use
cache_session=True with search_session_history=True for effective session management
- Knowledge: Set
search_knowledge=True when providing a knowledge instance
- Context: Enable
build_context=True when using context engineering features
Validation Rules
Value Ranges
num_history_runs: 0-100 (recommended)
num_history_sessions: 0-100 (recommended)
reasoning_min_steps: 0-100 (recommended)
reasoning_max_steps: 1-100 (recommended, must be >= min_steps)
retries: 0-10 (recommended)
debug_level: 1-5
Logical Constraints
reasoning_max_steps >= reasoning_min_steps
num_history_runs >= 0
num_history_sessions >= 0
- If
reasoning=True, reasoning_min_steps and reasoning_max_steps should be set
Common Patterns
Pattern 1: Basic Agent
{
"instructions": ["You are a helpful assistant."],
"enable_agentic_memory": False,
"enable_user_memories": False,
"add_history_to_context": True,
"num_history_runs": 3
}
Pattern 2: RAG Agent
{
"instructions": ["Search knowledge base before answering."],
"search_knowledge": True,
"enable_agentic_memory": True,
"enable_user_memories": True,
"add_memories_to_context": True
}
Pattern 3: Conversational Agent
{
"instructions": ["Maintain conversation context."],
"enable_agentic_memory": True,
"enable_user_memories": True,
"add_history_to_context": True,
"num_history_runs": 10,
"cache_session": True,
"search_session_history": True
}
Pattern 4: Reasoning Agent
{
"instructions": ["Think through problems carefully."],
"reasoning": True,
"reasoning_min_steps": 2,
"reasoning_max_steps": 15,
"enable_agentic_memory": True
}
Additional Resources