Documentation Index
Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
bt setup configures Braintrust integrations for coding agents (Claude, Copilot, Cursor, Codex, Gemini, Opencode, Qwen). Run it once to give your agent access to Braintrust skills, workflow documentation, and MCP tools (optional).
On first run, bt setup walks you through authentication and API key creation interactively. No manual API key setup is required beforehand. The created API key is exported to the setup process (so sub-commands like bt setup instrument work immediately) and printed with a ready-to-copy export BRAINTRUST_API_KEY=<key> command. Run it to make the key available in your current terminal session. After a successful run, bt setup displays a verification prompt.
Running
bt setup without --skills or --mcp is ephemeral. It authenticates and creates an API key but does not install persistent agent skills or MCP config. Pass --skills to install skills or --mcp to configure MCP. To install only skills after initial setup, run bt setup skills.--no-input. This requires --project <NAME>, either --api-key <KEY> or BRAINTRUST_API_KEY, and --agent <AGENT> unless exactly one supported agent is on PATH.
bt setup skills
Writes agent-specific skill files so your agent knows how to use Braintrust. Also prefetches workflow docs. Install locations by agent: Claude (.claude/skills/braintrust/SKILL.md), Copilot (.copilot/skills/braintrust/SKILL.md), Cursor (.cursor/rules/braintrust.mdc), Gemini (.gemini/skills/braintrust/SKILL.md), Qwen (.qwen/skills/braintrust/SKILL.md).
bt setup instrument
Runs a coding agent against your repo to automatically add Braintrust SDK instrumentation (tracing, logging). The agent detects your project language, installs the exact SDK version, instruments your LLM clients, runs the app to verify the integration, and outputs a Braintrust permalink to the emitted trace.- Verifies that
BRAINTRUST_API_KEYis set — aborts if missing - Detects the project language from build files:
package.json→ TypeScript,requirements.txt/pyproject.toml→ Python,pom.xml/build.gradle→ Java,go.mod→ Go,Gemfile→ Ruby,.csproj→ C# - Looks up and installs the latest exact SDK version (never uses
latest) - Instruments LLM clients in the app entry point
- Runs the app to verify traces are emitted
- Outputs a Braintrust permalink to the captured trace
BRAINTRUST_API_KEY set.
Supported languages: Python, TypeScript/JavaScript, Go, Java, Ruby, C#
Instrumentation approach by language:
| Language | SDK package | Instrumentation |
|---|---|---|
| Python | braintrust | braintrust.init_logger() + braintrust.auto_instrument() or manual wrappers |
| TypeScript | braintrust | initLogger() + wrapOpenAI() / framework wrappers |
| Go | github.com/braintrustdata/braintrust-sdk-go | braintrust.New() + Orchestrion compile-time instrumentation |
| Java | dev.braintrust:braintrust-sdk-java | Braintrust.get() + BraintrustOpenAI.wrapOpenAI() |
| Ruby | braintrust gem | require "braintrust/setup" or braintrust exec wrapper |
| C# | Braintrust.Sdk NuGet | Braintrust.Get(config) + BraintrustOpenAI.WrapOpenAI() |
| Flag | Description |
|---|---|
--language <LANG> | Force language (repeatable): python, typescript, javascript, go, java, ruby, csharp |
--agent-cmd <CMD> | Override agent command (replaces the built-in default) |
--quiet / -q | Suppress streaming agent output |
--interactive / -i | Run agent in interactive mode |
--yolo | Grant full permissions and run in background without prompting |
bt setup mcp
Adds the Braintrust MCP server to your agent’s config so it can query Braintrust data directly.bt setup doctor
Diagnoses your coding agent setup and reports what is and isn’t configured.Common flags
| Flag | Description |
|---|---|
--agent <AGENT> | Agent to configure: claude, codex, copilot, cursor, gemini, opencode, qwen (repeatable; auto-detected if omitted) |
--local | Configure for the current git repo |
--global | Configure user-wide |
--workflow <WORKFLOW> | Prefetch docs for a workflow: instrument, observe, annotate, evaluate, deploy (repeatable) |
--no-input | Non-interactive mode for CI; requires --project, credentials, and --agent unless one agent is auto-detected |
--refresh-docs | Clear and re-fetch any previously downloaded docs |