Harbor integration with Langfuse
Use the Langfuse plugin for Harbor to inspect what agents did in Harbor jobs: each job becomes an experiment run, each trial a trace of the agent's model and tool calls, and each verifier reward a score.
What is Harbor? Harbor is an open-source framework for evaluating agents in sandboxed environments. A task bundles an instruction, a container environment, and a verifier that grades the result. Harbor runs agents such as Claude Code, Codex, or OpenHands on tasks locally with Docker or in cloud sandboxes, and shares datasets of tasks on the Harbor Hub.
What is Langfuse? Langfuse is an open-source AI engineering platform. It helps teams trace agentic applications, debug issues, evaluate quality, and monitor costs in production. Use Langfuse Cloud (hosted by Langfuse, free tier, no infrastructure to run) or self-host it.
Get started
Install the plugin
Install the plugin into the same environment as Harbor:
uv tool install harbor --with "harbor-langfuse @ git+https://github.com/langfuse/harbor-observability-plugin"Set your Langfuse API keys
Create API keys in your Langfuse project settings:
export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."
export LANGFUSE_BASE_URL="https://cloud.langfuse.com" # πͺπΊ EU region
# Other Langfuse data regions include πΊπΈ US: https://us.cloud.langfuse.com, π―π΅ Japan: https://jp.cloud.langfuse.com and βοΈ HIPAA: https://hipaa.cloud.langfuse.comRun a job with the plugin
Set up the agent's model API key and sandbox as described in the Harbor README, then add --plugin langfuse to harbor run:
harbor run -d terminal-bench/terminal-bench-2-1 \
-a claude-code -m anthropic/claude-sonnet-5-5 \
--plugin langfuseThe plugin sends each trial when it ends. To send a job that already ran, use harbor-langfuse export jobs/<job-name>.
Compare runs
Each job appears as one experiment run per agent and model on a dataset named after the Harbor dataset, for example terminal-bench/terminal-bench-2-1. Each trial is the run's result for its task: a trace with a generation per model call and a tool observation per tool call, scored with the verifier's rewards, such as reward, with the test results as the score's comment. Because the dataset item for a task is the same in every job, you can compare runs task by task.
![]()
With several attempts per task (harbor run -k), every attempt is part of the run and its scores, but the comparison view shows only the latest attempt per task. Showing every attempt is on the roadmap.
Test Langfuse-managed skills
Install a skill version from Langfuse Skill Management with the Langfuse CLI and pass its folder to Harbor:
npm install -g @langfuse/cli
langfuse skills install my-skill --label staging
harbor run -d terminal-bench/terminal-bench-2-1 \
-a claude-code -m anthropic/claude-sonnet-5-5 \
--skill .agents/skills/my-skill --job-name my-skill-staging \
--plugin langfuseThe plugin links each trace to the skill versions from the lockfile the CLI writes, so Langfuse shows which skills the agent had and which it loaded. Run one job per label or version and compare the runs.
Last updated on