CostKey

A self-hosted LangSmith alternative

Trace every agent run, see why it failed, score its quality and know what it cost. On your own machines, with no proxy and no seat pricing.

LangSmith is LangChain's hosted platform for tracing and evaluating LLM apps. It is a good choice when your stack is LangChain and you want datasets, experiments and a prompt hub in one place. CostKey is for teams that want to run their agent observability themselves, see every run without a proxy, and keep spend under control.

CostKey and LangSmith side by side

CostKeyLangSmith
Self-hostingFree, one command with DockerEnterprise plan only
PriceFree to run yourselfFree Developer plan (1 seat, 5k traces a month); Plus is $39 per seat a month
How calls are capturedSDK watches the calls your app already makesSDK tracing, best with LangChain and LangGraph
FrameworksOpenAI Agents SDK, LangGraph, CrewAI, Vercel AI SDK, Claude Agent SDK, Mastra and 10 more, plus OpenTelemetryLangChain and LangGraph first, others through its SDK and OpenTelemetry
The line of code behind a callYesNo
Cost for non-token units (characters, audio seconds, searches)45+ providers priced per componentToken cost for LLM calls
Budgets and a kill switchYesNo
Datasets and evalsLabel calls from production runs; evals run from your own code (TypeScript)Datasets, offline experiments and annotation queues
Browser agent replayPlaywright and Puppeteer runs, plus screenshot replay for computer-use agentsNot listed
Prompt hub and playgroundNoYes

LangSmith details from langchain.com/pricing, checked 2026-10-20.

Why teams look for a LangSmith alternative

They want to self-host without an enterprise contract

LangSmith runs on your own infrastructure only on its Enterprise plan. CostKey starts on your machines with one command, so prompts and responses never leave your network.

Seat pricing adds up

Every extra developer on LangSmith Plus is another $39 a month. Running CostKey yourself has no seat or trace limits.

Their agents are not all LangChain

CostKey has integrations for the OpenAI Agents SDK, LangGraph, CrewAI, the Vercel AI SDK, the Claude Agent SDK, Mastra, Pydantic AI, Google ADK and more. Model calls are captured from HTTP, so calls a framework makes on its own still show up, attributed to the step that made them.

Cost needs to be right, and controlled

CostKey prices every component of a provider's bill (input, cached input, output, audio seconds, characters, searches) across 45+ providers, and ties each call to the function, file and line that made it. Budgets can cover an agent, a feature, a customer or a whole provider, and the kill switch refuses calls before the provider bills them.

Where LangSmith is ahead

LangSmith has a prompt hub, a playground, human annotation queues and a wider set of offline experiment tools. CostKey builds datasets from labelled production calls and runs evals from your own code, which covers testing a new model or prompt on real runs, but it has no prompt hub or playground. If offline prompt iteration is your main job, LangSmith or Langfuse will fit better today.

Moving from LangSmith

Keep your LangChain or LangGraph code. Add CostKey's callback handler:

python
from costkey.integrations.langchain import CostKeyCallbackHandler

result = graph.invoke(inputs, config={"callbacks": [CostKeyCallbackHandler()]})

Chains, graph nodes, agents, tools and retrievers become spans, and every model call inside them is priced. See LangGraph observability.

Questions

Is LangSmith free?

LangSmith has a free Developer plan with one seat and 5,000 base traces a month. Paid plans start at $39 per seat a month. CostKey is free to run on your own machines.

Can I self-host LangSmith?

Self-hosted LangSmith is part of its Enterprise plan. CostKey self-hosts with one command: curl -fsSL https://costkey.dev/install.sh | sh.

Does CostKey work with LangChain and LangGraph?

Yes. Add CostKeyCallbackHandler to your callbacks, in Python or TypeScript. See LangGraph observability.

Does CostKey proxy my model calls?

No. The SDK observes the calls your app already makes and reports them in the background. Requests go straight to your providers with your keys.

Try it on your own machines

One command starts Postgres, the server and the console with Docker.

bash
curl -fsSL https://costkey.dev/install.sh | sh