praisonai code assistant with one command.
Quick Start
1
Install Dependencies
Install Harbor and PraisonAI into one environment. Regular users install from PyPI; benchmarkers of a working tree use editable installs.Set your API key:
2
Run the Code Adapter
Benchmark the
praisonai code assistant on Terminal-Bench 2.1. Run from the repo root with PYTHONPATH=. so the adapter import path resolves.How It Works
Harbor spins up one Docker container per task, installs the agent, drives it against the instruction, then grades the container with a verifier script. A concrete end-to-end flow:- Write
job_code_smoke.yaml(or reuse the one in the repo). - Run
PYTHONPATH=. harbor run -c examples/terminal_bench/job_code_smoke.yamlfrom the repo root. - Harbor spins up one container per pinned task in parallel (
n_concurrent_trials: 2). - In each container,
PraisonAICodeAgent.install()runspip install praisonai praisonaiagents. PraisonAICodeAgent.run()invokespraisonai code "<instruction>" --dangerously-skip-approval --model openai/gpt-4o-mini, tee’d to/tmp/praisonai_code.log.- Harbor’s verifier scores the container after the agent exits.
- Pass/fail per task and mean score print to the terminal and write to
runs/; the CI workflow uploads that folder as an artifact. - You paste the pass rate as a new row in
RESULTS.md.
Integration Approaches
Three adapters cover different levels of the stack — start with the code adapter.- Code Agent (Recommended)
- External Agent (Direct Agent)
- Wrapper Agent (CLI-based)
The code adapter installs and drives the terminal-native Run command:The base
praisonai code assistant headlessly inside the container. It is the “one command to benchmark PraisonAI” story.praisonai package is enough — heavy code extras are not required, since ACP tools degrade gracefully. A benchmark miss still exits 0 (Harbor grades by task verification), but a real install/auth/startup crash propagates the nonzero status.--dangerously-skip-approval on praisonai code sets PRAISON_APPROVAL_MODE=auto and PRAISONAI_TOOL_SAFETY=off, so the assistant runs fully autonomously in a non-TTY container session (no approval hang). See Tool Approval for the full flag reference.Multi-agent variant. A planner/executor/verifier team lives at
examples/terminal_bench/multi_agent_example.py (class MultiAgentPraisonAI) for tasks that benefit from decomposition. Run it with:Both
--agent "module:Class" (short form, featured above) and --agent-import-path module:Class (long form) work.YAML Configuration
Harbor 2.1 uses arrays fordatasets and agents, plus n_concurrent_trials and n_attempts — unknown keys are silently ignored, so the old dataset:/agent:/n_concurrent: form runs the default oracle agent on zero tasks.
task_names: for a cheap smoke run.
harbor datasets list before editing task_names:.
Run with configuration:
Task Filtering & Selection
Pin tasks in YAML withtask_names: (preferred) or filter on the command line with -i.
Filter by Task Names (CLI)
Filter by Task Names (CLI)
Run specific tasks for targeted testing or debugging.
Limit Task Count
Limit Task Count
Run a subset for quick testing with the
-l flag.Cloud Execution
Cloud Execution
Scale to higher concurrency using cloud providers.
Recording Pass Rates
Pass rates are tracked inexamples/terminal_bench/RESULTS.md in the SDK repo, one row per run.
Add a row after each run recording the date, agent, model, task set, pass rate, and the uploaded Harbor artifact. See
RESULTS.md for the current table.
CI Smoke Workflow
A scheduled workflow at.github/workflows/terminal-bench-smoke.yml runs the code adapter on the verified smoke subset and uploads results — copy it to set up your own weekly tracking.
Interpreting Results
Terminal-Bench uses binary scoring where each task either passes (1.0) or fails (0.0).Model Performance: the smoke config uses
gpt-4o-mini for cost; for meaningful pass rates use openai/gpt-4o or anthropic/claude-3-7-sonnet-20250219. gpt-4o-mini typically scores near 0.0 on hard tasks.Best Practices
Start with Oracle Agent
Start with Oracle Agent
Verify the benchmark works by testing with the oracle agent first.This should achieve a perfect score (1.0) and confirm your setup is correct.
Use Appropriate Models
Use Appropriate Models
Choose models based on your goals:
- Testing integration:
openai/gpt-4o-mini(fast, cheap, low scores) - Real benchmarking:
openai/gpt-4ooranthropic/claude-3-7-sonnet-20250219 - Cost optimization: Start with 3-5 tasks before running the full benchmark
Monitor Resource Usage
Monitor Resource Usage
Terminal-Bench tasks can be resource intensive:
- Start with
-n 2concurrency for testing - Scale to
-n 8for serious benchmarking - Use cloud providers (Daytona, E2B, Modal, Novita) for
-n 32+concurrency
Track Pass Rates in RESULTS.md
Track Pass Rates in RESULTS.md
Record every run in
examples/terminal_bench/RESULTS.md so pass-rate trends are visible over time. The CI smoke workflow uploads the Harbor results directory as an artifact for each run.Troubleshooting
Related
Tool Approval
Approval flags for the
praisonai code assistantSandbox Execution
Safe code execution in isolated environments

