-
-
Notifications
You must be signed in to change notification settings - Fork 100
Agents
Joe Curlee (w4ffl35) edited this page Nov 29, 2025
·
1 revision
The agents component provides tools for creating, configuring, and managing custom AI agents with specialized capabilities.
Custom agents allow users to create specialized AI assistants with:
- Custom System Prompts - Define agent behavior and personality
- Tool Sets - Select which tools the agent can use
- Templates - Pre-configured agents for common tasks
- Persistence - Agents stored in database for reuse
Pre-configured templates for common use cases:
| Template | Description | Tools |
|---|---|---|
coding |
Software development assistant | File operations, code execution |
research |
Information gathering and analysis | Web search, document search |
creative |
Content creation and storytelling | Text generation |
calendar |
Scheduling and event management | Calendar tools |
custom |
User-defined configuration | User-selected |
The LLM can create agents using the create_agent tool:
User: "Create a coding assistant that helps with Python"
AI: [calls create_agent(
name="python_helper",
system_prompt="You are an expert Python developer...",
tools=["read_file", "write_file", "run_command"],
template="coding"
)]
from airunner.components.agents.tools import AGENT_TOOLS
create_tool = AGENT_TOOLS[0] # CreateAgentTool
result = create_tool._run(
name="code_helper",
system_prompt="You are an expert Python developer",
tools=["read_file", "write_file", "run_command"],
template="coding"
)Create a new custom agent.
Parameters:
-
name(str): Unique agent identifier -
system_prompt(str): Custom system prompt -
description(str, optional): Agent description -
tools(list[str], optional): List of tool names -
template(str, default="custom"): Template to use
Modify existing agent configuration.
Parameters:
-
agent_id(int): ID of agent to modify -
name(str, optional): New name -
description(str, optional): New description -
system_prompt(str, optional): New system prompt -
tools(list[str], optional): New tool list
List all available agents with filtering.
Parameters:
-
template(str, optional): Filter by template type -
include_disabled(bool): Include disabled agents
Remove an agent from the system.
Parameters:
-
agent_id(int): ID of agent to delete
User: "Switch to my research agent"
AI: [calls switch_agent(name="research_agent")]
Each agent maintains its own conversation context:
# Agent-specific conversation
agent.chat("Help me write a Python script")
# Switch context
agent_manager.switch_to("research_agent")Agents are persisted in the SQLite database:
CREATE TABLE agents (
id INTEGER PRIMARY KEY,
name VARCHAR(255) UNIQUE,
description TEXT,
system_prompt TEXT,
template VARCHAR(50),
tools JSON,
enabled BOOLEAN DEFAULT TRUE,
created_at DATETIME,
updated_at DATETIME
);- Mode-Based Architecture - Intelligent routing
- Tools - Available tools for agents
- Architecture - System design