Skip to main content
Context Evaluator scores how much of one agent’s output reaches the next agent — plus whether each agent stayed inside its token budget — all without a live LLM call.

Quick Start

1

Score a 2-agent workflow

2

Add a token-budget ledger

3

Run inside an EvalSuite


How It Works

Context Evaluator reads the workflow trace and measures how much of each agent’s response tokens survive into the next agent’s request.

When to choose which dimension

Pick the dimensions that match the data you have.

Configuration Options

Full parameter narrative lives in the SDK source. Methods ContextEvalResult properties: handoff_score, budget_score, overall_score (average of dimensions present), content_loss_detected, plus to_dict().

Common Patterns

Gate a workflow in CI, catch handoff regressions, or combine with the Harness Evaluator.

Best Practices

Handoff scoring needs both llm_request and llm_response events for each agent. Pass the complete workflow.trace_events, not a single summary string.
Scoring walks adjacent pairs in agent_order. List the agents in the exact sequence they run so each handoff is compared correctly.
Entries with budget_tokens of 0 score a neutral 5.0. Set a real budget only where you want a gate.
No live model call runs, so scores are reproducible and require no API key.

Evaluation Suite

Run all four evaluators as one CI gate

Evaluation Loop

Iterative agent → judge → improve loop

Judge

LLM-as-judge for evaluating outputs

Harness Evaluator

Score Interactive Test Harness traces

CHL Engineering

The Context / Harness / Loop rubric this evaluator scores against.