Skip to content

paulburkhardt/langfuse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

294 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open-source analytics for LLM-based applications

Iterate faster on your application with a granular view on exact execution traces, quality, cost and latency


MIT License Discord Github Repo Stars CI test status Checkly Status Y Combinator W23 Docker Image langfuse npm package langfuse Python package on PyPi


ℹ️ Analytics is in alpha

Langfuse analytics is currently in a closed alpha as the core team works with a group of users to build the most useful analytics platform for LLM apps.

Reach out if you are interested to join the alpha: alpha@langfuse.com

Integrations

Monitor backend executions of LLM app to create nested traces

  • Python SDK
  • Typescript SDK (node, edge)
  • API

Collect user feedback and attach it to backend traces

  • Typescript/JS SDK
  • API

More details: langfuse.com/integrations

Data exploration

Langfuse offers an admin UI to explore the ingested data.

  • Nested view of LLM app executions
  • Segment execution traces by user feedback

Get started

Follow the quickstart with instructions to setup Langfuse locally, self-hosted or using Langfuse cloud

Roadmap

  • Integrations: langfuse.com/integrations
  • Data exploration
  • Langfuse analytics (in alpha)
    • Analytics engine
    • Detailed reports on latency, cost, quality
    • Evals

Run locally

Requirements:

  • Docker: run postgres and dockerized Langfuse to start langfuse quickly
  • Node.js & NPM: apply db migration using ORM (Prisma)

Start

# Clone repository
git clone git@github.com:langfuse/langfuse.git
cd langfuse

# Run server and db
docker compose up -d

# Apply db migrations
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres DIRECT_URL=postgresql://postgres:postgres@localhost:5432/postgres npx prisma migrate deploy

-> Visit http://localhost:3000

Upgrade

# Stop server and db
docker compose down

# Pull latest changes
git pull
docker-compose pull

# Run server and db
docker compose up -d

# Apply db migrations
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres DIRECT_URL=postgresql://postgres:postgres@localhost:5432/postgres npx prisma migrate deploy

Local development

# Install dependencies
npm install

# Run the db
docker-compose -f docker-compose.dev.yml up -d

# create an env file
cp .env.dev.example .env

# Migration
npm run db:migrate

# Optional: seed the database
# npm run db:seed
# npm run db:seed:examples

# Start the server
npm run dev

Self hosted (Docker)

→ Self-hosting instructions

Run Langfuse in CI

For integration testing of SDKs we run Langfuse in CI, see workflows in Python SDK and JS/TS SDK for reference.

Contributing to Langfuse

Join the community on Discord.

To contribute, send us a PR, raise a github issue, or email at contributing@langfuse.com

License

Langfuse is MIT licensed, except for ee/ folder. See LICENSE and docs for more details.

About

Open-source analytics for LLM applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.2%
  • JavaScript 1.5%
  • Other 1.3%