Pi becomes the sixth agent `teamai models switch` can point at a team
gateway. TeamAI writes one provider into `~/.pi/agent/models.json`, holding
every catalog model; a member's other providers in that file are never
touched.
- **Key is the profile ref** (`team:<id>` / `local:<id>`), not the bare `id`
— an `id` is unique only within one catalog file, so a root and a namespace
profile may both be `tokenhub`, and a bare id would make the second switch
silently overwrite the first gateway. Pi shows the profile's `name`.
- **One provider covers all three protocols.** Pi resolves the api and URL
per model: the first in Chat Completions, Responses, Anthropic order
becomes the provider's own, and a model reached through another carries
`api` and `baseUrl` itself. A model served both ways is registered once,
preferring an OpenAI one; an `anthropic`-only group pins a Claude model to
Anthropic Messages.
- **An environment key is written as `$VAR`**, and `settings.json` is left
alone, so the default model stays the member's choice.
`PI_CODING_AGENT_DIR` is honored the way `CODEX_HOME` is.
- **Restore** removes the key the last switch created, even after the catalog
re-points the profile at a different ref. Restoring without `--agent` now
covers Pi too.
Rebased onto current `origin/main` (3a9a24a). The only conflict was the
`./profile.js` import in `src/models/switch.ts`, where this change adds
`ModelProtocol` and #894 adds `LocalConfig` / `sameTeamIdentity`; resolved as
the union of both, and `git range-diff` confirms that line is the sole
difference from the original commit.
Verification on the rebased tree: `tsc --noEmit` and `lint` clean. Unit
suite 5501 passed (the same three `push-env` cases fail on clean
`origin/main`, verified in a separate worktree). Pi e2e suite 4 passed. Real
built CLI against a scratch `HOME`: `models add` -> `models switch --agent pi`
writes one provider keyed `local:tokenhub` with `settings.json` untouched;
`models list` reports Pi active; `models restore --agent pi` returns the file
to `{}`; a pre-existing user provider under the same ref is refused with
`pi already has a user-owned provider named local:tokenhub` and left byte
for byte intact; `PI_CODING_AGENT_DIR` redirects the write to a custom
directory.
TeamAI — Make Every Team AI Native
English | 中文 | 日本語 | 한국어 | ไทย
The shared foundation for how your team works, learns, and improves with AI.
TeamAI turns individual AI capabilities into shared team capabilities — across agents, machines, and team members.
Why TeamAI
Quick Start
Send this one line to your AI tool:
Install the teamai skill: https://github.com/Tencent/teamai-cli/tree/main/skills/teamai , load the teamai skill, then set up TeamAI for my team from scratch.
Once TeamAI is set up, just talk to the /teamai skill in your AI tool:
Set up a team from scratch
/teamai Help me set up TeamAI for my team from scratch
Join a team
/teamai Help me join my team's TeamAI, repo URL is https://github.com/your-org/your-repo
Share with the team
Skills, rules, MCP servers, and other agent resources can all be shared:
/teamai Share my xxx skill with the team
Open the dashboard
/teamai Open the TeamAI dashboard
Once a teammate is set up, they just open their agent and already have the team's full set of AI assets.
Command-line install
Install
npm install -g teamai-cli
Team admin / solo user
Create a shared-experience repo on your git host (GitHub, GitLab, GitCode, CNB, TGit, or a private Git service), grant write access to team members, then run teamai init https://github.com/your-org/your-repo.
No team repo yet? Start from a template pre-loaded with production-ready skills, rules, and review agents. Browse the teamai-hub org, click Fork, then
teamai initagainst your new repo.
Team members
# Choose one, depending on where you want resources installed
# Project-scope init (default, resources installed under the project directory)
cd /path/to/my-project
teamai init https://github.com/your-org/your-repo
# Or, user-scope init (resources installed under ~/)
teamai init https://github.com/your-org/your-repo --scope user
Once initialized, every AI session automatically pulls the latest skills / rules and other Harness updates published by admins — no manual sync needed.
Product Overview
Three layers of capability, built on Git:
- Team Execution — make every agent work the team's way: skills, rules, docs, env, agents, hooks, MCP, models.
- Team Context (beta) — make every agent understand the team: learnings, codebase graph, teamwiki.
- Team Improvement (beta) — make every execution improve the team: usage, sessions, dashboard.
| Agent | Team Execution | Team Context (beta) | Team Improvement (beta) | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| skills | rules | docs | env | agents | hooks | mcp | models | learnings | codebase | teamwiki | usage | sessions | dashboard | |
| Claude Code | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Codex | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Cursor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| GitHub Copilot CLI | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| CodeBuddy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| WorkBuddy | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| OpenCode | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — | — |
| Pi Coding Agent | ✓ | ✓ | ✓ | — | — | ✓ | — | ✓ | — | — | — | — | — | — |
| OpenClaw | ✓ | ✓ | ✓ | ✓ | — | — | — | — | ✓ | ✓ | ✓ | — | — | — |
| Hermes | ✓ | — | ✓ | ✓ | — | — | — | — | ✓ | ✓ | ✓ | — | — | — |
| DeepSeek Harness | ✓ | — | ✓ | — | — | — | — | — | ✓ | ✓ | ✓ | — | — | — |
| Qoder | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Qoder CN | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Kiro | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ZCode | ✓ | — | ✓ | — | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Oh My Pi | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | — | — | — |
Learn More
- Usage Guide (中文版) — setup, onboarding, daily workflows, and commands
- Product Overview (中文版) — architecture, distribution controls, and capability details
- Git Providers — supported repository providers
- Windows Setup (中文版) — hooks and shell configuration
- Technical Designs — design documents and proposals
Contributors
Thanks to everyone who has contributed to TeamAI!
Made with contrib.rocks.
Contributing
Join the conversation, or open an issue or PR. See CONTRIBUTING.md for how to contribute.
