|
| 1 | +# Subagent profile schema |
| 2 | + |
| 3 | +DevSpace agent profiles are user-owned markdown files with YAML |
| 4 | +frontmatter. They describe roles such as reviewer, explorer, or implementer. |
| 5 | +DevSpace owns provider invocation. |
| 6 | + |
| 7 | +Profiles are discovered from: |
| 8 | + |
| 9 | +- `~/.devspace/agents/*.md` |
| 10 | +- `.devspace/agents/*.md` |
| 11 | + |
| 12 | +Packaged files under `examples/agents/` are starter templates only. |
| 13 | + |
| 14 | +## Minimal shape |
| 15 | + |
| 16 | +```md |
| 17 | +--- |
| 18 | +schema: devspace-agent/v1 |
| 19 | +name: reviewer |
| 20 | +description: Read-only reviewer for bugs, security risks, and missing tests. |
| 21 | +provider: codex |
| 22 | +model: gpt-5.4 |
| 23 | +disabled: false |
| 24 | +--- |
| 25 | + |
| 26 | +You are a read-only reviewer. Do not edit files. |
| 27 | +Focus on correctness, security, test gaps, and maintainability. |
| 28 | +Cite files and return concise findings. |
| 29 | +``` |
| 30 | + |
| 31 | +## Frontmatter fields |
| 32 | + |
| 33 | +### `schema` |
| 34 | + |
| 35 | +Optional schema identifier: |
| 36 | + |
| 37 | +```yaml |
| 38 | +schema: devspace-agent/v1 |
| 39 | +``` |
| 40 | +
|
| 41 | +### `name` |
| 42 | + |
| 43 | +Stable profile identifier shown to the model and accepted by: |
| 44 | + |
| 45 | +```bash |
| 46 | +devspace agents run <name> "<prompt>" |
| 47 | +``` |
| 48 | + |
| 49 | +Use lowercase kebab-case names. If omitted, DevSpace uses the filename without |
| 50 | +`.md`. |
| 51 | + |
| 52 | +### `description` |
| 53 | + |
| 54 | +Required short purpose. This is exposed by `open_workspace` so the supervising |
| 55 | +model can choose the right profile. |
| 56 | + |
| 57 | +### `provider` |
| 58 | + |
| 59 | +Required built-in provider id: |
| 60 | + |
| 61 | +```yaml |
| 62 | +provider: codex |
| 63 | +provider: claude |
| 64 | +provider: opencode |
| 65 | +provider: pi |
| 66 | +provider: cursor |
| 67 | +provider: copilot |
| 68 | +``` |
| 69 | + |
| 70 | +Unsupported or custom providers are rejected. DevSpace maps providers to their |
| 71 | +native integration: |
| 72 | + |
| 73 | +- `codex`: Codex SDK |
| 74 | +- `claude`: Claude Code SDK |
| 75 | +- `opencode`: OpenCode SDK |
| 76 | +- `pi`: Pi RPC mode |
| 77 | +- `cursor`: ACP |
| 78 | +- `copilot`: ACP |
| 79 | + |
| 80 | +### `model` |
| 81 | + |
| 82 | +Optional provider model id or alias. |
| 83 | + |
| 84 | +```yaml |
| 85 | +model: gpt-5.4 |
| 86 | +model: sonnet |
| 87 | +``` |
| 88 | + |
| 89 | +### `disabled` |
| 90 | + |
| 91 | +Optional boolean. Disabled profiles are not exposed. |
| 92 | + |
| 93 | +```yaml |
| 94 | +disabled: true |
| 95 | +``` |
| 96 | + |
| 97 | +## Markdown body |
| 98 | + |
| 99 | +The body is the profile prompt prefix DevSpace prepends when launching that |
| 100 | +profile. It is not included in `open_workspace` by default. |
| 101 | + |
| 102 | +Recommended body content: |
| 103 | + |
| 104 | +- When to use this profile. |
| 105 | +- Whether the worker should act read-only or may make changes. |
| 106 | +- Output format. |
| 107 | +- Review or testing expectations. |
| 108 | + |
| 109 | +## Model-facing workflow |
| 110 | + |
| 111 | +The Subagent skill teaches only: |
| 112 | + |
| 113 | +```bash |
| 114 | +devspace agents ls |
| 115 | +devspace agents run <profile-or-id> "<prompt>" |
| 116 | +devspace agents show <id> |
| 117 | +``` |
| 118 | + |
| 119 | +`open_workspace` exposes compact profile metadata: |
| 120 | + |
| 121 | +```json |
| 122 | +{ |
| 123 | + "name": "reviewer", |
| 124 | + "description": "Read-only reviewer for bugs, security risks, and missing tests.", |
| 125 | + "provider": "codex", |
| 126 | + "model": "gpt-5.4" |
| 127 | +} |
| 128 | +``` |
| 129 | + |
| 130 | +`devspace agents ls` lists existing subagent sessions for the current workspace; |
| 131 | +it does not list profile definitions. |
| 132 | + |
| 133 | +The full profile body stays out of the model context until DevSpace launches the |
| 134 | +profile. |
| 135 | + |
| 136 | +## Current non-goals |
| 137 | + |
| 138 | +- Custom or arbitrary CLI-backed agents. |
| 139 | +- Inferring changed files, tests, or diffs from worker output. |
| 140 | +- Exposing raw provider transcripts by default. |
| 141 | +- Teaching the model provider-specific CLIs. |
| 142 | +- First-class MCP agent tools. Future tools should wrap the same provider |
| 143 | + adapter registry used by `devspace agents`. |
0 commit comments