Skip to content

Getting Started with hpilot ​

Audience: Users — New users installing and running their first pipeline.

This guide takes you from installation to your first autonomous pipeline run in five minutes.


1. Install hpilot ​

You need Python 3.11+ and uv:

bash
uv tool install hpilot
hpilot --version

If you prefer a local editable install for development:

bash
uv tool install -e . --force
hpilot --version

2. Choose Your Harness ​

Set the default harness. Options are claude, codex, opencode, cursor, antigravity, or mock:

bash
hpilot use claude

For OpenCode, install a current V2 CLI and uvx, configure provider authentication in OpenCode, then run hpilot use opencode. Model overrides use provider/model#variant; effort must be an advertised variant of that model. See the OpenCode setup guide for capability checks and native history commands. No exact OpenCode release is pinned.

For CI or local testing without API keys, use mock:

bash
hpilot use mock

3. Configure Verifier Credentials for Non-Contract Tasks ​

The llm section may be omitted when starting hpilot serve, and the daemon remains running when a task lacks required verifier credentials. Configure llm.api_key before submitting or directly running any effective non-contract agent stage; otherwise that task fails preflight. Contract-only and command-only slices do not require this key. The selected harness may still need separate credentials because llm.api_key configures only the verifier, not the coding runtime.

bash
mkdir -p ~/.hpilot
cat > ~/.hpilot/config.yaml <<'EOF'
harness: claude
llm:
  api_key: your-api-key
  # Optional:
  # base_url: https://api.openai.com/v1
  # model: gpt-4o
EOF
chmod 600 ~/.hpilot/config.yaml

When configured, verify connectivity:

bash
hpilot doctor

Runtime Defaults and Per-Stage Overrides ​

Set the global harness and optional effort default, then group stage-specific changes under stage_overrides:

yaml
harness: claude
model_effort: medium
llm:
  api_key: your-api-key # Required when the effective task includes a non-contract agent stage

stage_overrides:
  Plan:
    harness: codex
    model: gpt-5.6
    effort: xhigh
  Review Code:
    model: openai/gpt-5.6-mini
    iterations:
      2:
        model: openai/gpt-5.6-codex
      4:
        model: openai/gpt-5.6-pro
        effort: high

Each override may set harness, model, effort, goal, any subset, or nothing. The optional iterations mapping applies cumulative field changes starting at positive integer stage visits; retries keep their current visit, while the active config still reloads before each attempt. The example uses mini/medium at iteration 1, codex/medium at iterations 2–3, and pro/high from iteration 4. goal: true is a Codex-only version-qualified opt-in that keeps automatic turns as one logical operation; see Configuration Reference for strict syntax, inheritance, adapter switching, diagnostics, validation, hpilot use preservation, and migration, and the Codex Harness Guide for goal setup and limits.


4. Initialize a Project ​

Inside your project repository:

bash
hpilot init

hpilot init detects your environment:

  • If .specify/ exists, it installs the speckit scaffold — a 10-stage pipeline integrated with speckit workflows (specification discovery, plan/task management, and structured review loops).
  • Otherwise, it installs the simple scaffold — a 6-stage standalone pipeline (Plan, Review Plan, Implement, Review Code, Review Docs, Verify) that writes artifacts directly to .hpilot/artifacts/ without speckit dependencies.

Both create a hpilot.yaml with the full pipeline configuration.

The mock Harness ​

The mock harness (hpilot use mock) requires no external binary or API key. It returns a canned success response for every stage, making it useful for CI testing, pipeline structure validation, and development without real model access.

The cursor Harness ​

The cursor harness uses the cursor-sdk>=1.0.24 Python package, included as a hpilot dependency. The platform wheel bundles its own bridge launcher, so no cursor-sdk-bridge binary needs to be on PATH. Configure authentication only through the active hpilot config:

yaml
harness: cursor
harnesses:
  cursor:
    api_key: your-cursor-api-key

Environment variables and Cursor CLI login state are not used. Run hpilot doctor to verify the SDK and API key. See the Cursor Harness Guide for complete setup details.

The claude Harness ​

The claude harness uses the included claude-agent-sdk Python SDK and an explicitly selected standalone claude executable. Install Claude Code so claude --version succeeds. Authentication requires a supported provider credential such as ANTHROPIC_API_KEY. Run hpilot doctor to verify both the SDK and CLI are ready. See the Claude Code Harness Guide for full setup details.

The antigravity Harness ​

The antigravity harness requires the official agy CLI with ACP v1 and session resume or load. Install it on macOS or Linux, then launch it once to sign in:

bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
agy

hpilot starts agy acp with your normal Antigravity login. Run hpilot doctor to check the protocol handshake. See the Antigravity Harness Guide for permission ownership, timeout configuration, cancellation, and troubleshooting.

The opencode Harness ​

The opencode harness requires a current V2 CLI and uvx on PATH, with a working provider configured through OpenCode. hpilot checks native capabilities, starts an owned authenticated loopback server, and applies native model/variant and ordered permissions through a temporary overlay without editing user config. Use provider-qualified models and advertised variants in stage overrides; see the OpenCode Harness Guide for setup, resume/history commands, and acceptance limits.


5. Shell Completions ​

hpilot supports bash tab completion through two mechanisms:

Eval-based (dynamic, requires argcomplete):

bash
uv tool install 'hpilot[completions]'
eval "$(register-python-argcomplete hpilot)"

Add the eval line to ~/.bashrc to persist across sessions. This mode provides dynamic completions for stage names, harnesses, and document IDs.

Static script (no dependencies):

bash
source <(hpilot completion bash)

Add to ~/.bashrc for persistence. This covers subcommands, flags, and static choices (e.g., --template simple|speckit) without runtime dependencies.

For full details, see Shell Completions.


6. Run Your First Pipeline ​

Pass a prompt describing what you want built:

bash
hpilot "Create a 360 feedback system"

Or pipe from stdin:

bash
printf "Create a 360 feedback system" | hpilot run

Watch the pipeline execute stage by stage. Output streams to stderr; full logs are written to .hpilot/logs/. Logs are cleared before each run so they always reflect the current execution — previous run logs are not preserved.


7. Inspect Results ​

After the run finishes:

bash
# Structured JSONL logs
cat .hpilot/logs/hpilot.log.jsonl

# Per-stage transcripts
ls .hpilot/logs/stages/

# Contract artifacts (if any stage emitted routing decisions)
ls .hpilot/contracts/artifacts/

8. Restart or Cancel ​

If you interrupt a run with Ctrl-C, hpilot cleans up settings and skills automatically. To start fresh from a specific stage later, use --start-from:

bash
hpilot run "Create a 360 feedback system" --start-from "Implement"

--start-from alone starts a fresh agent session at the selected stage — it does not automatically reuse the previous session.

When a stage breaks after an agent session is captured, hpilot persists the session metadata under .hpilot/latest-session.json. To continue from that session instead of starting fresh, add --resume:

bash
hpilot run "Create a 360 feedback system" --start-from "Implement" --resume
  • The stage name, adapter name, workspace root, resolved runtime, and persisted stage visit must match the stored metadata. In Codex goal mode, an explicit --resume regenerates .hpilot/goal.md from the current rendered stage instructions.
  • If the adapter does not support continuation, or metadata is absent or mismatched, hpilot logs the reason and starts a fresh attempt.
  • This works with both hpilot run and hpilot submit.

To stop after a specific stage:

bash
hpilot run "Create a 360 feedback system" --end-after "Review Code"

Next Steps ​

Start the workspace daemon ​

From the project directory, hpilot serve listens only on the canonical workspace socket .hpilot/run/daemon.sock; hpilot status and the other daemon commands in that same directory select it automatically. Two workspaces therefore run concurrently without port allocation. Use --socket /short/private/daemon.sock when the encoded workspace path exceeds the platform Unix-socket limit. For an intentional TCP deployment or migration from an older release, set server.transport: tcp with server.host and server.port, or pass --host 127.0.0.1 --port 8765 to both server and clients. hpilot never opens both listeners and never falls back between them.