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.
as_model_fn(cases) returns a replay function that returns each run’s original output in order — no model calls needed.

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 (used by as_model_fn)
  • 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 (the default). Tracers are stateful — running cases in parallel would mix up 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:
as_model_fn() is provided by the base class — no need to implement it.