Skip to main content

Examples

TraceAgent ships with several runnable examples. Make sure the server is running at http://127.0.0.1:8000 before running any example.

info

Most scripts load configuration from a local .env file, so that is the easiest place to set the backend URL and model settings.

Overview​

ExampleWhat It Demonstrates
Sample AgentMinimal SDK smoke test
LangChain AgentLangChain callback integration
Pydantic AI QuickstartPydantic AI capability, no API key needed
Pydantic AI via OpenTelemetryOTLP ingestion with no TraceAgent code in the agent
Local Model AgentLocal model with SDK
Planner AgentMulti-tool planning with scenarios
Debugger DemoSynthetic debugging scenarios
Rich DemoFull-fidelity trace with all event types

Prerequisites​

Install from source with dev extras:

uv sync --extra dev --extra providers --extra langchain

Running Examples​

All examples follow the same pattern:

uv run examples/<script_name>.py

Some examples accept command-line flags like --scenario or --prompt. Check each example's page for details.

💬 Comments