Skip to main content
Install:

Usage

Returning metadata: {"model": msg.model} records which model produced each response, powering the Sovereignty & Portability breakdown in the report.

With tracing

Combine this with patch_anthropic_client to get a full Execution Timeline per result, not just a score. Wrap the patched call in tracer.trace(..., sync=True) so span.trace_id is populated before your function returns. The patch attaches to that span instead of sending its own independent trace, so you still get exactly one trace per case:
patch_anthropic_client on its own (no surrounding span) is fire-and-forget and never returns a trace_id; see Decorator vs. context manager. Wrapping it in tracer.trace(..., sync=True), as shown above, is what makes the id available.
A complete working example is available as anthropic_eval.py in the AgentX-Python repository.