Langfuse integration
Langfuse LLM observability public API. Read the traces, observations and sessions an application produced, attach and read evaluation scores, manage versioned prompts with deployment labels, build datasets and dataset items for offline evaluation, read dataset runs, query aggregated metrics, and post comments. Works against Langfuse Cloud and against a self-hosted deployment: the host is part of the credential, cloud.langfuse.com for the EU region and us.cloud.langfuse.com for the US region. Authentication is HTTP basic with a project public key as the user and the matching secret key as the password, so every call is scoped to one project.
Say what should happen.
The workflow builds itself.
Common Langfuse use cases
- charting daily cost per model
- tracking an evaluation metric over time
- finding the dataset name to add items to
- inspecting the trace behind a bad answer
- computing spend per model over a time window
- validating credentials before a batch export
- checking the input schema before pushing items
- exporting a dataset for an offline evaluation run
- creating a regression set before an evaluation run
- listing the conversations started in a time window
What you can do with Langfuse
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Dataset, 3 operations
create_datasetCreate datasetPOSTCreates an evaluation dataset, optionally with input and output JSON Schemas.get_datasetGet datasetGETReturns a dataset by name with its description and schemas.list_datasetsList datasetsGETLists evaluation datasets with their schemas and metadata.
Prompt, 3 operations
create_promptCreate promptPOSTCreates a new version of a prompt, optionally labelling it as production.get_promptGet promptGETReturns the body and config of a prompt, by version number or by label.list_promptsList promptsGETLists the prompts of the project with every version number and label.
Score, 3 operations
create_scoreCreate scorePOSTAttaches a numeric, boolean, categorical or text score to a trace, observation, session or dataset run.delete_scoreDelete scoreDELETEDeletes one score from a trace, observation or session.list_scoresList scoresGETLists scores attached to traces, observations, sessions or dataset runs.
Trace, 3 operations
delete_traceDelete traceDELETEDeletes a trace and the observations attached to it.get_traceGet traceGETReturns a single trace together with its observations, its scores and its cost and latency.list_tracesList tracesGETLists traces filtered by user, session, name, tags or time window.
Dataset item, 2 operations
create_dataset_itemCreate dataset itemPOSTAdds an item to a dataset, or overwrites an existing one with the same id.list_dataset_itemsList dataset itemsGETLists the items of a dataset, optionally as of a past timestamp.
Observation, 2 operations
get_observationGet observationGETReturns one span, generation or event with its input, output and usage.list_observationsList observationsGETLists spans, generations, events and tool calls, with cost, token and latency fields available on request.
Session, 2 operations
get_sessionGet sessionGETReturns a session and the traces recorded under it.list_sessionsList sessionsGETLists session identifiers with their creation date.
Comment, 1 operation
list_commentsList commentsGETLists comments attached to traces, observations, sessions or prompts.
Dataset run, 1 operation
list_dataset_runsList dataset runsGETLists the evaluation runs executed against a dataset.
Health, 1 operation
get_healthGet healthGETReturns the status and version of the Langfuse deployment.
Metric, 1 operation
get_metricsGet metricsGETReturns aggregated counts, costs and latencies grouped by dimensions of your choice.
Use Langfuse from Claude Code, Cursor or Codex
Connect Langfuse in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Langfuse operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Langfuse
- Create your workspace
Sign up free. Nothing to install.
- Connect Langfuse once
Add your Langfuse connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Langfuse integration FAQ
What can you do with the Langfuse integration?
LiveContext exposes 22 operations on Langfuse, covering dataset, prompt, score and trace. Common uses include charting daily cost per model, tracking an evaluation metric over time and finding the dataset name to add items to.
