AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Pi Rpc Sdk

skill-romiluz13-pi-agent-skills-pi-rpc-sdk · by romiluz13

Pi headless RPC JSONL over stdin/stdout, strict LF framing, --mode json event streaming, and Node SDK alternatives (AgentSession). Use when integrating pi --mode rpc, pi --mode json, writing a client that speaks the protocol, reading JSON event streams, or choosing RPC vs in-process SDK. Use for "pi rpc client", "JSONL framing", "readline rpc", "--mode json", "json events", "embed pi without subp…

No reviews yet
0 installs
29 views
0.0% view→install

Install

$ agentstack add skill-romiluz13-pi-agent-skills-pi-rpc-sdk

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-romiluz13-pi-agent-skills-pi-rpc-sdk)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pi Rpc Sdk? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Pi RPC and SDK integration

Grounding

  1. pi-mono/packages/coding-agent/docs/rpc.mdFraming section (LF-only record delimiter; readline incompatibility with U+2028/U+2029).
  2. pi-mono/packages/coding-agent/docs/sdk.md — programmatic session patterns plus createAgentSession, AgentSession, createAgentSessionRuntime, ModelRegistry.create(), AuthStorage.create(), and SessionManager.inMemory().
  3. pi-mono/packages/coding-agent/docs/json.md--mode json event stream: session header, agent_*/turn_*/message_*/tool_execution_* events, jq filtering examples.
  4. pi-mono/packages/coding-agent/src/modes/rpc/rpc-client.ts — reference TypeScript client mentioned from rpc.md intro when applicable.
  5. pi-mono/packages/coding-agent/src/core/agent-session.ts — API surface for in-process embedding (per rpc.md note to TypeScript users).

Invariants

  • Framing rules are normative text in pi-mono/packages/coding-agent/docs/rpc.md; quote or paraphrase strictly from that file when advising client implementers.
  • Skill commands and prompt templates are expanded for RPC prompts per 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.
  • For TypeScript/Node embedding, 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, resourceLoaderpi-mono/packages/coding-agent/docs/sdk.md.

Workflows

  • Choose integration: If user is on Node/TS, point to rpc.md recommendation to prefer AgentSession vs subprocess; cite the file’s opening Note for Node.js/TypeScript users.
  • Debug framing: Re-read Framing section; do not suggest generic line readers as compliant.
  • JSON event stream: For read-only observation of agent activity, point to json.md (--mode json); for bidirectional control, point to rpc.md (--mode rpc).
  • In-process embedding: For TypeScript/Node users who don't need subprocess isolation, prefer 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/.

Anti-patterns

  • Do not describe delimiter behavior contradicting rpc.md (only \n as record delimiter; optional \r strip on input).

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.