Skip to main content

Agent for interacting with Langfuse Observability API

Project description

Langfuse Agent - A2A | AG-UI | MCP

PyPI - Version MCP Server PyPI - Downloads GitHub Repo stars GitHub forks GitHub contributors PyPI - License GitHub

GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues

GitHub top language GitHub language count GitHub repo size GitHub repo file count (file type) PyPI - Wheel PyPI - Implementation

Version: 0.1.7

Overview

Langfuse Agent MCP Server + A2A Agent

Agent for interacting with Langfuse Observability API

This repository is actively maintained - Contributions are welcome!

MCP

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-...

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

GitHub followers GitHub User's stars

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

langfuse_agent-0.1.7.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langfuse_agent-0.1.7-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file langfuse_agent-0.1.7.tar.gz.

File metadata

  • Download URL: langfuse_agent-0.1.7.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for langfuse_agent-0.1.7.tar.gz
Algorithm Hash digest
SHA256 48677136af6f24020fd86e33dc9015e4a1e1abd0b077c3842d046e58fbcd9ac7
MD5 23730f65aedcf6a1103c446913c263d1
BLAKE2b-256 b163dfa0d39e590b309c8d8904f525ecee0a355a2c9afdc899420b6de36a99ea

See more details on using hashes here.

File details

Details for the file langfuse_agent-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: langfuse_agent-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for langfuse_agent-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 66839d49c62d8aae53b5271489e3ecf04294582521bf18214dad8af704734cac
MD5 cf015e25aedd02ee3da2ad740a411c4c
BLAKE2b-256 73c94734f72db15828c9374ad41a9f4774f8f1e1b62d96aa9384ba5d65a2caa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page