Skip to content

Feature/pi agent#155

Open
gregzuro wants to merge 3 commits intomarcus:mainfrom
gregzuro:feature/pi-agent
Open

Feature/pi agent#155
gregzuro wants to merge 3 commits intomarcus:mainfrom
gregzuro:feature/pi-agent

Conversation

@gregzuro
Copy link

This adds the plain-old pi-agent as an adapter (conversations) and as an agent (workspaces).

Since pi-agent works differently in its stand-alone release as compared to the openclaw one, it seemed like a separate implementation was in order.

For conversations, this is basically the pi (openclaw) version melded with session handling a la Claude Code.

All the adapter patterns were followed, tests and doc updated.

I've live-exercised it a bit, but would appreciate some input from someone with more sidecar experience.

-G

Add support for standalone pi-agent sessions stored in ~/.pi/agent/sessions/.
This complements the existing 'pi' adapter which handles openclaw-embedded pi.

Key differences from openclaw pi:
- Per-project directory structure (like Claude Code)
- Path encoding: /path/to/project → --path-to-project--
- Project-specific watch scope (not global)

Implementation:
- Reuses pi package types (same JSONL format)
- Full message parsing with tool result linking
- Incremental parsing for append-only growth
- Session categorization (interactive, cron, system)

Identity: pi-agent / Pi Agent / π
- Add AgentPi constant and entries in all agent maps (types.go)
- Add detectPiSessionStatus for session file detection (agent_session.go)
- Pi stores sessions in ~/.pi/agent/sessions/--{path}--/*.jsonl
- Update README.md and website docs with Pi Agent support
- Add AgentPi to TestGetAgentCommand, TestShouldShowSkipPermissions,
  and TestBuildAgentCommand tables
- Add TestDetectPiSessionStatus_* tests for session file detection
boozedog added a commit to boozedog/sidecar that referenced this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant