Agent for interacting with Langfuse Observability API
Project description
Langfuse Agent - A2A | AG-UI | MCP
Version: 0.2.0
Overview
Langfuse Agent MCP Server + A2A Agent
Agent for interacting with Langfuse Observability API
This repository is actively maintained - Contributions are welcome!
MCP
Available MCP Tools
The MCP server provides 87 tools across 26 categories:
- Annotation Queues: List, create, get, update, delete queues and items
- Blob Storage Integrations: Get, upsert, check status, delete integrations
- Comments: Create, get comments
- Dataset Items: Create, list, get, delete dataset items
- Dataset Run Items: Create, list dataset run items
- Datasets: List, create, get, delete runs, get runs
- Health: Health check
- Ingestion: Batch ingestion
- Legacy Metrics: V1 metrics
- Legacy Observations: V1 get observations
- Legacy Score: V1 create/delete scores
- LLM Connections: List, upsert connections
- Media: Get, patch, get upload URL
- Metrics: Metrics query
- Models: Create, list, get, delete models
- Observations: Get many observations
- OpenTelemetry: Export traces
- Organizations: Manage organization and project memberships
- Projects: Get, create, update, delete projects and API keys
- Prompts: Version update, get, delete, list, create prompts
- SCIM: Service provider config, resource types, schemas, user management
- Score Configs: Create, get, update score configs
- Scores: Get many scores, get by ID
- Sessions: List, get sessions
- Traces: Get, delete, list, delete multiple traces
Using as an MCP Server
The MCP Server can be run in two modes: stdio (for local testing) or http (for networked access).
Environment Variables
LANGFUSE_URL: The URL of the target service.LANGFUSE_TOKEN: The API token or access token.
Run in stdio mode (default):
export LANGFUSE_URL="http://localhost:8080"
export LANGFUSE_TOKEN="your_token"
langfuse-mcp --transport "stdio"
Run in HTTP mode:
export LANGFUSE_URL="http://localhost:8080"
export LANGFUSE_TOKEN="your_token"
langfuse-mcp --transport "http" --host "0.0.0.0" --port "8000"
A2A Agent
Run A2A Server
export LANGFUSE_URL="http://localhost:8080"
export LANGFUSE_TOKEN="your_token"
langfuse-agent --provider openai --model-id gpt-4o --api-key sk-...
The A2A agent uses agent-utilities for:
- Auto-discovery of MCP tools from mcp_config.json
- Pydantic AI agent with graph-based routing
- Web UI support
- OpenTelemetry integration
- Custom skills support
Docker
Build
docker build -t langfuse-agent .
Run MCP Server
docker run -d \
--name langfuse-agent \
-p 8000:8000 \
-e TRANSPORT=http \
-e LANGFUSE_URL="http://your-service:8080" \
-e LANGFUSE_TOKEN="your_token" \
knucklessg1/langfuse-agent:latest
Deploy with Docker Compose
services:
langfuse-agent:
image: knucklessg1/langfuse-agent:latest
environment:
- HOST=0.0.0.0
- PORT=8000
- TRANSPORT=http
- LANGFUSE_URL=http://your-service:8080
- LANGFUSE_TOKEN=your_token
ports:
- 8000:8000
Configure mcp.json for AI Integration (e.g. Claude Desktop)
{
"mcpServers": {
"langfuse": {
"command": "uv",
"args": [
"run",
"--with",
"langfuse-agent",
"langfuse-mcp"
],
"env": {
"LANGFUSE_URL": "http://your-service:8080",
"LANGFUSE_TOKEN": "your_token"
}
}
}
}
Install Python Package
python -m pip install langfuse-agent
uv pip install langfuse-agent
Repository Owners
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langfuse_agent-0.2.0.tar.gz.
File metadata
- Download URL: langfuse_agent-0.2.0.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f00fc6b87be881693b10651918df633130556d2c73855fcd78df5582b73eceff
|
|
| MD5 |
24a2478496de53f6faacafdc165b9834
|
|
| BLAKE2b-256 |
fae156ba95993cc1c6396b97aaedc9346b48c478b6b5244b9c68ca13ec574ff9
|
File details
Details for the file langfuse_agent-0.2.0-py3-none-any.whl.
File metadata
- Download URL: langfuse_agent-0.2.0-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
400ee34a04f9fffcb81ce580a47bca33e9a5900377c029c052aa8f2621ddb7ac
|
|
| MD5 |
318260d44a3174d0100fa1131204d337
|
|
| BLAKE2b-256 |
d5de037f30ea67fea3371aa86847f7ef1fa6ee5a0cdcbb51fab7f8988a514990
|