Quick Start
Create your first Subagent in 3 steps:- Open the agents interface: Run
/agentsin TUI - Create a Subagent: Press
Tabto switch to User or Project tab, select “Create new agent…” - Try it: Enter a description, and Qoder CLI auto-generates the configuration
Key Benefits
| Benefit | Description |
|---|---|
| Context Isolation | Each Subagent runs in an independent context, preventing pollution of the main conversation and keeping it focused on high-level objectives |
| Specialized Expertise | Can be configured with detailed instructions for specific domains, improving task success rates |
| Reusability | Can be used across projects and shared with teams for consistent workflows |
| Flexible Permissions | Each Subagent can have different tool access levels |
Built-in Subagents
Run/agents in TUI, press Tab to switch to the BuiltIn tab.
Tip: The User tab shows personal Subagent configurations, the Project tab shows project configurations.Built-in Subagents and their descriptions:
| Name | Description |
|---|---|
code-reviewer | Performs local code review tasks |
design-agent | Creates software designs and generates design documents based on user requirements |
general-purpose | Executes various general tasks, suitable for diverse scenarios |
task-executor | Develops software based on design documents |
Using Subagents
Subagents can be invoked through natural language in both TUI and Headless modes.Explicit Invocation
Specify a subagent by name in your request:Implicit Invocation
Describe your task and let Qoder CLI select the appropriate Subagent:Chained Invocation
Describe the execution order to orchestrate multiple Subagents:
Tip: In Headless mode, use --max-turns to limit Subagent execution turns.
Creating Subagents
Qoder CLI provides two ways to create Subagents: AI-assisted generation (Recommended) and manual configuration.Method 1: AI-Assisted Generation (Recommended)
The simplest way to create a subagent. Just describe your needs in natural language and Qoder CLI generates the complete configuration. Steps:- Run
/agentsin TUI to open the agents panel - Press
Tabto switch to User or Project tab - Select “Create new agent…” and press
Enter - Enter the Subagent description and press
Enterto confirm
Method 2: Manual Configuration (Advanced)
For complete control over Subagent configuration, manually create a Markdown configuration file.Storage Locations and Priority
| Location | Path | Priority | Use Case |
|---|---|---|---|
| Project | ${project}/.qoder/agents/<agentName>.md | High | Only affects current project, prompts are project-specific, typically committed to version control |
| Personal | ~/.qoder/agents/<agentName>.md | Low | Affects all projects on the system, prompts are general-purpose |
Configuration Field Reference
| Field | Required | Description | Example |
|---|---|---|---|
name | Yes | Unique identifier for the Subagent, use lowercase letters and hyphens | api-reviewer |
description | Yes | Natural language description of the Subagent’s purpose. The model selects Subagents based on this content | Review API designs for RESTful compliance |
tools | No | Comma-separated list of tool names. When omitted, inherits all tools from the main Agent. Default is * meaning all tools | Read,Grep,Glob |
Tool Configuration
Configure which tools a subagent can use by specifying tool names in the tools field.Tools include any built-in tools and MCP tools.- Names are separated by commas
- Default is
*meaning all tools configured for the main Agent - MCP tools are supported and automatically inherited by Subagents
Testing Task Execution
Test with this example prompt:Best Practices
- Start with AI-Generated Agents: Generate initial subagents with AI, then iterate to match your specific needs
- Design Focused Subagents: Create subagents with single, clear responsibilities rather than trying to do everything
- Write Detailed Prompts: Include specific instructions, examples, and constraints in system prompts
- Limit Tool Access: Only grant tools necessary for the Subagent’s purpose. This improves security and helps the Subagent focus on relevant operations
- Version Control: Check project-level Subagents into version control so your team can benefit from and improve them collaboratively
FAQ
What’s the difference between a Subagent and the main Agent?
Subagents have independent context windows that don’t pollute the main conversation. Each Subagent can have different tool permissions and system prompts, making them focus on specific task types.How do I view all available Subagents?
Run the/agents command in TUI to view all available Subagents (including built-in, user-level, and project-level).