> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebench.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

> Connect application events from JavaScript, Python, Go or Rust.

For setup and management entirely from a coding agent, see the [headless workflow](/guides/headless) and [SDK platform clients](/sdk/platform).

## Copy this into your coding agent

Paste into Cursor, Codex, Claude Code, or another coding agent in your project.

```text theme={null}
Set up Bench in this repository using https://docs.usebench.ai/sdk/quickstart.
Inspect the app and use the installation command and setup key from my Bench SDK page.
Keep the key server-side, start with metadata-only capture, and label the environment.
Instrument one real app operation, send a synthetic request, and flush the events.
Confirm Bench received it. Show what changed and any steps I still need to complete.
```

<Note>Beta. Choose a language below for installation, tracing and real app tests.</Note>

Choose your language: [JavaScript/TypeScript](/sdk/typescript), [Python](/sdk/python),
[Go](/sdk/go) or [Rust](/sdk/rust).

## Set up with your coding agent

<Steps>
  <Step title="Open SDK in Bench">
    Open **SDK** in the sidebar, or **Production → Set up SDK** inside a system.
    Choose your language. Bench prepares your account setup key automatically.
    SDK access is included on every plan.
  </Step>

  <Step title="Copy the agent prompt">
    Under **Set up using a coding agent**, select **Copy prompt**.
    Paste it into Claude Code, Cursor, Codex, or another trusted coding agent in your application repository.
    The prompt includes your setup key, installation command and API endpoint. Your coding agent reads the repository, branch and deployment configuration from the open project.
    Use a trusted agent: that prompt contains a secret. Do not commit or share it.
    You can return to setup to copy the same account key. Revoke it from **API keys** if needed.
  </Step>

  <Step title="Verify an interaction">
    The agent adds server-side instrumentation and sends a synthetic metadata-only
    trace. SDK setup shows **Waiting for first event**, then **SDK events received**
    once ingestion succeeds. Open **AI systems**, select the system,
    then **Production**.
  </Step>
</Steps>

The automatic setup key belongs to your account and has a zero evaluation cap.
Creating it does not start a paid evaluation. For narrower access, create a key
restricted to specific repositories in **API keys**. Manage or revoke keys there.

Set an explicit `environment`, such as `staging` or `production`, in the SDK options
to distinguish received deployments. Connection status shows the last accepted
event for a system/environment, not a live heartbeat or proof that every route has
instrumentation. A silent application cannot be distinguished from an absent SDK
using telemetry alone.

## Choose your language

| Language                | Guide                                        | Includes                                               |
| ----------------------- | -------------------------------------------- | ------------------------------------------------------ |
| TypeScript / JavaScript | [TypeScript and JavaScript](/sdk/typescript) | Tracing, real app tests and scripted conversations     |
| Python                  | [Python](/sdk/python)                        | Sync and async tracing, real app tests and simulations |
| Go                      | [Go](/sdk/go)                                | Context-aware tracing, real app tests and simulations  |
| Rust                    | [Rust](/sdk/rust)                            | Async tracing, real app tests and simulations          |

Each guide includes a coding-agent prompt, a connection example and lifecycle
instructions. Automatic framework adapters are coming soon.

## What Bench recognizes

`systemName` names the agent or workflow. If omitted, the repository name is used.
The first trace creates a system for that name, repository and branch.
This identifies where events came from. You can add its intended business outcome
on the system’s **Understanding** page.
GitHub scans or uploaded prompts still provide the prompt definitions needed for
prompt benchmarking. Systems connected only through the SDK can receive and display traces
before those definitions are connected.

Wrap agents and tools using your language guide. Follow its context instructions
to retain parent IDs. Use a real prompt component ID from Bench to connect a span
to discovered criteria, or link it from Production. Do not invent component IDs.

## Frameworks

Wrap your existing Node/server call for Vercel AI SDK, Mastra, OpenAI Agents,
LangChain, LangGraph, Deep Agents or a custom workflow. Await the full invocation
and instrument the tools whose behavior you want to inspect.
This release does not automatically patch those libraries. It is not
an OTLP collector, browser SDK or a guarantee of complete agent tracing.
Use the separate [Python](/sdk/python), [Go](/sdk/go) and [Rust](/sdk/rust) clients
for those languages. More automatic framework adapters are coming soon.

For a reusable coding-agent guide, see `skills/bench-sdk/SKILL.md` inside the
installed package. Follow [production checks](/sdk/production-checks) when ready to evaluate.

## Find your activity

Open an AI system's **Production** tab. Recent interactions appear after the SDK sends them. The **Quickstart** button opens this guide in a new tab; **Set up SDK** opens the in-app setup. Capturing metadata does not start an evaluation.

## Use development, staging and production

Set `BENCH_ENVIRONMENT` in each deployment. Open **Event environment** in a system’s Production tab to select the events you want to inspect.
A staging event confirms staging receipt; it does not mark production as connected.
Older events without an environment appear under **Not specified**.

Environments share your Bench account, permissions and evaluation allowance. A
label does not switch your application’s payment, email or database credentials.
Use separate test credentials and fixture data when testing side effects. Learn
more in [environments](/guides/environments).

## If no event arrives

Check the endpoint and API key, confirm the instrumented code ran,
and flush before a short-lived process exits. Look for SDK delivery errors in your
server logs without printing credentials. A deployment with no recent requests
may have no recent events even when the SDK is installed.

After confirming receipt, replace the synthetic callback with an existing app
operation. For long-running servers, reuse the Bench instance and call `shutdown()`
on shutdown. For serverless handlers, await `flush()` before the request lifecycle ends.

## Trace identifiers

The SDKs generate trace and span IDs automatically. If you send events directly,
use a nonzero 32-character lowercase hexadecimal trace ID and a nonzero
16-character lowercase hexadecimal span ID. Parent span IDs use the same format.
Do not use emails, customer IDs or other personal information as identifiers.
Invalid identifiers are rejected.
