Skip to main content
Sovara records supported LLM, MCP, and explicitly traced tool calls inside an SDK run. Every Python integration starts with one project-bound SovaraClient.

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 supported framework tools such as @function_tool and MCP calls automatically. Do not add @trace to those tools 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.py, 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. log_input() and log_output() 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