M0X Docs
M0X Docs

Get Started

Quickstart GuideCore ConceptsAI ModelsPricing Plans

Core Features

Feature OverviewThe CoderX AgentOperating ModesReviewTerminal IntegrationBrowserSecurity

Customization

Lifecycle HooksContext ManagementRules & InstructionsCommandsSkills & Custom ToolsSub-Agents & Parallel OrchestrationSemantic Search@ Mentions

MCP

Model Context Protocol (MCP)MCP FeaturesMCP Tab

Tools

Cloud FeaturesCLIInline Edit (Ctrl+K)BugbotShared TranscriptsSlack IntegrationLinear IntegrationGitHub IntegrationGit SupportGitLab IntegrationDeep Links

Settings

ConfigurationIgnore FilesExtensionsKeyboard ShortcutsShell Commands

Advanced

Parallel AgentsBring Your Own Key (BYOK)Language SupportMigrations

Account

Account ManagementBilling & SubscriptionsUpdate AccessTeamsEnterprise

Guides

CookbookAgent WorkflowsWeb DevelopmentData ScienceLarge Codebases & MonoreposMermaid DiagramsBugbot Rules

Support

TroubleshootingCommon IssuesRequest IDTroubleshooting GuideDownload
Documentation

Sub-Agents & Parallel Orchestration

Delegate complex development goals to specialized, parallel sub-agents to accelerate coding tasks.

When tackling large, multi-faceted features, a single AI agent can run into context limits or execution bottleneck constraints. CoderX resolves this by supporting Sub-Agents—specialized helper agents that can be spawned to work on specific sub-tasks concurrently.

For example, your primary workspace agent can delegate styling tasks to a frontend-specialist while a backend-specialist updates database migrations in parallel.


Multi-Agent Architecture

The coordinator agent divides a complex project request into isolated work units, spawns sub-agents, monitors their progress, and integrates their changes:

graph TD
    Main[Main Coordinator Agent] -->|Delegates UI| Sub1[Frontend Sub-Agent]
    Main -->|Delegates DB| Sub2[Database Sub-Agent]
    Main -->|Delegates Tests| Sub3[QA/Test Sub-Agent]
    Sub1 -->|Sugges Diffs| Main
    Sub2 -->|Suggest Diffs| Main
    Sub3 -->|Suggest Diffs| Main
    Main -->|Compiles & Merges| Workspace[Active Workspace]

Common Specialized Roles

Sub-agents can be configured with specific prompts, system constraints, and tool limitations:

Frontend Specialist

Tailored for React/Next.js UI updates, Tailwind class composition, accessibility (a11y) rules, and visual micro-animations.

Database Architect

Restricted to database schemas, SQL optimizations, ORM queries, and migration files. Blocked from editing frontend assets.

QA / Test Writer

Specialized in writing Vitest, Jest, or PyTest suites. Operates in a loop to execute tests and fix failing coverage reports.

Security Auditor

Inspects code additions for dependency vulnerabilities, SQL injections, open secrets, and credential leaks.


How Parallel Execution Works

To delegate work, the main agent invokes the invoke_subagent tool. Here is the lifecycle of a sub-agent task:

Spawning

The main agent creates a sub-agent session with a dedicated scope (e.g. "Create unit tests for auth-service.ts").

Isolation

The sub-agent receives a read-only snapshot of the workspace, focusing only on files relevant to its task.

Execution

The sub-agent executes its task independently, planning its actions, writing code in its temporary workspace, and running validation checks.

Review & Merge

Once completed, the sub-agent packages its proposed file diffs and reports back. The main coordinator reviews the diffs, checks for file conflicts, and merges the changes into the active workspace.


Performance and Resource Management

[!TIP] Running sub-agents in parallel dramatically reduces task execution times. However, since each sub-agent makes its own API requests, make sure your LLM rate limits and API budgets are configured to accommodate parallel requests.

Configuration Settings

Navigate to Settings > Agent > Sub-agents to control:

  • Max Parallel Subagents: Cap the number of concurrent sub-agents (default is 3).
  • Verbose Logs: Toggle individual logs output per sub-agent.
  • Auto-Merge Diffs: Choose if sub-agent outputs are merged automatically or paused for manual code reviews.

Skills & Custom Tools

Learn how to expand the capabilities of CoderX and the M0X Agent with dynamic, reusable skills.

Semantic Search

Search your codebase by meaning.

On this page

Multi-Agent ArchitectureCommon Specialized RolesHow Parallel Execution WorksSpawningIsolationExecutionReview & MergePerformance and Resource ManagementConfiguration Settings