AgentOS role runtime for Pi sessions launched through pi-link.
When this package is loaded in a project, pi-link <agent-name> checks project root .pi/agents/agents.yaml. If <agent-name> is declared there, the Pi session gets that AgentOS profile, referenced rules/docs/checklists, declared skills, tool allow/deny policy, and optional private workspace directory.
If the name is not declared, pi-link behaves normally.
pi install npm:pi-link
npm i -g pi-linkpi-agentos does not patch or replace pi-link.
Local development install:
pi install -l /path/to/pi-agentosGitHub install after this repo is pushed:
pi install git:github.com/ch0udry/pi-agentosProject-local GitHub install:
pi install -l git:github.com/ch0udry/pi-agentosOn first extension load in a trusted project, pi-agentos creates project root .pi/agents and copies the bundled default AgentOS files into it:
agents.yaml- agent profiles such as
builder.md rules/checklists/docs/
Existing files are never overwritten. If a bundled default changes later and your project already has that file, pi-agentos does nothing.
Add an entry to .pi/agents/agents.yaml:
agents:
- id: custom
profile: .pi/agents/custom.mdEach entry requires only id and profile. The profile file controls tools, denied tools, skills, rules, checklists, docs, and optional workspace.
---
name: Builder
tools: [read, grep, find, ls, edit, write, bash]
deny-tools: []
skills: []
rules:
- rules/builder-rules.md
checklists:
- checklists/builder-checklist.md
docs:
- .pi/agents/docs/agentos-workflow.md
cwd: agents-work/builder
---
Profile instructions go here.Rules and checklists may be written relative to .pi/agents. Docs and profiles should use project-relative paths.
- missing
cwd, blankcwd,cwd: ., andcwd: parentmean project root. - any other relative
cwdcreates that directory under the project root. - no README, status, log, or work files are created in the workspace.
- Pi's real process cwd and native repo tools stay rooted in the project as normal.
toolspresent: active tools become that allowlist, minus denied tools.- only
deny-toolspresent: current active tools minus denied tools. - neither present: Pi's current/default tools are unchanged.
Unknown tool names are reported visibly. If an allowlist resolves to zero available tools, role activation fails instead of starting a broken session.
pi-link builderIf .pi/agents/agents.yaml contains id: builder, the session starts as Builder Agent. If not, it stays a normal linked Pi session.
npm install
npm testThe Pi extension entry is index.ts. Pi loads TypeScript extensions directly; there is no build step for v1.