What's Changed
New Feature: Sub-Agents
Define named sub-agents in your capabilities.yaml — each with a filtered MCP endpoint that exposes only its declared tools, plus provider-native agent definition files for Claude Code and Cursor.
subagents:
- id: infra-agent
description: AWS CDK and Terraform specialist. Use when working in backend-infra/ or user-infra/.
skills:
- my-iac-skill
tools:
- search_cdk_docs
- validate_cfn
instructions: |
Work exclusively in backend-infra/ and user-infra/.
- id: api-agent
description: Python Lambda specialist. Use for Lambda function work.
skills:
- my-serverless-skill
tools:
- get_lambda_guidance
- sam_logsHow it works
- Filtered MCP endpoint at
/{projectId}/agents/{id}/mcp— exposes only the tools declared intools. Unauthorizedtools/callrequests are rejected with a clear error. - Claude Code (
claude-codeprovider): writes.claude/agents/{id}.mdwithname/description/model: inheritfrontmatter + upserts a context block inCLAUDE.md. Registerscapa-{id}in.mcp.jsonpointing at the filtered endpoint. - Cursor (
cursorprovider): writes.cursor/agents/{id}.mdwithname/description/model/readonly/is_backgroundfrontmatter. Cursor auto-delegates based on thedescriptionfield — no separate MCP entry per sub-agent is needed. - Cleanup: sub-agents removed from the config are automatically unregistered on the next
capa install.capa cleanremoves all sub-agent registrations and agent files.
subagents fields
| Field | Required | Description |
|---|---|---|
id |
Yes | Unique identifier. Used as the MCP key (capa-{id}) and agent file name. |
description |
No | Role description. For Cursor, drives automatic delegation — be specific. |
skills |
Yes | Skill IDs from the top-level skills array. |
tools |
Yes | Tool IDs from the top-level tools array. Only these are exposed on the filtered endpoint. |
instructions |
No | Markdown content appended to the agent file body. |
See the Sub-Agents documentation for the full reference. (#35)
Full Changelog: v1.2.5...v1.3.0