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: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 asweather_agent.ts, then run it normally:
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:

Choose Warmer City step:

Next steps
- Use the SDK for subruns, persistent run IDs, lessons, and metadata.
- API reference for the exact public surface.
- Troubleshooting for missing runs or steps.