Subagents

Creor ships with built-in agents for common workflows. You can customize these or create entirely new agents with their own models, permissions, prompts, and behavior.

Built-in Agents

Creor comes with several agents out of the box:

AgentModeDescription
buildprimaryThe default agent. Full tool access based on your permission config. Used for writing code, running commands, and making changes.
planprimaryRead-only planning mode. Can read files and write plans to .creor/plans/*.md but denies all other file edits.
generalsubagentGeneral-purpose subagent for research and multi-step tasks. Used by the primary agent to parallelize work.
exploresubagentRead-only codebase exploration. Can search files, read code, and use LSP tools but cannot make any changes.

Internal agents like title, summary, and compaction are hidden from the UI and handle background tasks automatically.

Agent Config

Each agent is configured with the following fields:

FieldTypeDescription
modelstringModel in provider/model format (e.g., "anthropic/claude-sonnet-4-20250514")
variantstringDefault model variant for this agent
temperaturenumberSampling temperature (0-2)
top_pnumberNucleus sampling parameter
promptstringSystem prompt appended to the agent's instructions
descriptionstringWhen to use this agent (shown in autocomplete)
mode"primary" | "subagent" | "all"How this agent can be invoked
hiddenbooleanHide from the @ autocomplete menu (subagents only)
colorstringHex color (#FF5733) or theme name (primary, accent, etc.)
stepsnumberMax agentic iterations before forcing text-only response
permissionobjectTool permission overrides for this agent
disablebooleanRemove a built-in agent entirely
optionsobjectAdditional options (e.g., preferSmallModel)

Agent Modes

The mode field controls how an agent can be used:

ModeBehavior
primaryCan be selected as the active agent from the agent picker. Used directly for conversations. The build and plan agents are primary by default.
subagentInvoked by primary agents via @mention. Cannot be set as the main conversation agent. Good for specialized tasks delegated by the primary agent.
allAvailable both as a primary agent and as a subagent. Custom agents default to this mode.

Note

The default_agent config field controls which primary agent is selected on startup. It defaults to build. You cannot set a subagent as the default.

Creating Agents in JSON

Define agents in the agent section of your creor.json:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"agent": {
"review": {
"description": "Code reviewer — reads code and provides feedback, never edits",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"temperature": 0.3,
"prompt": "You are a senior code reviewer. Analyze code for bugs, performance issues, security concerns, and style. Never modify files — only read and report.",
"permission": {
"edit": "deny",
"bash": "deny",
"read": "allow",
"glob": "allow",
"grep": "allow"
}
}
}
}

You can also override built-in agents. For example, to change the default model for the build agent:

1
2
3
4
5
6
7
8
{
"agent": {
"build": {
"model": "openai/gpt-4.1",
"temperature": 0.1
}
}
}

Creating Agents in Markdown

For agents with longer system prompts, use markdown files in the .creor/agents/ directory. The filename becomes the agent name, and the markdown body becomes the prompt.

File Structure

1
2
3
4
.creor/
agents/
review.md
security-audit.md

Example: review.md

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
description: Code reviewer that reads code and provides feedback
mode: subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.3
permission:
edit: deny
bash: deny
read: allow
glob: allow
grep: allow
---
 
You are a senior code reviewer working on a production codebase.
 
## Review Guidelines
 
1. **Correctness**: Check for logic errors, off-by-one mistakes, null pointer risks
2. **Performance**: Flag O(n^2) patterns, unnecessary allocations, missing indexes
3. **Security**: Look for injection risks, hardcoded secrets, improper auth checks
4. **Readability**: Suggest clearer names, simpler control flow, better abstractions
 
## Output Format
 
For each issue found, report:
- **File**: path/to/file.ts:line
- **Severity**: critical | warning | suggestion
- **Issue**: one-line description
- **Fix**: recommended change
 
Never modify files. Only read and report findings.

Tip

Markdown agents are great for long, detailed prompts. The frontmatter supports the same fields as JSON agent config. The markdown body is used as the prompt field.

Invoking Agents

@Mention Syntax

In the chat input, type @agent-name to invoke a subagent. For example:

@review Check the authentication module for security issues

The primary agent (build) will delegate the task to the review subagent, which runs with its own model, prompt, and permissions.

Agent Picker

Primary agents can be selected from the agent picker in the UI. Click the agent name in the chat header or use the configured keybind to switch between primary agents.

Auto-Routing

When auto_route is enabled in your config, Creor uses LLM intent classification to automatically route messages to the most appropriate agent. A question about code structure might be routed to the explore agent, while a request to build a feature goes to the build agent.

Permissions

Each agent has its own permission set that controls which tools it can use. Permissions are merged from multiple sources:

  • Built-in defaults (e.g., all agents allow read by default, deny .env files)
  • Global permission config from your creor.json
  • Agent-specific permission overrides

The permission values are:

ValueBehavior
allowTool executes without asking for confirmation
askCreor shows a permission prompt before executing
denyTool call is blocked entirely

For file-based tools (read, edit, external_directory), you can use glob patterns to set per-path permissions:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"permission": {
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"edit": {
"*": "allow",
"src/generated/**": "deny"
}
}
}

Examples

Security Audit Agent

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"agent": {
"security": {
"description": "Security auditor — scans for vulnerabilities and compliance issues",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "You are a security auditor. Scan code for OWASP Top 10 vulnerabilities, hardcoded secrets, and insecure patterns. Report findings with severity ratings.",
"permission": {
"edit": "deny",
"bash": "deny",
"read": "allow",
"grep": "allow",
"glob": "allow",
"websearch": "allow"
}
}
}
}

Documentation Writer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"agent": {
"docs": {
"description": "Documentation writer — generates and updates docs",
"mode": "subagent",
"temperature": 0.5,
"prompt": "You are a technical writer. Generate clear, concise documentation. Use JSDoc for code comments and Markdown for standalone docs. Match the existing documentation style in the project.",
"permission": {
"bash": "deny",
"read": "allow",
"edit": {
"*": "deny",
"docs/**": "allow",
"**/*.md": "allow",
"README.md": "allow"
}
}
}
}
}

Disabling a Built-in Agent

To remove a built-in agent, set disable: true:

1
2
3
4
5
6
7
{
"agent": {
"explore": {
"disable": true
}
}
}