Skip to main content
The integrations layer lets you connect multivon-eval to whatever framework your agent runs on. It provides three base abstractions you can extend or use directly:
  • AgentTracer — wrap any agent to capture execution traces
  • CaseImporter — pull pre-existing runs from an observability platform
  • ManualTracer — instrument agents that don’t use a callback framework
Install the extras you need:

ManualTracer

For any agent that doesn’t use a callback framework. You call the tracer explicitly from inside your agent code.
tracer.step(thought) returns a context manager. Inside it, call record_tool_call(name, arguments, result) for each tool the agent uses and set_output(text) for the final answer. You can also record calls at the top level without a step context:

LangChainTracer

For LangChain/LangGraph agents. Hooks into BaseCallbackHandler to capture tool calls and agent steps automatically. Your agent must accept and forward **kwargs so the callback handler reaches the underlying chain:
The tracer captures:
  • on_agent_action — agent’s reasoning thought and which tool to call
  • on_tool_start / on_tool_end — tool inputs and results
  • on_tool_error — errors captured as [ERROR: ...] in the result
  • on_agent_finish — final output

LangSmithTracer

Same as LangChainTracer but also logs runs to LangSmith for observability. Teams already using LangSmith get both the eval trace and the LangSmith run record with no extra work.
If langchain-core or langsmith is not installed, it silently falls back to trace-only mode (no LangSmith upload).

LangSmithImporter

Pull existing LangSmith runs as eval cases — no need to re-run your agent.
run_on_cases grades each explicitly paired saved output without rerunning the target. Judge-based graders may still make API calls. Missing target latency stays unknown. See extension compatibility for the development deprecation and migration of as_model_fn.

Filtering

Each imported EvalCase has:
  • input — extracted from run.inputs (auto-detected or set via input_key=)
  • agent_trace — populated from child runs (tool calls, LLM steps)
  • metadata["_output"] — original run output (pass with its case to run_on_cases)
  • metadata["_run_id"] — LangSmith run ID
  • metadata["_project"] — project name
  • metadata["_error"] — error string if the run failed

How tracers wire into EvalSuite

The suite calls tracer.reset() before each case, runs the (instrumented) model function, then calls tracer.get_trace() and attaches the result to the case. The trace is then available to all agent evaluators. Tracers require workers=1. Automatic worker selection uses 1 when a tracer is present. Tracers are stateful; parallel cases would mix up their traces.

Building a custom tracer

Extend AgentTracer to integrate with any framework:
For callback-style frameworks, extend CallbackTracer instead — it implements instrument() for you:

Building a custom importer

Extend CaseImporter to pull runs from any observability platform:
Implement load() and use run_on_cases for saved-output grading. The legacy as_model_fn() helper is deprecated in development builds.