Skip to main content
Sovara records supported LLM, MCP, and framework tool calls inside an SDK run. Use trace for important custom operations that are not already captured.

Install

Follow Installation to use an existing Sovara environment or choose a local, remote, or headless setup. Then add the packages used by this example:
Set OPENAI_API_KEY in the environment before running the example.

A complete example

This example uses two child agents to compare the weather in Zurich and Boston. Their model and framework tool calls are recorded automatically; trace records the custom comparison step.
Sovara records OpenAI Agents tools created with tool() and MCP calls automatically. Do not wrap those tools in trace as well; reserve it for important operations that are not already captured.
Subruns are optional, but provide a useful abstraction for grouping child agents or delegated phases into expandable units.

Verify one run

Save the example as weather_agent.ts, then run it normally:
Open the weather-agent project in Sovara to inspect the run. A run typically corresponds to one chat session or one workflow execution. logInput() and logOutput() populate the Input and Output columns in the Runs table, so you can scan results without opening each run: Sovara Runs table showing the logged weather comparison input and output Open the run to see both weather-agent subruns, their LLM and tool calls, and the final Choose Warmer City step: Sovara trace showing Zurich and Boston weather-agent subruns and the final city comparison

Next steps