Delegating to subagents

Share
Delegating to subagents

In Reducing the unknown with AGENTS.md we discussed the first step of the agentic workload system.

The second breakthrough in my workload was the introduction of subagents. Subagents are specialized assistants that the main agent can delegate tasks to. The main agent and subagent work in parallel and in isolation. After the subagent finishes working on the task, it returns the outcome to the main agent for it to handle.

The key benefit of using Subagents for me has been the improved context window management. Each subagent has its own context window so the main conversation is kept lean.

Subagents can be configured in AI coding assistants like Cursor, Claude Code and OpenCode to use a specific model, decreasing the overall cost of usage.

For reference, here is a Ruby on Rails backend subagent I have created for skateparks.gr that the main agent can delegate backend specific tasks. As with AGENTS.md, the subagent markdowns should evolve with the codebase and the learnings from its usage.

Links
https://cursor.com/docs/context/subagents
https://code.claude.com/docs/en/sub-agents

This article is part of the series: "The Road to an agentic workload system".