Apps traced with LangSmith keep their code: the langsmith SDK for Python or JavaScript, @traceable / traceable, and LangChain and LangGraph tracing. Point the SDK at Open Token with three environment variables. Every run then lands on Traces, Runs and the agent dashboards, with the cost of each model call. Tested with langsmith 0.13 and 0.14 (Python, with LangGraph and ChatOpenAI) and 0.10 (JavaScript).
1. Create an ingest key per environment
Under API keys, create a key with scope Ingest in the project you want the traces in. A project is one environment, so create one key for each environment you trace, for example QA, staging and production.
2. Change three variables
# Keep LANGSMITH_TRACING as it is; change these three. Nothing in your code changes.
export LANGSMITH_TRACING="true"
export LANGSMITH_ENDPOINT="https://getopentoken.com/api/langsmith"
# An Open Token ingest key (API keys → New key → scope "Ingest") of the project and environment the traces go to.
export LANGSMITH_API_KEY="${OT_INGEST_KEY}"
# Keep your project names: "<app> - Dev/QA/Prep/Prod" must match the key's environment.
export LANGSMITH_PROJECT="Support App - Prod"LANGSMITH_ENDPOINTandLANGSMITH_API_KEYsend the SDK's calls to Open Token. The key decides the project and environment.- Keep your LangSmith project names. A name like
Support App - Prod(orSupport App - QA,- Dev,- Prep,-Prod) is read as the app and its environment. Prep counts as staging. The environment has to match the key's: a QA name with a production key is refused with a clear message, so traces never land in the wrong environment. - Agents come from
agent_namein the run's metadata, as LangGraph multi-agent apps set it, so each agent gets its own dashboard. Traces without one are listed under the app. - Prompts and outputs are stored only when the project captures content (Trace settings → Content capture, owners only). Otherwise Open Token keeps metadata: names, timing, tokens, cost, errors, metadata and tags, and never the text.
- The SDK compresses its batches (zstd from Python, gzip from JavaScript) because Open Token tells it to. There's nothing to configure.
3. Check Traces and Runs
Run your app as usual, then open Traces and pick the project.
- Each LangSmith trace is one trace, with the run tree as nested spans: the graph, its nodes, model calls and tools. A run that's still going shows right away and completes when it ends.
- Runs groups traces by the thread keys LangSmith uses:
session_id,thread_idorconversation_idin metadata. LangGraph'sthread_idworks as is. - Every model call has its cost at the model's list price, from the token usage the SDK reports. That includes OpenAI called directly (gpt-4o, gpt-4.1, gpt-5.x), with cached input at its own rate. The model is the one that answered, not a label in your metadata.
- No
Failed towarnings from the SDK in your app's logs means every batch was accepted.
4. Search by tag or metadata
In Traces, search with key=value or a key:value tag, for example user_phone=+1 555 0100 or thread_id=…. The search covers the 14 days up to the chosen day. Trace settings lists the searchable keys: user_phone, thread_id, session_id, conversation_id, agent_name, user_chat_id and account_id unless you change them.
Personal data in tags and metadata is hashed before it's stored, in every content mode. The default sensitive keys are user_phone, original_phone_number, phone, phone_number, username, user_name, origin_name, email and user_email. Their values become a keyed hash (h:…) that's unique to your organization. Searching for the original value still finds the trace, because Open Token hashes what you type the same way. Phone numbers match with or without spaces and dashes. Edit both lists in Trace settings.
What maps where
| LangSmith | Open Token |
|---|---|
Project <app> - <environment> | App in the key's project and environment |
agent_name in metadata | Agent, with its own dashboard |
| Trace and run tree | Trace with nested spans |
Run type (llm, chain, tool, retriever, prompt) | Span kind (model call, step, tool, retrieval) |
Thread (session_id, thread_id, conversation_id) | Run on the Runs page |
| Metadata and tags | Span attributes langsmith.metadata.* and langsmith.span.tags, sensitive values hashed |
| Search by tag or metadata | Search on Traces |
| Token usage and cost | Metered cost per model call, cached input apart |
Feedback (create_feedback) | Stored with its key and score; comments aren't kept |
| Datasets, evaluations, prompts (Hub) through the SDK | Not supported: those calls answer 404. Where Evals is enabled, rebuild datasets and experiments there (below) |
Datasets, experiments and evaluators (Evals)
Where the Evals module is enabled for your organization, recreate them in Open Token. The SDK's dataset, evaluation and prompt calls still answer 404, so nothing moves on its own, and prompts stay in your code or configuration.
| LangSmith | Open Token Evals |
|---|---|
| Dataset of examples (inputs and reference outputs) | Dataset built from your stored traces: each example keeps the trace's input, its final answer as the reference, and its steps and tool calls |
| Dataset version or tag | Published version, never changed after it's published, with an optional tag |
| Splits | Splits (dev, holdout or your own names) |
Experiment (evaluate()) on a dataset | Experiment on a dataset version, or an Agent Replay on a sample of traces, with candidate models from your own provider connections (BYOK) and a spend cap |
| Comparing experiments | Results per candidate against the recorded run: cost, latency, errors and scores, paired differences with 95% intervals, and a recommendation per role |
| Heuristic and custom code evaluators | Heuristic evaluators (exact match, regex, JSON, length, similarity, refusal, personal data, tool calls, trajectory) and code evaluators |
| LLM-as-judge and pairwise evaluators | LLM judge and pairwise evaluators, on your own provider connections |
| Summary evaluators | Summary evaluators (mean, median, pass rate, min, max of a score) |
| Feedback and annotations | Scores (POST /v1/evals/scores), end-user feedback, and human review by members or reviewers |
Assistants can do the same through the MCP server: list datasets and experiments, add traces to a dataset, plan and start an Agent Replay, and read its results.
Cutover checklist
- List every service and environment that sets
LANGSMITH_*, and the LangSmith project each one uses. - Check the code for
pull_prompt, Hub prompts,evaluate()or datasets. They go toLANGSMITH_ENDPOINTtoo, so move those prompts into your code or configuration first, or keep that service on LangSmith. - Create one ingest key per project and environment, and store each one in your secret manager.
- In Trace settings, check the sensitive and searchable keys against the metadata and tags you send.
- If you need prompts and outputs, an owner turns on content capture for the project.
- Switch staging first. Check Traces, Runs, search and the agent dashboards, and look for SDK warnings.
- Switch production one service at a time. Compare the trace count on Traces with LangSmith's last full day.
- Export your datasets from LangSmith (each one downloads as CSV or JSONL) before you close the account. Open Token doesn't import them: where Evals is enabled, build new datasets from the traces it stores.
- Once everything reports to Open Token, set a usage limit in LangSmith (Settings → Billing and Usage → Usage limits), so a forgotten service can't keep billing.
Traces are kept 14 days by default and up to 400 days by plan. History already in LangSmith isn't imported.
Open Token bills traces the way LangSmith does: each root trace counts once, whatever the number of runs in it, at US$3.00 per 1,000 on top of your plan. A root run's provisional post and its later patch, or a batch the SDK sends twice, count once. Billing shows this month's count.
Alternative: LangSmith's OpenTelemetry export (Python)
If you already run an OpenTelemetry pipeline, the Python SDK can export its runs as OpenTelemetry spans and send them only to Open Token's OTLP endpoint. Most OpenTelemetry exporters add /v1/traces to OTEL_EXPORTER_OTLP_ENDPOINT, but LangSmith's uses the value as given, so the URL ends in /v1/traces. The same thread keys group runs on Runs.
pip install "langsmith[otel]"Limits
The SDK reads its batch size from Open Token: up to 4 MB per request before compression. A run's inputs or outputs can be up to 512 KB each on Enterprise (pick the limit in Trace settings). Ingest has a per-key limit of spans per second, set by your plan. Above it the endpoint answers 429 and the SDK retries. See limits.