Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Vikingbot Langfuse Local Setup
Author: OpenViking Team Status: Draft Date: 2026-04-29
1. Purpose
This document describes how to bring up a local Langfuse service for vikingbot, connect it through openviking-server --with-bot, and verify that traces are arriving.
This guide is for local development and validation. It uses the repository's bundled Docker Compose deployment and the default local credentials baked into that deployment.
2. What You Get
After setup completes, you should have:
- A local Langfuse UI at
http://localhost:3000 - A working
bot.langfuseconfiguration in~/.openviking/ov.conf vikingbottraces tied to your real bot trafficresponse_idvisible in Langfuse metadata for Phase 1 validation
3. Prerequisites
Before starting, make sure:
- Docker is installed and the daemon is running
docker composeis available, ordocker-composeis installed- Your local OpenViking environment can start with
openviking-server --with-bot - Your bot already has a usable model configuration in
ov.conf
If Docker image pulls fail in your environment, fix Docker daemon network access or proxy settings before continuing.
4. Deploy Local Langfuse
Run the bundled deployment script:
cd bot/deploy/docker
./deploy_langfuse.sh
The script starts the Langfuse stack from bot/deploy/docker/langfuse/docker-compose.yml.
Expected local endpoints and credentials:
- Web UI:
http://localhost:3000 - Admin email:
[email protected] - Admin password:
vikingbot-admin-password-2026 - Public key:
pk-lf-vikingbot-public-key-2026 - Secret key:
sk-lf-vikingbot-secret-key-2026
If the script succeeds, verify the containers are running:
docker compose -f bot/deploy/docker/langfuse/docker-compose.yml ps
If your machine only has docker-compose, use:
docker-compose -f bot/deploy/docker/langfuse/docker-compose.yml ps
5. Install Langfuse Python Support
Langfuse support is already included by default in the [bot] installation.
If for some reason it's not installed, you can install it with:
uv pip install langfuse>=3.0.0
6. Configure ov.conf
Add the following to ~/.openviking/ov.conf:
{
"bot": {
"langfuse": {
"enabled": true,
"secret_key": "sk-lf-vikingbot-secret-key-2026",
"public_key": "pk-lf-vikingbot-public-key-2026",
"base_url": "http://localhost:3000"
}
}
}
Key meaning:
secret_key: server-side ingestion credential used byvikingbotpublic_key: paired project key stored alongside the secret keybase_url: local Langfuse service address
For local repository deployment, keep base_url as http://localhost:3000.
7. Restart OpenViking With Bot
After updating ov.conf, restart the service path you actually use for validation:
openviking-server --with-bot
Expected startup behavior:
- OpenViking HTTP server listens on
127.0.0.1:1933 - Bot API proxy is exposed at
/bot/v1 - Internal
vikingbot gatewaystarts automatically
If Langfuse is enabled correctly, startup logs should indicate Langfuse is enabled with the configured base URL.
8. Verify End-to-End
8.1 Check Bot Health
curl -sS http://127.0.0.1:1933/bot/v1/health
Expected result: HTTP 200.
8.2 Send a Test Chat Request
curl -sS -X POST "http://127.0.0.1:1933/bot/v1/chat" \
-H "Content-Type: application/json" \
-d '{
"session_id": "langfuse-local-verify-session",
"user_id": "langfuse-local-verify-user",
"message": "Please reply with one short sentence for Langfuse verification."
}'
Expected result:
- The top-level response contains
response_id - The final
responseevent containsdata.response_id - Both values match
8.3 Check Langfuse UI
Open http://localhost:3000 and sign in with:
- Email:
[email protected] - Password:
vikingbot-admin-password-2026
Find the trace generated by the test request and inspect the generation metadata.
For Phase 1, verify:
- The trace exists for your request
- Generation metadata includes
response_id - Tool spans, if any, also include
response_id session_idanduser_idare attached to the trace
8.4 Cross-Check Session Storage
If you also want to verify persistence, inspect the session JSONL under the bot data directory. By default this is:
~/.openviking/data/bot/sessions/
The assistant message for the request should include the same response_id you saw in the HTTP response and Langfuse.
For the full Phase 1 verification checklist, see:
bot/docs/vikingbot-phase1-validation-with-openviking-server.md
9. Troubleshooting
9.1 Langfuse UI Does Not Open
Check whether the containers are up:
docker compose -f bot/deploy/docker/langfuse/docker-compose.yml ps
Then inspect logs:
docker compose -f bot/deploy/docker/langfuse/docker-compose.yml logs -f
If you use docker-compose, replace the command accordingly.
9.2 No Traces Show Up in Langfuse
Check the following first:
- Langfuse is installed in the active environment (
langfuse>=3.0.0required, already included by default with[bot]) bot.langfuse.enabledistruein~/.openviking/ov.confsecret_key,public_key, andbase_urlmatch the local deployment valuesopenviking-server --with-botwas restarted after the config change
9.3 Docker Pull Fails
Typical causes are:
- The Docker daemon cannot reach upstream registries
- Your machine needs an outbound proxy for Docker
- A company network policy blocks anonymous registry access
Resolve Docker connectivity first, then rerun the deployment script.
10. Related Docs
- Feedback observability design:
bot/docs/vikingbot-feedback-observability-design.md - Phase 1 validation:
bot/docs/vikingbot-phase1-validation-with-openviking-server.md