Skip to content

[feat] Add support for Pi Coding Agent (earendil-works/pi) #617

Closed

Description

@kongdayan

Problem

Follow-up to #550, where @elvizlai asked about pi-agent support and @jeff-r2026 suggested filing it as its own issue.

Some team members already use Pi (earendil-works/pi, npm @earendil-works/pi-coding-agent) as their daily coding agent, but TeamAI CLI doesn't recognize it yet. As a result:

  • skills / rules / docs / hooks in .teamai/ can't be synced into Pi's native config directory via teamai pull;
  • updates still have to be copied by hand into ~/.pi/agent/;
  • team best practices built up around Pi can't be captured as a reusable team asset.

Proposed Solution

Add Pi as a new agent provider/adapter. Verified against Pi's own docs (settings.md, skills.md, extensions.md), its native resource paths are:

Resource User (global) Project
skills ~/.pi/agent/skills/ .pi/skills/
docs / instructions ~/.pi/agent/AGENTS.md (also reads CLAUDE.md) AGENTS.md / CLAUDE.md, discovered walking up the directory tree
settings ~/.pi/agent/settings.json .pi/settings.json
extensions (hooks live here) ~/.pi/agent/extensions/*.ts .pi/extensions/*.ts

Notes:

  • docs maps directly onto the existing .teamai/ → AGENTS.md distribution path already used for other agents — no special-casing needed.
  • skills follow the standard Agent Skills spec (<name>/SKILL.md, description required).
  • hooks are TypeScript "extensions" using pi.on(eventName, handler) (events like session_start, before_agent_start, tool_execution_end, agent_settled) — the hook dispatcher needs a Pi-specific event-name mapping.
  • Pi has no built-in MCP config or custom sub-agent format (an explicit upstream design choice), so Phase 1 should cover skills / rules / docs / hooks only.

Alternatives Considered

  • Manually pointing Pi's settings.json skills array at ~/.claude/skills: only covers skills, requires every user to hand-edit their own config, isn't automated by teamai pull, and doesn't cover docs/hooks — not a real substitute for a proper adapter.

Additional Context

  • Upstream repo: https://github.com/earendil-works/pi (npm @earendil-works/pi-coding-agent, pi.dev)
  • Pi's config layout follows the same agent-scoped skills/docs/hooks shape TeamAI already handles for other tools, so this should mainly be a matter of adding a new provider (path resolution + hook event mapping), not new architecture.

Activity

  1. kongdayan commented on Sep 17, 2026

    @kongdayan
    ContributorAuthor

    I'd like to take this one.

  2. jeff-r2026 commented on Sep 17, 2026

    @jeff-r2026
    Collaborator

    Thanks — and good call filing it separately per #550. The research is solid: native paths, the Agent Skills spec for skills, the AGENTS.md/CLAUDE.md docs path we already handle, and the extension-based hooks with a Pi-specific event mapping.

    Approved. Start with Phase 1 = skills / rules / docs / hooks only — that matches Pi's actual surface, and since Pi has no MCP or sub-agent format upstream, there's nothing to render there. Please open a PR for Phase 1:

    • New provider/adapter: path resolution (user ~/.pi/agent/*, project .pi/*) + install detection.
    • Hooks: map our lifecycle to Pi's extension events (session_start → teamai hook-dispatch session-start --tool pi, etc.). The writer still emits the teamai hook-dispatch ... command, not the raw Pi event name.
    • Docs reuse the existing AGENTS.md distribution — no special-casing.
    • README + usage guide (EN/ZH), and a doctor check.

    It's yours — assigning to you. Ping me when the PR's up.

  3. fcesur commented on Sep 20, 2026

    @fcesur

    Hi, are there any updates for supporting Pi ? Thx for your contribution 🙏🏻 @kongdayan

  4. kongdayan commented on Sep 21, 2026

    @kongdayan
    ContributorAuthor

    Hi @fcesur thanks for checking in! I’m currently working on Pi support and will keep you posted on the progress. Thanks for your patience! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions