Help us improve
Share bugs, ideas, or general feedback.
From pi-skill
Integrates Pi coding agent via headless RPC JSONL over stdin/stdout with strict LF framing, --mode json event streaming, or Node SDK embedding using AgentSession and ModelRegistry.
npx claudepluginhub romiluz13/pi-agent-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/pi-skill:pi-rpc-sdkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. `pi-mono/packages/coding-agent/docs/rpc.md` — **Framing** section (LF-only record delimiter; `readline` incompatibility with U+2028/U+2029).
Guides embedding @mariozechner/pi-agent-core Agent runtime in apps: message flows, tool execution modes (parallel/sequential), events for prompt/continue, subscriber wiring. For TypeScript integrations and debugging tool loops.
Scaffolds headless TypeScript agents using @openrouter/agent and Bun for CLI tools, API servers, queue workers, and pipelines—no terminal UI.
Guides Claude Agent SDK development in TypeScript/Python: auth, sessions, custom tools, permissions, prompts, tracking via docs-management delegation.
Share bugs, ideas, or general feedback.
pi-mono/packages/coding-agent/docs/rpc.md — Framing section (LF-only record delimiter; readline incompatibility with U+2028/U+2029).pi-mono/packages/coding-agent/docs/sdk.md — programmatic session patterns plus createAgentSession, AgentSession, createAgentSessionRuntime, ModelRegistry.create(), AuthStorage.create(), and SessionManager.inMemory().pi-mono/packages/coding-agent/docs/json.md — --mode json event stream: session header, agent_*/turn_*/message_*/tool_execution_* events, jq filtering examples.pi-mono/packages/coding-agent/src/modes/rpc/rpc-client.ts — reference TypeScript client mentioned from rpc.md intro when applicable.pi-mono/packages/coding-agent/src/core/agent-session.ts — API surface for in-process embedding (per rpc.md note to TypeScript users).pi-mono/packages/coding-agent/docs/rpc.md; quote or paraphrase strictly from that file when advising client implementers.rpc.md Input expansion bullet under prompt command.--mode json is read-only observation (stdout events); --mode rpc is bidirectional control (stdin commands + stdout responses). Different use cases, same framing caveats for U+2028/U+2029.createAgentSession() is the primary factory; it requires sessionManager, authStorage, and modelRegistry. For advanced multi-session hosting, use createAgentSessionRuntime() which returns AgentSessionRuntime with lower-level access to agent, sessionManager, settingsManager, modelRegistry, extensions, bashExecutor, resourceLoader — pi-mono/packages/coding-agent/docs/sdk.md.rpc.md recommendation to prefer AgentSession vs subprocess; cite the file’s opening Note for Node.js/TypeScript users.json.md (--mode json); for bidirectional control, point to rpc.md (--mode rpc).createAgentSession() over --mode rpc. Import from @mariozechner/pi-coding-agent. See pi-mono/packages/coding-agent/docs/sdk.md and pi-mono/packages/coding-agent/examples/sdk/.rpc.md (only \n as record delimiter; optional \r strip on input).