1. Create a project
Sign in to the platform and create a new project, one per agent you monitor. Copy the API key the Quick Start page shows you (the copy is recorded on the project’s API Keys page), or create one on the API Keys page; keys start withbv_live_. Save it somewhere secure; it won’t be shown again.
2. Install the SDK
3. Initialize before importing your LLM SDK
initialize() patches your LLM client, so it must run before the LLM SDK is imported. Call it once at the top of your entry file:
instrumentModules; see Installation. In Next.js, put the call in instrumentation.ts and always pass instrumentModules; see the Next.js guide.
4. Wrap agent work in sessions
Wrap each agent run inwithSession so every LLM and tool call is linked under one session id. Optionally wrap distinct units of work in task() for sharper task boundaries:
withSession you still get raw traces, but they can’t be linked into sessions or segmented into tasks.
On serverless (Vercel, Lambda, Cloud Functions), await flush() before each handler returns, or the spans are silently lost; see Flush on serverless:
5. Route your LLM calls through Belvedir (optional)
Belvedir can also execute your LLM calls. Point any OpenAI-compatible client at the router and use your Belvedir key in place of the provider key; keep the model each call already names.6. View your tasks and task groups
Traces appear in the dashboard within seconds. Shortly after a session goes quiet, it is segmented into tasks: open Tasks to see each one and Task Groups to see tasks of the same type gathered together. How it works explains the stages.Next steps
- Python quickstart if your agent is in Python.
- Importing traces to bring over history from another observability platform.
- Next.js and Vercel, AI SDK, or custom agent loops for stack-specific setup.
- Common issues if no traces show up.