All skills
Skillintermediate
Rough Idea: Add Comprehensive Pi Agent Support to Ralph Orchestrator
Add pi-coding-agent (pi) as a first-class backend in ralph-orchestrator, on par with Claude, Kiro, Gemini, Codex, Amp, Copilot, and OpenCode.
Claude Code Knowledge Pack7/10/2026
Overview
Rough Idea: Add Comprehensive Pi Agent Support to Ralph Orchestrator
Add pi-coding-agent (pi) as a first-class backend in ralph-orchestrator, on par with Claude, Kiro, Gemini, Codex, Amp, Copilot, and OpenCode.
Pi is a TypeScript-based coding agent CLI (@mariozechner/pi-coding-agent) that supports:
- Print mode (
pi -p "prompt") — headless execution, outputs text or JSON - JSON streaming (
pi -p --mode json "prompt") — NDJSON event stream with pi-specific event types - RPC mode (
pi --mode rpc) — bidirectional JSON protocol over stdin/stdout for rich integration - Interactive mode (
pi "prompt") — TUI with initial prompt injection - SDK (
@mariozechner/pi-coding-agentnpm package) — programmatic TypeScript API
Pi's NDJSON schema differs from Claude's stream-json: events are wrapped in pi-specific types (agent_start, message_update with assistantMessageEvent, tool_execution_start/end, etc.) rather than raw Anthropic Messages API events.
Key Integration Points
- CliBackend: New
pi()andpi_interactive()constructors - Auto-detection: Add
pito the detection priority list - Stream parsing: Handle pi's NDJSON format for real-time output in Ralph's TUI/console
- RPC mode: Potentially leverage pi's RPC for richer features (steering, follow-ups, compaction)
- Configuration: Support pi-specific config options (provider, model, thinking level, extensions, skills)
- Cost tracking: Parse pi's usage/cost data from NDJSON events
- Completion detection: Parse pi's
agent_endevents for LOOP_COMPLETE detection