Skip to main content

What are sub-agents?

Workshop’s main agent can spin up helper agents to handle specific tasks inside the same workflow. These are called sub-agents. Each sub-agent runs in its own separate context window. It reads files, runs tools, and does its work without consuming the main agent’s context. When it’s done, only a short summary comes back to your main conversation. Sub-agents don’t all need to use the same model. They can use different models, from different providers — and in Workshop Desktop, they can even run in different environments, including local models on your device. Three sub-agents researching weather APIs, React patterns, and Tailwind layouts in parallel — each running on Claude Haiku 4.5 with live activity feeds Three sub-agents researching in parallel, each with a live progress indicator.

Why this matters

You no longer need one model to do everything. Different parts of a workflow can be delegated to the models best suited for those parts.

Better performance

Some models are better at certain types of tasks than others. By delegating subtasks to better-fit models, the overall workflow produces better results than any single model could.

Lower cost

Not every task needs a top-tier model. Simpler or narrower subtasks can be routed to more affordable models, reducing overall cost without sacrificing quality where it matters.

Faster workflows

Some tasks benefit more from speed than from maximum intelligence — reading large volumes of text, scanning files, repetitive processing. These can be delegated to faster models to keep things moving.

More usable context over time

Sub-agents work without consuming the main agent’s context in the same way. You can keep building in the same conversation without hitting limits as quickly.

Privacy and control

Workshop can combine cloud models with local models. That means you can keep your main workflow powered by a frontier cloud model, but route a sensitive task to a local model running on your device. This is especially useful when a task involves:
  • Private data or sensitive internal files
  • Content you don’t want sent to an external inference provider
  • Compliance requirements around data residency
Local model routing requires Workshop Desktop. Workshop Cloud uses cloud-hosted models only.

The real differentiator

It’s not just “multiple models.” Workshop lets you orchestrate multiple models, from multiple providers, across cloud and local environments, in the same workflow — frontier cloud models, open-source models, and local models working together in one product experience. Use the best AI for each part of the job, instead of forcing one model to do everything.

How sub-agents work

As conversations grow longer, the agent’s performance gradually declines — it may lose track of earlier decisions, repeat work, or miss details it would have caught earlier. This happens because every AI conversation has a context window: the total amount of information the agent can work with at once. Everything counts — your messages, files it reads, tool outputs, its own responses. You can see the context window filling up as a percentage in the UI. As it fills, quality drops. Eventually, you’ll need to either start fresh or use /compact to summarize and continue. Sub-agents solve this by working outside your main conversation — each one gets its own fresh context window, does its work, and returns only a short summary. That keeps your main conversation lean and focused.

Why sub-agents matter

Take on bigger projects

Without sub-agents, every file read and tool call fills your context window, limiting how complex a task can be. Sub-agents handle the heavy lifting in their own space, so your main conversation stays focused on the big picture and stays sharp for longer.

Get higher quality results

A sub-agent with a single clear objective — “review this diff for security issues” or “explore how the payment flow works” — dedicates its full attention to that one job, without being distracted by the rest of your conversation.

Run work in parallel

Up to 3 sub-agents run simultaneously, each potentially on a different model. A quick search uses a fast model; a thorough code review uses a more capable one. You get speed and specialization without managing any of it.

Built-in agents

Workshop includes six specialized agents, each with a focused toolset:
You can override the default model for any built-in agent mid-conversation — see Choosing models below.

How to trigger sub-agents

Tell Workshop to use sub-agents in your prompt. The key phrase is “use sub-agents” or “delegate” — Workshop will recognize the intent and spin up the right agents:
You can also name specific agents:
Workshop may also delegate on its own when it judges a task benefits from specialization — but being explicit gives you more control over what gets delegated and how. Multiple sub-agents can run simultaneously. Each one appears as a collapsible card in your chat with a live progress indicator. All 3 agents complete in 73.9s — the main agent immediately synthesizes the research into a plan All three research agents finished in 73.9 seconds. The main agent synthesizes the results and starts building.

Limits

  • Sub-agents cannot spawn their own sub-agents (depth limit of 1)
  • Each sub-agent starts fresh — it cannot see your conversation history, so include everything it needs in the delegation prompt
  • Sub-agents complete autonomously — they cannot ask you questions mid-task

Choosing models for sub-agents

Each built-in agent has a default model chosen for its task type — shown in the Built-in agents table above. You can override any of them two ways: mid-conversation by just asking, or persistently in Settings.
To set a default model for a built-in agent that applies to every new conversation, open the Sub Agents tab in Settings. The mid-conversation method below is best for one-off overrides.

Changing a model mid-conversation

You don’t need to configure anything upfront. Just tell Workshop which model you want a sub-agent to use, and it will apply that for the delegation:
Workshop passes the model assignment through to the sub-agent when it delegates. The available models are:

Create your own agents

Workshop’s six built-in agents handle most workflows out of the box — you don’t need to create custom agents to use sub-agents. This section is for teams who want to define their own reusable agents for specialized or repeated tasks.
Beyond the built-in agents, you can define custom agents — reusable markdown files that give Workshop specialized personas, toolsets, and instructions for tasks you run repeatedly. Workshop implements the Agent Skills open standard — the same format used by Claude Code, Cursor, GitHub Copilot, Gemini CLI, OpenAI Codex, and many other tools. Agents you create for Workshop work in any compatible client, and vice versa.

Quick start

Create an agents/ directory in one of the supported paths and add a markdown file:
Pick whichever path fits your team. If you want your agents to work across Workshop, Claude Code, Cursor, and other tools, use .agents/agents/. If you only use Workshop, .workshop/agents/ is the simplest choice. Each file is one agent. The filename (minus .md) becomes the agent name.

Agent file format

Each agent file uses YAML frontmatter followed by markdown instructions:
Frontmatter fields:
The description field is crucial — it’s how Workshop decides which agent to delegate to. Write it like a job title and responsibility summary, not a vague label.

Where to put agents

Place agents in .workshop/agents/ at your project root. These are shared with your team via version control — great for project-specific workflows like deployment checks, code review standards, or domain-specific analysis.
Project agents take precedence over personal agents when names conflict.

Cross-client compatibility

Workshop implements the Agent Skills open standard, which means your custom agents are portable across a growing ecosystem of AI development tools — including Claude Code, Cursor, GitHub Copilot, Gemini CLI, OpenAI Codex, Roo Code, and more. Workshop discovers agents from three directory paths in priority order: If the same agent name exists in multiple directories, the first match wins.
If your team uses multiple AI tools, put your agents in .agents/agents/ — they’ll be discovered by Workshop, Claude Code, Cursor, and every other tool that supports the Agent Skills standard. One set of agents, every tool.

Writing effective agents

The quality of your agent depends on three things: a precise description, the right model, and clear instructions.

Descriptions that trigger reliably

The description field is how Workshop decides which agent to delegate to. Front-load the key action and context:

Choosing the right model

Workshop supports models from multiple providers. Refer to the full model table above for the complete list with speed and cost guidance. When setting the model field in your agent file:
  • Use haiku for fast, focused tasks (searches, file scans, checklists)
  • Use sonnet for balanced tasks (code review, refactoring, documentation)
  • Use opus for complex reasoning (architecture decisions, multi-file analysis)
  • For frontend-heavy agents, glm-5.1 or gemini-3.1-pro are strong choices
  • For backend code review, gpt-5.4 excels
If you omit model, the agent inherits your conversation’s current model.

Structuring instructions

Write instructions like you’re briefing a capable colleague who has no context. Include:
  1. Role — Who the agent is and what lens it uses
  2. Steps — Numbered sequence of what to do
  3. Constraints — What to avoid or what boundaries to respect
  4. Output format — How to structure the response

Agents vs skills

Workshop supports both agents and skills. They serve different purposes: Use an agent when you want to hand off a complete task. Use a skill when you want Workshop to know something while working with you.

Example agents

An agent that runs pre-deployment safety checks with a structured PASS/FAIL verdict:
An agent that reads your code and generates API documentation:
Sort endpoints alphabetically within each resource group.
An agent that generates tests for existing code:

Best practices

Keep agents focused

One agent, one job. An agent that “reviews code, writes tests, and deploys” will do all three poorly. Create separate agents for each concern.

Use haiku for speed

Most custom agents don’t need the most powerful model. haiku is fast, cheap, and capable enough for grep-and-report tasks. Save sonnet and opus for complex reasoning.

Limit turns

Set maxTurns to prevent agents from spiraling. A focused agent should finish in 10-15 turns. If it needs more, the instructions probably aren’t specific enough.

Restrict tools

Only give agents the tools they need. A read-only reviewer doesn’t need Edit or Bash. Fewer tools means fewer ways to go wrong.

Specify output format

Tell the agent exactly how to structure its response — tables, checklists, JSON. Without this, you’ll get inconsistent free-form text.

Version control your agents

Commit project agents to your repo. They’re documentation of your team’s workflows, reviewable in PRs, and automatically available to anyone who clones the project.