Skip to content

Pi and porc ​

Pi is a terminal coding agent. @orc/pi, called porc, makes ORC the engine of a Pi setup. Memories, skills, project context, cron jobs and rules all live in ORC and are used from Pi. porc does not touch Pi's models or providers.

Install ​

bash
pi install npm:@orc/pi

Start Pi in a repository and run /orc. ORC must be running, and orc must be on PATH.

What you get ​

PieceBehavior
orc toolContext, memories, skills, projects, jobs, rules, and any ORC tool through search → describe → invoke
RecallA small hidden hint of relevant ORC memories and skills per prompt; nothing is preloaded
RulesORC rules for the workspace run on Pi tool_call, tool_result and input through orc rules hook pi
ProjectsDetects the ORC project for cwd, including nested folders, or asks you to pick one: existing, new or global
Themeporc and porc-light, matching DESIGN.md; apply with /orc-theme

Rules fail closed: if the rules plan cannot be loaded because ORC is offline or the fetch failed, blocking events (tool_call, input) still run the hook against the local ORC database, exactly like the Claude and Codex adapters. The plan refreshes at least every 30 seconds during a session, so rules activated later apply without restarting Pi.

Memories and skills you create from Pi are written to ORC, so other agents and the UI see them. Pi still loads local skills from .agents/skills, .pi/skills and ~/.pi/agent/skills, and local skills win on name clashes. ORC skills are fetched on demand and never copied to disk, so there is nothing to sync. Pi sessions are already read by ORC's session archive.

While Pi is open, porc registers the session in ~/.orc/live-sessions with Pi's process id, so ORC shows it as running or idle, refuses session messages while it is open, and refuses chat turns while it runs a turn. It shows as ended when Pi exits or its process dies.

Ask for it in chat ​

text
remember that staging deploys need a feature flag
schedule a dependency audit every Monday at 9
block the agent from running ssh

These map to:

RequestActionConfirmation
remember …memory_createnone
schedule …job_create: a cron job that runs Pi in the current folderasks first
block …rule_add: activates a new rule revision for the workspaceasks first

A rule applies to every agent ORC governs. ORC rules must be enabled in Settings.

Configure ​

User config lives at ~/.pi/agent/porc.json. Project config lives at .pi/porc.json, and porc reads it only after Pi trusts the project. The full option and environment variable reference is in the package README.

KeyDefaultPurpose
apiBase~/.orc/config.json or http://127.0.0.1:7700ORC API origin
secretEnv—Environment variable that holds the API secret
projectdetectedFixed ORC project
autoProject / askProjecttrue / trueDetect the project, and prompt when none matches
autoContexttrueInject the context index once per session
rulestrueEnforce ORC rules in Pi
transportstdiostdio runs orc mcp; http uses <apiBase>/mcp
recall.*4 memories, 3 skills, 900 charsPer-prompt hint budget

Commands ​

/orc, /orc-context, /orc-project [name|new|global|auto|reset], /orc-skills, /orc-remember name | when | content, /orc-doctor, /orc-theme, /orc-reload.

Session flags: --porc-api-base, --porc-project, --porc-no-context, --porc-no-recall, --porc-no-rules.

For the MCP and skills setup shared with other agents, see Connect agents.

Released under the MIT License.