You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π Re-spec β 2026-06-26 (a RUNNERS entry; selected by the existing wizard-runner flag)
The pi runner is a leaf engine registered into RUNNERS (see #521), not a mode. It is reached when a
route resolves the runner to pi or the existing wizard-runner=pi flag overrides it. It consumes the
resolved pair's model as an input (model: string) rather than hardcoding one. Built on pi.dev
(@earendil-works/pi-coding-agent); the earlier @openai/agents build was scrapped (PRs #586/#587/#590
closed). Pi uses typebox, not zod β re-evaluate/revert the zod-4 bump that existed only for @openai/agents.
Implement the pi runner on pi.dev β a Claude-Code-style coding agent that owns its own tool loop and
ships Read/Write/Edit/Bash. It speaks the PostHog gateway directly via a registered anthropic-messages
provider, runs the same commandments + skills as anthropic, and streams onto the shared TUI bridge.
Scope
Deps: @earendil-works/pi-coding-agent, @earendil-works/pi-ai. No@openai/agents, no aisdk adapter.
Register into RUNNERS as pi, implementing AgentRunner.run(inputs & { model }).
Gateway provider β registerProvider(name, { baseUrl: getLlmGatewayUrlFromHost(host), apiKey: <posthog token>, api: 'anthropic-messages', headers: <Bedrock-fallback + wizard metadata/flags> }) (reuse 02 β Shared runner contract + adapters (gateway, MCP, prompt, tools, streamβTUI)Β #522's header builder). Resolve the model from the pair'smodel input (getModel(provider, id)), not
a local constant β so a future pi + opus differs only by the resolved pair.
Session β createAgentSession({ model, resourceLoader: new DefaultResourceLoader({ systemPromptOverride: <commandments> }), customTools, cwd: <install dir>, sessionManager: <in-memory> }); run via session.prompt(prompt).
Unit tests for runner wiring (mocked provider) incl. the abort/stop guard.
Open questions
Does Pi's provider append /v1/messages to baseUrl, or is the full path needed?
How does Pi resolve a custom-provider model without interactive auth in headless/CI runs?
Files
src/lib/agent/runner/backends/pi/
Notes
Skills load via Pi's native file-based discovery β drop the resolved framework SKILL.md into a Pi-scanned
dir (.pi/skills/.agents/skills) before the run. Wizard capabilities ride as defineTool custom tools.
Per-tool gating (canUseTool + YARA) is #525.
π Re-spec β 2026-06-26 (a
RUNNERSentry; selected by the existingwizard-runnerflag)The
pirunner is a leaf engine registered intoRUNNERS(see #521), not a mode. It is reached when aroute resolves the runner to
pior the existingwizard-runner=piflag overrides it. It consumes theresolved pair's model as an input (
model: string) rather than hardcoding one. Built on pi.dev(
@earendil-works/pi-coding-agent); the earlier@openai/agentsbuild was scrapped (PRs #586/#587/#590closed). Pi uses typebox, not zod β re-evaluate/revert the zod-4 bump that existed only for
@openai/agents.Epic: #520 Β· Behavior change: none (
wizard-runnerdefault-off) Β· Depends on: #521, #522Summary
Implement the
pirunner on pi.dev β a Claude-Code-style coding agent that owns its own tool loop andships Read/Write/Edit/Bash. It speaks the PostHog gateway directly via a registered
anthropic-messagesprovider, runs the same commandments + skills as
anthropic, and streams onto the shared TUI bridge.Scope
@earendil-works/pi-coding-agent,@earendil-works/pi-ai. No@openai/agents, no aisdk adapter.RUNNERSaspi, implementingAgentRunner.run(inputs & { model }).registerProvider(name, { baseUrl: getLlmGatewayUrlFromHost(host), apiKey: <posthog token>, api: 'anthropic-messages', headers: <Bedrock-fallback + wizard metadata/flags> })(reuse02 β Shared runner contract + adapters (gateway, MCP, prompt, tools, streamβTUI)Β #522's header builder). Resolve the model from the pair's
modelinput (getModel(provider, id)), nota local constant β so a future
pi+opusdiffers only by the resolved pair.createAgentSession({ model, resourceLoader: new DefaultResourceLoader({ systemPromptOverride: <commandments> }), customTools, cwd: <install dir>, sessionManager: <in-memory> }); run viasession.prompt(prompt).session.subscribeevents onto 02 β Shared runner contract + adapters (gateway, MCP, prompt, tools, streamβTUI)Β #522's bridge (status, todos, markers) and the log.AgentErrorType; honor[ABORT]. Degrade gracefully when adependency (e.g. local MCP) is unavailable.
Acceptance criteria
wizard-runner=pi(or a route resolves the runner topi).wizard-runnerstays defaultanthropic;anthropicunaffected.Open questions
/v1/messagestobaseUrl, or is the full path needed?Files
src/lib/agent/runner/backends/pi/Notes
Skills load via Pi's native file-based discovery β drop the resolved framework
SKILL.mdinto a Pi-scanneddir (
.pi/skills/.agents/skills) before the run. Wizard capabilities ride asdefineToolcustom tools.Per-tool gating (canUseTool + YARA) is #525.