multi-agent-orchestration-architect

Designs multi-agent LLM orchestration systems with BullMQ job chains, routing, and tool registries.

1|Updated May 4, 2026
One-click install
npx skills add https://github.com/Scardubu/SwarmXQ --skill multi-agent-orchestration-architect-scardubu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multi-agent-orchestration-architect
Source: https://github.com/Scardubu/SwarmXQ/tree/main/.ai/skills/multi-agent-orchestration-architect
Command: npx skills add https://github.com/Scardubu/SwarmXQ --skill multi-agent-orchestration-architect-scardubu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bullmq, ioredis, effect.

What problem does it solve? Building systems where multiple AI agents coordinate is error-prone: routing mistakes, leaked state between agents, missing fallbacks, and prompt injection vulnerabilities are hard to retrofit. This Skill provides architectural patterns and reference TypeScript implementations for designing deterministic, observable, and safe multi-agent orchestration systems from the start. ## Core Features & Use Cases - Agent Registry & Contracts: Define every agent role with an explicit spec covering model, fallback model, allowed tools, timeouts, and versioned system prompts. - BullMQ Job Architecture: Structure agent work as stateless jobs with retries, exponential backoff, and separate Redis connections for queues, workers, and events. - LLM Router with Fallback & Injection Defense: Wrap every LLM call with timeouts, fallback models, token metrics, and input sanitization that blocks system-prompt and ChatML injection markers. - Orchestrator State Machine & Observability: Coordinate planning, execution, evaluation, and synthesis phases with persisted pipeline state and OpenTelemetry trace spans per agent invocation. - Use Case: When building a SwarmX-style platform where a strategist agent decomposes goals, coder and researcher agents execute sub-tasks in parallel, and an evaluator reviews outputs, use this Skill to define the registry, queues, and state machine before writing any agent code. ## Quick Start Ask the AI to design the agent registry, BullMQ job pipeline, and LLM fallback routing for your multi-agent system before writing any agent implementation code.

Frequently Asked Questions about multi-agent-orchestration-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a multi-agent LLM orchestration system?

Start by defining an agent registry where each role has an explicit contract: model, fallback model, allowed tools, timeout, and versioned system prompt. Then route work through a central orchestrator state machine rather than letting agents route themselves.

How do I use BullMQ for AI agent job queues?

Create separate ioredis connections for the Queue, Worker, and QueueEvents, since BullMQ requires it. Configure retries with exponential backoff, keep completed jobs for one hour and failed jobs for 24 hours, and limit worker concurrency to avoid saturating local LLMs.

How do I add fallback models and timeouts to LLM calls?

Wrap each LLM call with a hard timeout using the agent spec's timeoutMs, then catch timeout and rate-limit errors to retry against the fallback model. Emit token usage metrics for every invocation regardless of which model answered.

How do I prevent prompt injection in AI agents?

Sanitize all user input before it enters any agent context: cap length, strip system: prefixes, and remove Llama [INST] and ChatML im_start/im_end markers. Always place user input in the user turn, never in the system prompt.

Should AI agents keep state between turns?

No. Agents should be stateless between turns, with all state living in the job payload or database. This makes retries safe, enables horizontal scaling of workers, and prevents state leakage between unrelated tasks.

How do I restrict which tools an AI agent can call?

Use an explicit allowlist in the agent registry and enforce it in the tool dispatcher before execution. The dispatcher should reject unauthorized tool calls, validate inputs against a schema, and never allow wildcard tool access.