Agent
Subagents

Subagents

Subagents are specialized agents launched by the main Agent through the Task tool. They let the main agent delegate focused work (like exploration or implementation) while keeping tool access and behavior scoped.

Custom subagents

Custom subagents are user-defined agent profiles. You can create them either in the UI or by editing your config file.

Each custom subagent has:

  • A title (this is the value you pass in subagent_type)
  • An objective/behavior description
  • An optional runtime override
  • A tool allowlist that controls what it can do

Create in the UI

  1. Open settings and go to Subagents.
  2. Click Add (or Generate if you want ProxyAI to draft it from a prompt).
  3. Set the title, objective, runtime, and allowed tools.
  4. Save.

Create via settings.json

You can also add subagents directly in your project's .proxyai/settings.json.

Subagent definition fields

FieldTypeRequiredDescription
idnumberYesUnique numeric ID for this subagent.
titlestringYesDisplay name and the value you pass as subagent_type.
objectivestringYesInstructions that shape how the subagent behaves.
toolsstring[]YesAllowed tools, stored as lowercase tool IDs (for example read, intellijsearch, edit).
providerstringNoNative provider override. Must be paired with model.
modelstringNoNative model override. Must be paired with provider.
external_agent_idstringNoExternal ACP runtime preset ID (for example codex).

If you omit provider, model, and external_agent_id, the subagent inherits the parent Agent runtime.

Example:

{
  "subagents": [
    {
      "id": 200,
      "title": "Dependency Researcher",
      "objective": "Help choose the best dependency for the user's topic (e.g., auth, logging, HTTP, testing). Compare 2-4 realistic options, call out licensing, maintenance signals, and ecosystem fit. Prefer reading existing repo usage first, then use Context7 for API details, and WebSearch only for release notes/security/official docs. Provide a short recommendation with sources.",
      "provider": "OPENAI",
      "model": "gpt-5-mini",
      "tools": [
        "read",
        "intellijsearch",
        "resolvelibraryid",
        "getlibrarydocs",
        "websearch",
        "todowrite",
        "exit"
      ]
    }
  ]
}

Generate subagents

If you don't want to hand-write subagent definitions, you can generate one from natural language in the UI.

Steps

  1. Open settings and go to Subagents.
  2. Click Generate.
  3. Describe what you want (for example: "Review Kotlin code for style and complexity").
  4. Review the generated title and objective.
  5. Adjust the tool allowlist if needed, then save.

Notes

  • Generation creates the title and objective text. Tool access is suggested based on your prompt, but it's still your call.
  • If your prompt includes words like "edit", "implement", or "modify", ProxyAI will usually suggest write-capable tools.

Task input reference

When the agent spawns a subagent, it calls the Task tool with the inputs below.

FieldTypeRequiredDescription
descriptionstringYesShort label for the run.
promptstringYesFull instruction for the subagent.
subagent_typestringYesWhich subagent to run (built-in type or a custom title).
modelstringNoOptional native-model override for that subagent run. ProxyAI rejects this when the resolved runtime is external.
project_pathstringNoOptional working directory override.

How subagents are surfaced

Subagent tool calls are bridged back to the parent agent run so the UI can display them and approval prompts still work as expected.

The task row also shows the resolved runtime as soon as the subagent starts, for example:

  • OpenAI · GPT-5
  • Anthropic · Claude 4.5 Sonnet
  • Codex

See also

  • Tools for the tool registry and schemas.
  • Skills for on-demand reusable instructions.
  • Hooks for subagentStart and subagentStop.