A flow that looked simple in the demo becomes six agents, four tool integrations, and three model providers in production. LangChain chains become graphs. CrewAI crews delegate. Handoffs multiply. Defects injected at step two propagate to step five before anyone notices.
Orchestration without per-step validation is assembly without quality control. ValGuard sits between your supervisor, agents, and tools as an OpenAI-compatible layer: route conditional branches, fan out parallel work, and enforce contracts at every handoff — without replacing LangChain, CrewAI, or your own code.
For the full engineering deep dive, see the multi-agent orchestration pillar on the blog. For architecture context, read deterministic orchestration as the missing layer.
Why orchestration breaks in production
Single-prompt demos hide branching. If classification is billing, route here; if outage, page on-call; if refund over threshold, human approve. That is orchestration — conditional logic, state, retries — whether you implement it in LangGraph, CrewAI tasks, or plain Python.
Signs you need explicit orchestration:
- More than one model call per user request
- Tool calls with side effects
- Different SLAs per branch
- Compliance requires an audit trail per step
The anti-pattern: one mega-prompt asking the model to "classify, route, draft, and check policy." Failures become undebuggable soup. The fix is typed handoffs and validated state between steps.
Playbooks: linear, branch, and fan-out
ValGuard ships 51 production-ready playbooks you can provision in one click from the playbook marketplace or wire through the playbooks documentation. Each playbook is a graph: agents, route conditions, tool steps, and validation gates.
| Pattern | When to use | Example |
|---|---|---|
| Linear | Fixed pipeline, same order every time | Triage → compliance → reply |
| Branch | Route on validated classification | Billing vs outage vs refund |
| Fan-out | Parallel enrichment, merge results | Multi-source research, KYC bundle review |
The Support resolution template is a three-step linear handoff. Invoice processing adds a fraud gate before confirmation. Policy Answer Guarded pairs retrieval with a compliance step for RAG answers.
Browse the catalog, fork a template, and publish from the dashboard — no separate orchestration service to deploy.
Deterministic control beats probabilistic branching
Probabilistic branching — the model decides what happens next — drifts at volume. Deterministic control — code decides based on validated outputs — does not.
classify → validate JSON → route(classification.team) → draft → validate policy → send
The model proposes team. Your route conditions (or ValGuard graph edges) choose the branch. The model does not "decide" to call the refund API; validated state triggers allowed tools.
LangChain teams use RunnableBranch on a validated dict. CrewAI tasks define output schemas with a human or validator gate before the next agent runs. ValGuard encodes the same pattern in orchestration templates you can simulate before publish.
Guarded tool calls and multi-provider routing
Tools are production APIs with teeth. Orchestration must not expose the full toolbelt to every agent.
- Role-based tool registry — support agent sees
create_ticket; admin agent seesupdate_billing - Pre-execution validator — the Agentic Tool Call Validator playbook
- Post-execution validator — response schema before passing to the next agent
- Injection scan on tool payloads — see prompt injection in production agents
Vendor outage, price optimization, or capability gaps push teams toward multiple providers. Orchestration owns routing; validators own consistency. The Smart LLM Fallback Router tries a cheaper model first and escalates only when validation fails — FinOps without bypassing guards.
Measured overhead: orchestration stays in milliseconds
LLM completions run in hundreds of milliseconds. Orchestration overhead should not.
On measured hardware (see benchmarks for environment details), a three-step support playbook adds roughly 8 ms at p50 — about 100× faster than a typical GPT-4 class completion baseline (~820 ms). A RAG knowledge-answer path runs near 7 ms p50 with validation gates included.
Validation engine work inside those steps is measured in microseconds for typical rule packs — not milliseconds. That matters when you run thousands of handoffs per hour: routing logic stays invisible next to model latency.
Integration without rewrites
ValGuard is OpenAI-compatible. Point your existing client at the proxy URL; attach validators per agent; publish a playbook when you need multi-step flows.
LangChain / LangGraph: attach validation as a RunnableLambda between nodes; store validation results in graph state; use conditional edges on validation_passed, not raw LLM text.
CrewAI: define output_json or Pydantic on tasks; sequential processes do not start the next task until the validator passes.
Getting started: follow the quickstart to wire your first agent, then walk through playbook tutorials for graph editing, simulate mode, and publish checklists.
What to ship first
Teams that succeed start narrow:
- One inbound channel (support email, chat, or ticket API)
- One classification step with a schema validator
- One branch to draft vs escalate
- Validation logs turned on from day one
Expand to fan-out and multi-provider routing after the happy path is stable. The ticket enrichment before routing article shows how fan-out patterns look in production.
Orchestration is not a separate product bolted beside your agents. In ValGuard it is the graph that carries validation, cost policy, and observability on every step — so the handoff that looked simple in the demo still behaves the same at 10,000 requests a day.