Skip to content

Agent roles and storage ​

Language

Guide: Install · Sources · Resources · AI suggestions · Services · Translation · Settings · Workspace · Agent roles · Layout audit

Installed suites and user entries appear together in the Skills, Commands and Agent personas tabs. Source filters distinguish them; entries retain unique identities even when names match. A managed suite entry is read-only — content edits are refused because the suite owns the file, so an upstream refresh can replace it freely. An agent persona is the one exception: its pencil opens the routing form alone (provider, model, reasoning effort) and the server accepts exactly that frontmatter diff; skills and commands offer only the enable switch. External local source files are displayed but remain read-only; create a user entry to customize one.

Agent persona details put linked provider and model dropdowns above the Markdown editor. Providers come from DSH's live LLM registry; models load only for the selected provider. Select inheritance to use the parent session. Unavailable saved values are preserved until changed, and failed directory requests can be retried. The form warns when the stored routing declaration is one the executor would ignore, and it no longer edits tools / disallowedTools — those keys stay in the frontmatter, preserved by the raw editor, but the form has no control for a field that has no effect. Unknown keys, arrays and comments are preserved. Example:

yaml
---
name: reviewer
description: Review implementation changes
model: my-provider/my-model
reasoning_effort: high
tools: [read_file, search_files]
---
Review correctness and report concrete evidence.

Routing is exact-or-inherited. Omit model, or use inherit, to run the child on the parent's route. An explicit provider and model together select that route, and it is validated against the live LLM adapter before the child starts. Every other declaration — a bare model ID, a provider/model string, a Claude alias such as sonnet, a lone provider — is ignored with a diagnostic and the child inherits the parent route. tools and disallowedTools are preserved in the file and stay editable, but they are not applied.

reasoning_effort sets the model's reasoning intensity; reasoningEffort is also accepted, but conflicting values are rejected. Use an effort ID supported by the selected DSH model. The reasoning-effort selector loads the selected model's advertised levels and default through DSH. Selecting Automatic removes the explicit effort. Changing the provider or model through the controls clears the old effort; an unavailable saved value remains visible until changed. Inherited or unresolved models offer Automatic and any saved value, without guessing supported levels. Loading failures offer retry. Selecting a level saves reasoning_effort and removes the camelCase alias, while preserving unrelated frontmatter and Markdown. An omitted effort inherits the parent's latest request effort only when the effective provider/model route is unchanged; changing the route uses the new model's default effort. The host LLM runtime validates the effective provider, model and effort before a child starts. When a declared route or effort is unsupported, the whole declaration is dropped and the child inherits the parent route, with a diagnostic.

The subagent-catalog follows DSH's skills catalog mechanism: every agent/pre-step reads a current role snapshot, hashes the published entries, and compares them with the latest visible catalog in the session log. The first nonempty catalog is injected once; changes publish a complete replacement; removing all roles publishes an explicit empty catalog. Restore and fork use durable entries, and compaction that hides a catalog causes it to be republished. Incomplete reads do not publish partial replacements. The model-facing catalog is a reminder that renders each readable role name in backticks with its description only; role titles, configured routes and full persona bodies are not part of it. Change detection covers the name, the durable role identity, the description and the configured route, so renaming a title alone does not republish. Opaque source-qualified IDs remain in the durable source for execution, not in the model-facing prose.

GET /api/agent-plugins/model-catalog?provider=<id>&model=<id> resolves only that exact model through llm.resolveModelInfo. The response adds reasoning: { efforts: [{ id, name, description? }], defaultEffort? }; models without advertised reasoning return an empty effort list. Omitting model keeps the provider/model-list behavior. Adapter waits are bounded to ten seconds, and failures return HTTP 503.

Delegation modes ​

Call subagent_role with the exact catalog agent and a self-contained prompt. Omitted or true run_in_background returns { kind: 'continuable', subagentId } immediately; false waits for { kind: 'foreground', runId, output }. There is no tracked-job channel or action parameter. The child does not inherit the parent conversation.

The child receives the role card body as its own deployment:persona-prefix system-prompt section. Creation records one plugin-owned context message, and a resume after a restart rebuilds the section from that record instead of reading a later card edit. The channel fails closed: when the section cannot be installed or the record cannot be persisted, no child runs and the error names the role. A child created on an older host release already carries the instructions recorded in its descriptor, and the plugin recognises that copy instead of installing a second one, so the child keeps running after a host upgrade. If the current card no longer matches those recorded instructions, or the host's copy would not keep a template-bearing card body literal, the call refuses and names the older host line.

The model-visible directory is titled subagent-catalog, and the tool parameter refers to that exact title. Only an agent that can see the tool sees the catalog: a restricted scope publishes an empty list, and a same-name replacement registration is treated as someone else's tool. Guidance-text changes publish one replacement on the next step even when role names are unchanged, and earlier history is retained.

Roles compose with the host's Agent Teams without plugin-side integration. The host derives Team membership from the subagent tree, so a child the Lead creates through subagent_role is a Team member wherever collaboration is on: it reaches the shared task board and the standard messaging tools. Messaging, interruption, member navigation and shared tasks belong to the host; this plugin owns the role card, its model route and the creation entry.

Role instructions and the validated route are fixed before the first request and persisted in a plugin-owned message source through the host inbox. Cold resume and plugin reload use that creation snapshot, not an edited role card. Keep the plugin installed to restore its composition. The child's route lives on its own Agent while it is resident, so take the effective route from this tool's result rather than from list_agents. Calls incur normal provider usage.

Roles are not skills or slash commands. Project discovery follows the calling directory and scanProjectLayouts. Edits and switches affect later steps/new members, not already accepted work or member snapshots. External discovery uses scan-cache TTL or manual refresh, without a file watcher. tools and disallowedTools are preserved but do not enforce permissions. Verify child reports before relaying them.

Plugin state is under $DSH_HOME/agent-plugins (default ~/.dsh/agent-plugins): checkouts in .sources, installation state in state.json, and mutable suite data/configuration in data. The entries you author live in the shared Agent layout root, ~/.agents/{skills,commands,agents}/, next to the ~/.agents/mcp.json and ~/.agents/lsp.json service declarations. Former userRoot and dataRoot settings are migration inputs only. Startup migrates old roots, agent-plugins-data, data/user, user/<kind> entries and the old mcp-servers.json / lsp-servers.json declarations. Conflicting files remain untouched and block activation with their paths; resolve conflicts before restarting. Project-dimension and externally registered local source directories retain their existing in-place semantics.

Model routing was informed by DSH Subagent Model Router; frontmatter follows Claude Code subagent conventions.

dsh-agent-plugins-market — the standard way to run Claude Code, Codex, Cursor and Kimi plugin marketplaces inside DeepSeek Harness.