Pi
Set up dkod with Pi — a terminal AI agent. The dkod extension for Pi enables parallel agent execution with AST-level semantic merging.
Install the Extension
pi install npm:@dkod/piThis installs the dkod Pi extension, which includes:
/dkh— full autonomous build pipeline (plan, build, verify, review, eval, ship)/dkh:plan— planning only (prompt → spec → parallel work units)/dkh:eval— evaluate current application against criteria/dkod:config— verify dk CLI installation and authentication
Prerequisites
The extension requires the dk CLI:
# Install dk CLI
curl -fsSL https://dkod.io/install.sh | sh
# Authenticate
dk loginUsage
Full Autonomous Build
One prompt in. Working, tested PR out. Zero human interaction.
/dkh Build a project management webapp with kanban boards, team collaboration, and real-time updates
The harness orchestrates the entire pipeline:
- Planner decomposes work by symbol into parallel units
- N Generators implement in parallel — each in its own dkod session via Pi RPC subprocesses
- Changes merge via AST-level semantic merging — zero conflicts
- Evaluator tests the live app via chrome-devtools
- If all checks pass, a PR is pushed to GitHub
Planning Only
/dkh:plan Add OAuth2 authentication with Google and GitHub providers
Produces a spec with parallel work units without executing them.
Evaluate
/dkh:eval
Runs adversarial testing against the current application via chrome-devtools.
How It Works
The extension uses the dk CLI (--json mode) as its sole dkod interface. Each generator runs as a Pi RPC subprocess — true OS-level parallelism with its own isolated dkod session.
Runtime tool enforcement ensures generators only write through dkod sessions. Write, Edit, and git commands are blocked at the Pi runtime level (not just prompt instructions) via the tool_call event guard.
The agent prompts are adapted from the dkod harness, based on Anthropic's Planner-Generator-Evaluator research.
Next Steps
- Multi-Agent Workflows — patterns for orchestrating parallel agents
- Code Review Intelligence — automated review on every submission
- Agent Skill — the dkod skill for other agents