subagents

A way to create smaller AI agents that work under a supervising agent. Each sub-agent can be configured for a particular type of work, such as coding, translation, or data analysis.

In plain words
What is it for?
Use it to create specialist agents, assign them separate tasks, and combine their work in multi-step processes.
Why use it?
Large tasks are easier to manage when they are split into focused pieces. You can delegate work and organize the results into a larger workflow.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/voltagent/voltagent/subagents
Clone the repo
git clone --depth 1 https://github.com/VoltAgent/voltagent
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,484 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.06484
Opus 5 $0.00000 $0.03242
Sonnet 5 $0.00000 $0.01297
Haiku 4.5 $0.00000 $0.00648

Measured yesterday against content hash 08b2b7e28d0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

subagents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

website/docs/agents/subagents.md · 978 lines

How it starts

The opening of the file, as written. The whole thing — 978 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sub-agents

Sub-agents are agents that work under a supervisor agent to handle specific tasks. This architecture allows you to create agent workflows where each sub-agent focuses on a specific domain, coordinated by a supervisor.

Why Use Sub-agents?

  • Task delegation: Assign specific tasks to agents configured for particular domains (e.g., coding, translation, data analysis)
  • Workflow orchestration: Build multi-step workflows by delegating tasks to appropriate agents
  • Code organization: Break down complex problems into smaller components
  • Modularity: Add or swap agents without disrupting the entire system

Creating and Using Sub-agents

Creating Individual Agents

Create the agents that will serve as sub-agents:

import { Agent } from "@voltagent/core";

// Create an agent for content creation
const contentCreatorAgent = new Agent({
  name: "ContentCreator",
  instructions: "Creates short text content on requested topics",
  model: "openai/gpt-4o-mini",
});

// Create an agent for formatting
const formatterAgent = new Agent({
  name: "Formatter",
  instructions: "Formats and styles text content",
  model: "openai/gpt-4o-mini",
});

// Give sub-agents a concise purpose to control what the supervisor sees
const summarizerAgent = new Agent({
  name: "Summarizer",
  purpose: "Summarize long support tickets",
  instructions:
    "Read the conversation and produce a concise summary highlighting blockers and owners",
  model: "openai/gpt-4o-mini",
});

Creating a Supervisor Agent

Pass the agents in the subAgents array during supervisor initialization:

import { Agent } from "@voltagent/core";

const supervisorAgent = new Agent({
  name: "Supervisor",
  instructions: "Coordinates between content creation and formatting agents",
  model: "openai/gpt-4o-mini",
  subAgents: [contentCreatorAgent, formatterAgent, summarizerAgent],
});

:::tip Advanced Sub-agent Configuration By default, sub-agents use the streamText method. You can specify different methods like generateText, generateObject, or streamObject with custom schemas and options.

Read the full file on GitHub · 978 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 978 lines · 0 tokens per session scan A 08b2b7e28d0d

Subscribe to this mod's changes

subagents is an agent published in the GitHub repository VoltAgent/voltagent (10,460 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,484 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.