Tencent / Tencent/teamai-cli

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

Open
#617 2 comments 0 reactions 1 assignee View on GitHub

@kongdayan is already working on this.

Since Sep 17, 2026.

enhancement
Dominant language
TypeScript
Stars
4.8k
Forks
342
Avg merge
13h 48m
Merged PRs (30d)
211

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.