Khurram Badar / Archive / Papers / 16. Vertical Agent Pack #3 — The Virtual Department

16. Vertical Agent Pack #3 — The Virtual Department

briefing · 2026-04-22 · 1767 words · Khurram Badar

16. 1 The Pattern (and why most multi-agent systems fail) 16.

ai · business · technology

16. Vertical Agent Pack #3 — The Virtual Department

**Goal:** A productized multi-agent template where a manager agent coordinates a team of specialist agents to deliver work as a unit. The customer doesn't hire a marketing team — they activate a Virtual Marketing Department. The customer doesn't hire a finance team — they activate a Virtual Finance Department. Same runtime, same memory, same gateway as everything else in this architecture, but the unit of value sold is *a team*, not *an agent*.

This is the most ambitious vertical pack and the most defensible. Single-agent platforms are commoditizing fast. Multi-agent orchestration is meaningfully harder to build well, and the window to own a clean visual builder for it is open right now.

16.1 The Pattern (and why most multi-agent systems fail)

Multi-agent demos look magical and break in production. Three failure modes are responsible for almost all of it:

1. **Nested hierarchies** — manager-of-managers loops where the system spends more tokens deciding who owns the task than doing the task.
2. **Worker-to-worker chatter** — agents trying to "collaborate" by re-explaining context to each other, hallucinating consensus, getting stuck in loops.
3. **Context inflation** — every agent gets the full conversation history, token costs scale quadratically, and the manager re-reasons over everything.

The Virtual Department template enforces three constraints to avoid all three:

1. **Flat hierarchy.** Exactly one manager, N workers. No worker is also a manager. No nested teams.
2. **Star communication.** Manager → workers (delegation) and workers → manager (results) only. Workers never talk to each other. The manager is the bus.
3. **Bounded contexts.** Each worker receives only the manager's task brief plus the specific inputs it needs — never the full conversation. The worker returns a structured result; the manager synthesizes.

These constraints align with where Anthropic's own multi-agent research has converged. Don't relax them to get a more impressive demo. Relax them in production and your token costs explode and your output quality collapses.

16.2 Run Lifecycle

```
1. INTAKE — user gives the team a goal ("draft a Q2 marketing plan for our SaaS")
2. PLAN — manager agent decomposes the goal into N specialist tasks,
writes a one-paragraph brief for each, decides dependency order
3. DISPATCH — runtime spawns one worker session per task in parallel where
possible, sequentially where dependencies require it
4. EXECUTE — each worker runs against its brief with its own context, tools,
and hard token budget. Returns a structured result object.
5. SYNTHESIZE — manager assembles the workers' outputs into the final deliverable.
NOT a re-reasoning pass — a structured assembly per a template.
6. DELIVER — final deliverable goes to the user via the configured channel
(email, dashboard, document export, approval queue)
```

Total wall-clock time for a 5-worker team on a moderate task: 30–90 seconds. Total token cost: roughly 4–8x a single-agent run, not 25x — because workers run with bounded contexts, not the full history.

16.3 Three Starter Templates

Each template is one manager + 4–6 specialists. Each specialist is a Createagent agent in its own right (with its own system prompt, tools, MCP connectors, memory) — the team is a coordination layer above them.

**Virtual Marketing Department**
- *Manager:* Marketing Strategist — owns brief decomposition and final synthesis
- *Workers:* Copywriter, SEO Analyst, Social Media Planner, Visual Designer (generates image prompts), Analytics Reporter
- *Sample output:* a complete Q2 campaign deck — strategy memo, 12 long-form posts, 30 social posts, 5 thumbnail prompts, KPI dashboard plan

**Virtual Finance Department**
- *Manager:* Virtual CFO — owns coordination and board-ready synthesis
- *Workers:* Bookkeeper (categorizes transactions via accounting MCP), AP/AR Tracker, Financial Reporter, Forecaster, Compliance Watcher (SAMA/ZATCA-aware)
- *Sample output:* monthly close package — categorized P&L, AR aging report, 13-week cash flow forecast, board memo, regulatory flag list

**Virtual Legal Team**
- *Manager:* General Counsel — owns triage and final memo
- *Workers:* Contract Reviewer, Compliance Officer, IP Specialist, Employment Law, GCC Regulatory (DIFC/ADGM/SCA/SAMA/CMA-aware)
- *Sample output:* contract review package — redlined contract, risk memo, jurisdiction-specific compliance checklist, suggested edits, escalation flags

A fourth template worth shipping early because it maps to your Protiviti work: **Virtual GRC Team** (governance, risk, compliance) for SAMA/NCA/ZATCA frameworks. You've already proven you can build the agent roster — productize it.

16.4 Data Model (extends Sections 3 and 14)

Three new tables on top of the existing schema:

**`agent_teams`** — the team definition
```
id uuid pk
slug text unique -- e.g. 'virtual-marketing-dept'
name text
description text
manager_agent_id uuid fk -> agents
synthesis_template text -- prompt template for final assembly
max_total_tokens int -- hard ceiling for one team run
created_by uuid
```

**`team_members`** — workers attached to a team
```
id uuid pk
team_id uuid fk
worker_agent_id uuid fk -> agents
role text -- 'copywriter', 'seo_analyst', etc.
max_worker_tokens int -- per-worker token budget
position int -- display order
required boolean -- is this worker mandatory or optional
```

**`team_runs`** — every team execution logged
```
id uuid pk
team_id uuid fk
goal text -- the user's input goal
plan jsonb -- manager's decomposition (briefs per worker)
worker_results jsonb -- structured outputs from each worker
final_output text -- manager's synthesis
status text -- 'planning' | 'dispatching' | 'synthesizing' | 'done' | 'failed'
total_tokens int
total_cost_cents int
duration_ms int
started_at timestamptz
completed_at timestamptz
```

The `team_runs` table is also your customer-facing "what did my department do today" dashboard.

16.5 The Manager's System Prompt (the secret sauce)

The whole pattern lives or dies on the manager prompt. It does only three jobs and nothing else:

> *"You are the manager of a team of specialist agents. You do three things and three things only: (1) Decompose the user's goal into specific, scoped tasks for your specialists. Write a one-paragraph brief for each task that includes only what that specialist needs to know — not the full conversation, not your reasoning. (2) Decide dependency order: which tasks can run in parallel, which must run after others. (3) When all specialists have returned their outputs, assemble them into the final deliverable using the synthesis template. Do not re-do the specialists' work. Do not second-guess them. Do not summarize — assemble. Your value is coordination, not re-reasoning."*

The synthesis template (per team) is a structured prompt that says: "given outputs A, B, C, D, E, produce a deliverable in this format..." with explicit slots for each specialist's contribution. This stops the manager from drifting into "let me think about everything everyone said" mode that burns tokens and waters down output.

16.6 Guardrails (non-negotiable in production)

16.7 Build Cost

This is the most expensive vertical pack. Once Phases 1–3 of the runtime are in place, expect **~14 days of Claude Code work**:

Plan a fourth week of supervised tuning per template — multi-agent prompt tuning is genuinely iterative. Anthropic's own research teams iterate for weeks on these patterns.

16.8 Commercial Packaging

Virtual Departments are not a $99/month SaaS feature. They're enterprise-tier productized services. Suggested structure:

| Tier | Setup | Monthly | What's included |
|---|---|---|---|
| Department | AED 25,000 | AED 5,000 | 1 department (e.g., Marketing only), up to 100 team runs/month, email delivery |
| Multi-Department | AED 60,000 | AED 12,000 | Up to 3 departments, 500 runs/month, email + WhatsApp + dashboard, monthly tuning session |
| Enterprise | AED 150,000+ | AED 30,000+ | Unlimited departments, custom team templates, dedicated infrastructure, white-label, audit logs, SAMA/NCA-grade compliance |

Setup fee covers: discovery interviews to map the customer's actual workflow, custom worker tuning for the customer's voice/data/tools, team integration with their MCP connectors (Salesforce, NetSuite, SAP, etc.), and the first 30 days of supervised operation.

Per your standard model: also offer revenue share as an alternative — 20% of demonstrable cost savings vs the equivalent human team for 12 months. For a finance department this is easy to evidence; for marketing it's harder. Use rev-share where the savings are quantifiable, fixed fee everywhere else.

16.9 Why This Is the Strongest Play in the Whole Doc

Three reasons worth being explicit about:

1. **Category positioning.** Single-agent builders are a crowded race to the bottom. "Company in a box" is a category nobody owns yet. Pricing power lives in the bigger category.

2. **You've already proven you can build it.** Your Protiviti AIS engagement was a 21-agent multi-agent system shipped in one day. That's the proof point in every sales conversation: "we built this for Protiviti KSA — here's the same architecture as a productized template you can deploy in an afternoon."

3. **The window is closing.** Anthropic's own multi-agent feature is still in research preview. CrewAI, MetaGPT, AutoGen are developer tools without polished visual builders. Lindy and Relevance have orchestration but it's clunky. There is roughly a 6–12 month window where a clean, non-technical, visual multi-agent builder for GCC verticals can establish a defensible position. Ship inside that window.

16.10 What This Pack Is Not For

To stay disciplined: do not extend this pattern to consumer-facing chat agents, simple workflow automation that one agent can handle, or anything where latency under 5 seconds matters. Virtual Departments are for considered, structured deliverables (campaigns, reports, reviews, plans) — not real-time interaction. A different vertical pack can cover real-time use cases later.

---

17. Open Questions for You

← Model Any YouTube Channel With Claude AI — Full Workflow14. Vertical Agent Pack #2 — The Routine Agent →
Two years of working thought, indexed.
Ask me to present it in your conference room — WhatsApp +971 55 623 9111
Book Session →