Core Concepts
What are Agents?
Agents are autonomous units that execute tasks using LLMs, tools, and instructions. Each agent:- Runs with a specific language model (GPT-4, Claude, Gemini, etc.)
- Has access to tools (builtin commands, MCP integrations, or other agents)
- Follows instructions defined in Markdown
- Maintains message history and conversation state
- Can call other agents as tools for complex workflows
Agent Types
Interactive Agents
Interactive Agents
Interactive agents work directly with users in real-time conversations. The main interactive agent is the Copilot, which:
- Responds to user messages in the UI
- Has access to workspace operations (file management, code execution)
- Can load specialized skills on-demand
- Executes MCP tools directly on behalf of users
apps/x/packages/core/src/application/assistant/agent.ts:14Background Agents
Background Agents
Background agents run autonomously on schedules without user interaction. They:
- Execute on cron schedules, time windows, or once at specific times
- Run unattended workflows (email digests, data sync, monitoring)
- Are configured in
~/.rowboat/config/agent-schedule.json - Stored as Markdown files in
agents/directory
Multi-Agent Workflows
Multi-Agent Workflows
Agents can orchestrate other agents by declaring them as tools:This enables:
- Task delegation to specialized agents
- Complex multi-step workflows
- Reusable agent components
- Data flow through tool calls and responses
Agent Definition Format
Agents are defined as Markdown files with YAML frontmatter:Frontmatter Fields
| Field | Required | Description |
|---|---|---|
model | No | Model ID (e.g., gpt-5.1, claude-sonnet-4-5) |
provider | No | Provider alias from models.json |
tools | No | Object mapping tool keys to tool definitions |
Instructions (Body)
The Markdown content after the frontmatter contains the agent’s system instructions. Use standard Markdown formatting to structure guidance, examples, and behavioral rules.Tool Types
Builtin Tools
Builtin Tools
Internal Rowboat capabilities:Common builtin tools:
executeCommand- Run shell commandsworkspace-readFile,workspace-writeFile- File operationsworkspace-readdir,workspace-mkdir- Directory operationsanalyzeAgent- Inspect agent structurelistMcpServers,listMcpTools,executeMcpTool- MCP integrationloadSkill- Load skill definitions
apps/x/packages/core/src/application/lib/builtin-tools.ts:183MCP Tools
MCP Tools
External capabilities from Model Context Protocol servers:Required fields:
type: Must be “mcp”name: Exact tool name from MCP serverdescription: What the tool doesmcpServerName: Server name fromconfig/mcp.jsoninputSchema: Full JSON Schema for parameters
listMcpTools to discover available tools and their schemas.Agent Tools
Agent Tools
Reference other agents to build workflows:The target agent file must exist (e.g.,
agents/summarizer_agent.md). When called, the agent receives the input message and returns its final response as tool output.Agent State Management
The agent runtime maintains state throughout execution:AgentState tracks messages, tool calls, permissions, and subflow states.Location:
apps/x/packages/core/src/agents/runtime.ts:484State Properties
messages- Full conversation historyagent- Loaded agent definitiontoolCallIdMap- Maps tool call IDs to tool call detailspendingToolCalls- Tool calls awaiting executionpendingToolPermissionRequests- Commands awaiting approvalpendingAskHumanRequests- Questions awaiting user responsesubflowStates- State for agent-tool executionssessionAllowedCommands- Commands approved for session
Execution Flow
- Load agent - Parse Markdown file and extract configuration
- Build tools - Map tool definitions to executable functions
- Create provider - Initialize LLM provider and model
- Run loop - Execute agent logic:
- Execute pending tool calls
- Check for pending permissions or ask-human requests
- Dequeue user messages
- Run LLM turn with current message history
- Process tool calls from LLM response
- Repeat until completion
apps/x/packages/core/src/agents/runtime.ts:672
Skill System
Skills provide specialized guidance for specific tasks. Agents can load skills on-demand to access domain-specific instructions.apps/x/packages/core/src/application/assistant/skills/index.ts:1
See Skills for details.
Security
Command Filtering
Commands executed viaexecuteCommand are filtered through ~/.rowboat/config/security.json:
apps/x/packages/core/src/application/lib/command-executor.ts:15
Permission Requests
Certain operations require user approval:- Tool permissions - Approval for executing potentially dangerous commands
- Ask human - Explicit user input during execution
- Session scope - Approve command for entire session
apps/x/packages/core/src/agents/runtime.ts:627
Next Steps
Runtime Architecture
Explore the agent runtime implementation
Background Agents
Learn about scheduled agent execution
Skills
Discover available skills and how to use them