Aug 28, 2026

Evaluating multi-agent architectures built with LangGraph Command

Test LangGraph Command routing, state updates, parent navigation, handoffs, resumptions, termination, context transfer, and multi-agent task outcomes.

TUTORIAL9 min readThe Currai team / Engineering

LangGraph Command can combine a state update with navigation, making it useful for routing, handoffs, and resumptions. Evaluation should verify both halves: the correct destination executes and the correct state reaches it. A plausible final answer can hide a wrong transition or silently dropped constraint.

Consult the current LangGraph Graph API documentation for version-specific Command semantics. In particular, resuming an interrupted graph is different from starting a new turn.

Trace commands as transitions

For each command, record source node, destination, graph scope, safe state keys updated, checkpoint, and reason. Represent the source and destination nodes as spans under one graph trace. For subgraph-to-parent navigation, preserve the relationship so reviewers can see where control crossed the boundary.

Build a transition matrix

List valid source, condition, destination, and required state. Generate tests for each valid transition plus invalid and ambiguous conditions.

SourceConditionExpected destinationRequired state
routerbilling requestbilling agentaccount scope
billingrefund approvedparent finalizedecision evidence
any agentmissing permissionhuman reviewproposed action

Use deterministic evaluators for destination and state schema. Use semantic evaluation for whether the routing reason matches the request.

Test handoff context

Handoffs commonly lose user constraints or pass bloated message history. Define the minimum context contract for every target agent. Evaluate missing required fields, irrelevant fields, tenant boundaries, and prompt injection inside transferred content.

The official handoffs guide notes that subgraph handoffs require explicit context engineering. Make that contract visible in traces and tests.

Test termination and recovery

Create cycles intentionally and confirm recursion or step budgets stop them. Simulate tool failure, checkpoint loss, duplicate commands, and resume after a human interrupt. Verify idempotency around side effects.

Measure unnecessary transitions, handoffs per success, tokens, wall time, and cost. Compare against a router or single-agent baseline when Command-driven flexibility adds complexity.

Evaluate the whole architecture

Component tests cannot prove user success. Run multi-turn, cross-agent tasks and score final outcome, policy compliance, context preservation, and resource use. Inspect regressions as trace paths.

Currai maps graph runs, nodes, commands, generations, and tools into one trace tree. Pair that visibility with multi-agent evaluation to validate not only where the graph went, but whether the architecture improved the user's result.

03

Keep going with nearby topics from the Currai blog.