Product — Agent Workflows

Routing built
for the loop.

Most LLM gateways route one prompt at a time. Agents run 50 calls inside one workflow with shared budget, evolving state, and tool use. ArcRouter is built for that shape.

Agent Workflows

Built for the loop.

Routing a single chat message is easy. Routing 50 calls inside one agent run — with budgets, fallbacks, step semantics, and tool guarantees — is what we built for.

Step routing

X-Agent-Step

Tell the router which step of a workflow this request is. simple-action → SIMPLE tier, code-generation → COMPLEX, reasoning → REASONING, verification → council. Override the prompt classifier when your agent already knows the answer.

Spend caps

Workflow budgets

Set total_budget_usd for a session. The router auto-downgrades models at 60%, 80%, 95% spent. Returns 402 when exhausted. Per-workflow telemetry at /v1/workflow/{id}/usage — spend, models used, tier distribution.

Stickiness

Session pinning

Pass session_id and the router remembers which model worked. Subsequent calls in the same session pin to that model (1h TTL). Stops a multi-step flow from jumping providers mid-conversation.

Reliability

Tool-call guarantees

Set tool_choice: "required" and the router enforces it. Fails over to another tool-capable model if the first emits no_op natural-language instead of calling the tool. Detects tools[] and prefers tool-capable models automatically.

Used by agents running long, budgeted workflows. The router treats each step as its own routing decision while keeping spend bounded.

Read the spec
Example

One workflow, four routing decisions.

// 1. Plan — needs reasoning
const plan = await arc.chat("Outline the migration steps", {
  agentStep: "reasoning",            // X-Agent-Step → REASONING tier
  workflowBudget: { sessionId: "wf-1", totalBudgetUsd: 0.50 },
});

// 2. Code-gen — needs COMPLEX, tool-capable
const code = await arc.chat("Write the migration script", {
  agentStep: "code-generation",      // → COMPLEX tier
  toolChoice: "required",            // enforce tool calls
});

// 3. Verify — multi-model
const review = await arc.chat("Does this script handle the rollback?", {
  agentStep: "verification",         // → council mode
});

// 4. Apply — simple action, cheap
const result = await arc.chat("Summarize what was applied", {
  agentStep: "simple-action",        // → SIMPLE tier
});

// Workflow auto-downgrades at 60%/80%/95% of budget.
// Returns 402 when exhausted.
const usage = await arc.workflow.getUsage("wf-1");