agent-orchestrator

agent-orchestrator is a skill for Claude Code from ssheleg/agent-stack. It costs 141 tokens per session (4,741 once invoked), scanned A, original, MIT.

A set of design patterns for building AI systems that can call tools, use other agents, follow multi-step plans, and manage context. It also covers routing requests between language-model providers and tracking usage for billing.

In plain words
What is it for?
Use it when building an AI assistant, chatbot with tools, automated pipeline, multi-agent system, or usage-metering and billing layer.
Why use it?
It helps avoid ad hoc agent code that becomes difficult to control as tasks, tools, memory, retries, and human approvals are added.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the agent-stack plugin — 4 skills shipped together

Good fit Use it when building an AI assistant, chatbot with tools, automated pipeline, multi-agent system, or usage-metering and billing layer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ssheleg/agent-stack/agent-orchestrator
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.

Any agent
npx skills add ssheleg/agent-stack --skill agent-orchestrator
Clone the repo
git clone --depth 1 https://github.com/ssheleg/agent-stack

Made for: Claude Code.

Or install agent-stack, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-orchestrator

README.md
[![agentmods](https://agentmods.dev/badge/skills/ssheleg/agent-stack/agent-orchestrator/github.svg)](https://agentmods.dev/skills/ssheleg/agent-stack/agent-orchestrator)
Your own site
<a href="https://agentmods.dev/skills/ssheleg/agent-stack/agent-orchestrator"><img src="https://agentmods.dev/badge/skills/ssheleg/agent-stack/agent-orchestrator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-orchestrator

Your own site · 80×15
<a href="https://agentmods.dev/skills/ssheleg/agent-stack/agent-orchestrator"><img src="https://agentmods.dev/badge/skills/ssheleg/agent-stack/agent-orchestrator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,741 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00141 $0.04741
Opus 5.5 $0.00056 $0.01896
Sonnet 5.5 $0.00028 $0.00948
Haiku 4.5 $0.00014 $0.00474

Measured yesterday against content hash 7d0e36de35cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-orchestrator 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.

plugins/agent-stack/skills/agent-orchestrator/SKILL.md · 359 lines

How it starts

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

Agent Orchestrator — Production Best Practices

Patterns from a production multi-agent system. The body is decisions; the mechanisms are one file away, and it is held under a 4750-token budget — a body that grows absorbs the layer that should have been split, and this one did until 2026-08-16.

Triggers

"tool calling", "LLM router", "fallback chain", "memory layer", "token wallet", "роутер моделей", "слой памяти", "граф задач".

Also routed here by scope, the list the description carried until 0.30.0: tool-calling loops, human-checkpoint pipelines, provider routing, fallback/retry, memory architecture, retrieval and decay, context budgets, sub-agent coordination, error hierarchies; the work as a graph (parallel layers, fake edges, a checker before convergence); for resale: tiered wallets, one markup boundary, the saga across database and provider API, spend-delta polling, budget and loop guards, per-tenant keys.

Architecture Overview

User Question
    ↓
OrchestratorAgent.run(AgentContext)
    ├─ Shape check → one loop, or a planned path (§5, references/pipeline.md)
    ├─ Context loading (a parallel layer: staleness, sources, KB — §13)
    ├─ History trimming, then context budget allocation
    ├─ System prompt built from the live capabilities (§10)
    └─ Execute:
        ├─ SIMPLE: LLM → tools → sub-agents → results → LLM → … → answer   (§2)
        └─ PLANNED: plan → dependency layers → checker → checkpoints → done (§5)

1. The Orchestrator Pattern

Shared Context Object

Pass a single immutable-ish context object to every sub-agent. It carries the request (project_id, user_question, chat_history), the machinery (llm_router, tracker, workflow_id), the resolved provider and model, and one extra dict for pipeline flags. The full dataclass is in references/patterns.md → The orchestrator's shared context and sub-agent protocol.

Key principles:

  • Sub-agents never modify context — they return typed results
  • Provider/model preferences flow down from user → project defaults → app defaults
  • extra dict carries pipeline state, flags like _skip_complexity, session IDs

Read the full file on GitHub · 359 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 Changed · +1 lines · -101 tokens per session 7d0e36de35cf
  2. 6d ago Changed · +5 lines 8a8058313370
  3. 8d ago Changed · -1 tokens per session 8e2bd8a84fbb
  4. 1mo ago Changed · +5 lines · -1 tokens per session d12ac258efa0
  5. 1mo ago Changed · -42 lines c8900c2f7247
  6. 1mo ago First seen · 390 lines · 244 tokens per session scan A eb2ce6b3e991

Subscribe to this mod's changes

agent-orchestrator is a skill published in the GitHub repository ssheleg/agent-stack (4 stars, last pushed yesterday), licensed MIT. It adds 141 tokens to every session and 4,741 once invoked, about $0.0006 per session on Opus 5.5. 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-31.