bot/docs/vikingbot-langfuse-local-setup.md
Author: OpenViking Team Status: Draft Date: 2026-04-29
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.
After setup completes, you should have:
http://localhost:3000bot.langfuse configuration in ~/.openviking/ov.confvikingbot traces tied to your real bot trafficresponse_id visible in Langfuse metadata for Phase 1 validationBefore starting, make sure:
docker compose is available, or docker-compose is installedopenviking-server --with-botov.confIf Docker image pulls fail in your environment, fix Docker daemon network access or proxy settings before continuing.
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:
http://localhost:3000[email protected]vikingbot-admin-password-2026pk-lf-vikingbot-public-key-2026sk-lf-vikingbot-secret-key-2026If 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
vikingbot only sends Langfuse traces when the optional Langfuse dependency is installed.
From the repository root, install it with:
uv pip install -e ".[bot,bot-langfuse]"
If your environment already has the main bot dependencies installed, the smaller install also works:
uv pip install -e ".[bot-langfuse]"
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 by vikingbotpublic_key: paired project key stored alongside the secret keybase_url: local Langfuse service addressFor local repository deployment, keep base_url as http://localhost:3000.
After updating ov.conf, restart the service path you actually use for validation:
openviking-server --with-bot
Expected startup behavior:
127.0.0.1:1933/bot/v1vikingbot gateway starts automaticallyIf Langfuse is enabled correctly, startup logs should indicate Langfuse is enabled with the configured base URL.
curl -sS http://127.0.0.1:1933/bot/v1/health
Expected result: HTTP 200.
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:
response_idresponse event contains data.response_idOpen http://localhost:3000 and sign in with:
[email protected]vikingbot-admin-password-2026Find the trace generated by the test request and inspect the generation metadata.
For Phase 1, verify:
response_idresponse_idsession_id and user_id are attached to the traceIf 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.mdCheck 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.
Check the following first:
uv pip install -e ".[bot-langfuse]" or uv pip install -e ".[bot,bot-langfuse]" has been run in the active environmentbot.langfuse.enabled is true in ~/.openviking/ov.confsecret_key, public_key, and base_url match the local deployment valuesopenviking-server --with-bot was restarted after the config changeTypical causes are:
Resolve Docker connectivity first, then rerun the deployment script.
bot/docs/vikingbot-feedback-observability-design.mdbot/docs/vikingbot-phase1-validation-with-openviking-server.md