Canyon
Book a Demo
Canyon/Docs/Agent orchestration
AI engine

Agent orchestration

Canyon's code-generation pipeline is five specialised agents wired into a deterministic retry loop. Intent routes. Planner specifies. Builder generates. Validator verifies. Conversation handles everything that isn't a code change. The pipeline is model-agnostic — run it on the provider and model mix that fits your procurement and compliance posture.

BetaUpdated April 2026ReferenceCanyon v1.0

BetaThese docs are in beta
Expect gaps and drift from the live product. Something unclear or missing? Grab 30 minutes with the team and we will walk you through it.
Talk to support

Multi-agent pipeline

When a user message enters the API, the Intent Agent runs first. It routes to one of two branches: the Conversation Agent for multi-turn chat, or the code-generation pipeline (Planner → Builder → Validator) for anything that changes code. Each agent has a single, well-scoped job — this is what makes the system deterministic, auditable, and easy to reason about.

01
Intent
Classifies the request into CONVERSATION, CREATE, MODIFY, CLARIFY, or SECURITY_BLOCKED. Detects scope and impact.
02
Planner
Produces a file-by-file spec referencing design tokens, component contracts, and pattern bundles.
03
Builder
Executes the spec inside an isolated sandbox. Uses read / write / edit and your MCP tools.
04
Validator
Deterministic: runs type checker and linter, verifies design constraints, returns structured errors for the retry loop.

Canonical pipeline diagram

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                              USER REQUEST                                               │
│                     "Create a dashboard with sales KPIs"                                 │
└─────────────────────────────────────────────────────────────────────────────────────────┘
                                           │
                                           ▼
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│  INTENT AGENT (Router)                                                                   │
│  ────────────────────────────────────────────────────────────────────────────────────── │
│  • Classifies: CONVERSATION | CREATE | MODIFY | CLARIFY | SECURITY_BLOCKED              │
│  • Detects scope: ELEMENT | COMPONENT | PAGE | APP                                       │
│  • Estimates impact: ISOLATED | CONTAINED | BROAD                                        │
│  • Identifies target files & constraints                                                 │
│  • Sub-second classification using a fast routing model                                  │
└─────────────────────────────────────────────────────────────────────────────────────────┘
                                           │
              ┌────────────────────────────┴────────────────────────────┐
              ▼                                                         ▼
┌─────────────────────────────────┐                   ┌─────────────────────────────────┐
│  CONVERSATION AGENT             │                   │  CODE GENERATION PIPELINE       │
│  ───────────────────────────── │                   │  ───────────────────────────── │
│  • Multi-turn chat              │                   │                                 │
│  • Governed metric queries      │                   │         ┌─────────────┐         │
│  • Data-aware responses         │                   │         │   PLANNER   │         │
│  • Code inspection tools        │                   │         │   AGENT     │         │
│  • Calls your MCP tools         │                   │         └──────┬──────┘         │
└─────────────────────────────────┘                   │                │                │
                                                      │                ▼                │
                                                      │         ┌─────────────┐         │
                                                      │         │   BUILDER   │         │
                                                      │         │   AGENT     │         │
                                                      │         └──────┬──────┘         │
                                                      │                │                │
                                                      │                ▼                │
                                                      │         ┌─────────────┐         │
                                                      │         │  VALIDATOR  │         │
                                                      │         │   AGENT     │         │
                                                      │         └──────┬──────┘         │
                                                      │                │                │
                                                      │      ┌─────────┴─────────┐      │
                                                      │      ▼                   ▼      │
                                                      │  [SUCCESS]          [FAILURE]   │
                                                      │      │            (retry ≤5x)   │
                                                      └──────┴───────────────────────────┘

The five agents

Each agent is tuned to its role. Intent is a single fast classifier. Validator is not a language model at all.

AgentModeToolsPurpose
IntentFast model, no toolsNoneRoute the request in sub-second time
PlannerReasoning model + toolsDesign tokens, components, patternsProduce a file-by-file build specification
BuilderReasoning model + toolsRead, write, edit, your MCP toolsGenerate and modify the code
ValidatorDeterministic (no model)Type checker, linter, policy checksVerify syntax, types, and constraints
ConversationReasoning model + toolsMetric queries, code inspection, MCP toolsMulti-turn, data-aware chat
Why the Validator isn’t a model
Language models disagree about syntactic correctness. Compilers and linters do not. Keeping the Validator deterministic gives the retry loop a stable objective function and produces fully reproducible pass/fail outcomes.

Model-agnostic execution

The orchestrator treats language models as a replaceable backend. Smaller, faster models handle routing and classification; larger reasoning models handle planning and generation. Canyon runs on the provider mix you want — direct, via your enterprise LLM gateway, or on models hosted in your own cloud account.

BYOM (bring your own model)Per-role model routingPrompt cachingToken budgets per request

Supported model providers

Anthropic ClaudeLive
AWS BedrockLive
Azure OpenAILive
OpenAILive
Google Vertex AIAlpha
Self-hosted (OpenAI-compatible gateway)Alpha
Other enterprise LLM gatewayOn request
Need a specific model or gateway?
Canyon’s model layer is a simple provider interface. If your procurement or data-residency policy requires a specific model, region or gateway we don’t list, tell us — new providers land quickly.

Self-healing retry loop

When validation fails, the orchestrator parses the error output into structured fix instructions and sends them back to the Builder. An optional Diagnostic Agent may intervene when the error parser can’t produce a confident fix. Retries are capped by count, wall-clock time, and same-error detection.

┌──────────────────────────────────────────────────────────────────┐
│  ORCHESTRATOR RETRY LOOP                                         │
│  ────────────────────────────────────────────────────────────── │
│                                                                  │
│    Builder Output ──► Validator ──► Pass? ──► Deploy             │
│         ▲                           │                            │
│         │                           ▼                            │
│         │                        [FAIL]                          │
│         │                           │                            │
│         │              ┌────────────┴────────────┐               │
│         │              ▼                         ▼               │
│         │     Error Parser              Diagnostic Agent         │
│         │         │                         (optional)           │
│         │         ▼                              │               │
│         └─── Fix Instructions ◄──────────────────┘               │
│                                                                  │
│  Limits: 5 retries, 600s timeout, same-error detection (3x)      │
└──────────────────────────────────────────────────────────────────┘

Guardrails

GuardrailLimitPurpose
Retries5Cap cost and wall-clock on pathological plans.
Orchestrator timeout600sHard ceiling from user message to success or failure.
Same-error detection3 repeatsBreak out of fix loops that don’t converge.
Intent classes5Keeps router behaviour small enough to audit.