External Agents
Load agent definitions from external directories and integrate with agents created for other AI coding tools like Claude Code and Codex.
Cross-tool compatibility
Autohand can load agent definitions from directories you choose, including directories used by other AI coding assistants. This is opt-in: Autohand reads no other tool’s directory until you list it in your config. Once enabled, you can:
- Point at an existing library: Add a Claude Code or shared team directory to
externalAgents.paths - Share across tools: Keep one directory of definitions that several tools read
- Migrate gradually: Keep using your existing agent library while you test it in Autohand
Agent files written for other tools are not guaranteed to parse cleanly as Autohand agents. After you enable a directory, run /agents definitions to confirm which definitions loaded and check each one before you rely on it.
Agent discovery
By default, Autohand loads agent definitions from these locations only:
| Location | Source |
|---|---|
~/.autohand/agents/ |
Autohand native (user-wide) |
| Built-in agents | Shipped with the CLI |
Inline JSON passed with --agents |
Current session only |
Autohand does not scan ~/.claude/agents/, ~/.codex/agents/, ~/.gemini/agents/ or a project’s .autohand/agents/ directory on its own. To load any of them, add the directory to externalAgents.paths and set externalAgents.enabled to true. Autohand reads external files in place each time it loads agents; it does not copy them into ~/.autohand/agents/.
Configuring external paths
Add agent directories to your user config, ~/.autohand/config.json (or the config.toml, config.yaml or config.yml equivalent):
{
"externalAgents": {
"enabled": true,
"paths": [
"~/.claude/agents",
".autohand/agents",
"~/my-company/shared-agents"
]
}
}
Settings:
| Key | Description | Default |
|---|---|---|
enabled |
Must be true for any path to load. Any other value, or leaving it out, disables external agents. |
Off |
paths |
Array of directories to search for .md, .markdown and .json agent files. ~ expands to your home directory; relative paths resolve from the directory where Autohand runs. |
None |
Definitions in ~/.autohand/agents/ load first, so a same-named user agent wins over an external one. Missing external directories are skipped without an error.
Agent file format
Agent definitions are Markdown files with optional frontmatter, or JSON files. The agent’s name is the file name without its extension, so code-reviewer.md becomes code-reviewer:
---
description: Review code for bugs, security issues, and best practices
tools: read_file, find_grep, git_diff
---
# Code Review Agent
You are an expert code reviewer. When reviewing code:
1. Check for bugs and logic errors
2. Identify security vulnerabilities
3. Suggest performance improvements
4. Ensure code follows project conventions
Be specific in your feedback and provide examples of how to fix issues.
Frontmatter fields
With hosted Autohand AI orchestration on, an agent definition’s model: is ignored. Orchestration is on by default; see Model and reasoning per sub-agent before choosing an override.
| Field | Required | Description |
|---|---|---|
description |
No | Brief description shown in listings. Falls back to the first line of the body. |
tools |
No | Comma-separated list of permitted Autohand tools. If omitted, the agent is unrestricted. |
model |
No | Override the default model for this agent |
reasoning |
No | Reasoning setting for this agent |
skills |
No | Comma-separated list of skills to give the agent |
Other frontmatter keys, including name, are ignored. Files written for other tools may name tools Autohand does not have, such as Claude Code’s Read or Grep, so review the tools line of any definition you load from another tool’s directory.
Model and reasoning per sub-agent
A definition can request a model with model: and a reasoning depth with reasoning:. Accepted reasoning values are none, low, medium, high and xhigh.
---
description: Review architecture and explain the tradeoffs
tools: read_file, find_grep, git_diff
reasoning: high
---
Review the relevant files and report your findings without editing them.
Hosted orchestration: Autohand AI orchestration is on by default. Its workers use Fantail, with Moa checkpoint reviews on eligible paid plans. To use definition-level model and reasoning selection in a hosted team, first run /agents orchestration off.
Without orchestration: if no higher-priority override or model: field applies, execution agents default to Fantail. A definition asking for reasoning other than none defaults to Moa at that depth, as in the example above. On Free, sub-agents stay on Fantail: a reasoning request doesn’t switch them to Moa, and a definition can’t unlock a model outside your plan.
To request a particular model instead, add model: fantail or another supported ID. An explicit model uses the provider’s configured reasoning setting rather than the automatic reasoning-based selection above.
An explicit member override, SUB_AGENTS_MODEL/SUB_AGENTS_PROVIDER, a saved per-agent override or a team default takes precedence over the definition. With your own provider or a local server, choose an ID that provider can run; reasoning support depends on the model.
Using external agents
List and use agents with slash commands:
# List configured agent definitions (including external)
/agents definitions
# Create a new agent from a description
/agents new
Agents can also be invoked by name in a prompt:
# Delegate a task to an agent
"Use the code-reviewer agent to review the changes in this PR"
# The same request in command mode
autohand -p "Use the code-reviewer agent to review src/auth/login.ts"
Agent delegation
Autohand can delegate tasks to specialized agents:
delegate_task: Send a task to a specific agentdelegate_parallel: Run up to 5 agents in parallel
# Single agent delegation
"Delegate the security review to the security-auditor agent"
# Parallel execution
"Run the code-reviewer, test-writer, and docs-updater agents in parallel on this PR"
Syncing agents
Autohand does not copy or cache external agents. Each time it loads agents, it reads the files in every configured path directly, so edits to an external file show up the next time agents load, for example in a new session or when you run /agents definitions.
To share agents with a team, keep the directory in version control and point each person’s externalAgents.paths at their checkout.
Best practices
- Use descriptive names:
typescript-refactoreroveragent1 - Limit tool access: Only allow tools the agent needs
- Be specific: Narrow agents perform better than general ones
- Version your agents: Keep agents in version control for your team
- Test before sharing: Verify agents work as expected
Troubleshooting
Agent not found
If an external agent isn’t loading:
- Check that
externalAgents.enabledistruein~/.autohand/config.json. Without it, Autohand ignores every external path. - Verify the directory is listed in
externalAgents.paths. Autohand does not read~/.claude/agents/,~/.codex/agents/or~/.gemini/agents/unless you add them. - If the path is relative, start Autohand from the directory it is relative to, or use an absolute or
~path - Check the file ends in
.md,.markdownor.jsonand sits directly in the listed directory (subdirectories are not scanned) - Check the file is readable, then run
/agents definitionsto see what loaded
Wrong agent loads
If an external agent shows the wrong content, look for a file with the same name in ~/.autohand/agents/. User definitions load first and win over external ones with the same name. Rename one of them.