Guide / artifact / SUBAGENT

SUBAGENT artifact: define a specialist agent

Use a SUBAGENT artifact when you want a named specialist with focused developer instructions rather than a general skill.

The two-part contract

The manifest declares artifact_type SUBAGENT and content.entrypoint. The entrypoint file contains the agent's instructions: role, boundaries, inputs, expected output and failure behavior.

Keep the entrypoint as plain UTF-8 text or markdown. HubBound reads it from the bundle and writes provider-specific agent metadata; it does not execute the file.

{ "entrypoint": "agent.md" }

Write useful instructions

A good subagent file tells the model what it owns and what it must not do. State the task, context it may trust, tools or files it should inspect, output format and when to ask for help.

  • Give the agent a stable, specific responsibility such as dependency audit or release-note drafting.
  • Do not embed credentials, hidden prompts or machine-specific absolute paths.
  • Use examples for output shape, not for secrets or unreviewed destructive commands.
  • Keep supporting references in the same package and include them in files.

Example manifest entry

The deployment points to a relative agent file. The package may contain additional reference documents, but the entrypoint must be included in the snapshot.

{
  "release-notes-agent": {
    "kind": "artifact",
    "path": "packages/release-notes-agent",
    "tag": "vendor/release-notes-agent",
    "version": "1.0.0",
    "visibility": "org",
    "artifact_type": "SUBAGENT",
    "content": { "entrypoint": "agent.md" },
    "files": ["agent.md", "references/**"]
  }
}

Provider behavior

Claude Code and Codex use the entrypoint as developer instructions for a named agent. Other supported providers may materialize an agent file in their own format or report that the type is not supported yet. This is why the artifact type is provider-neutral but the install report is authoritative.