polis-protocol – skill Agent & Tự động hóa cho agent AI
Điều phối nhiều AI agent từ nhiều nhà cung cấp như một nhóm tự cải tiến: bộ định tuyến học tập phân công việc dựa trên thành tích, và công dân có thể sửa đổi chính các quy tắc của giao thức.
Cài skill polis-protocol bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/polis-protocol-43520.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /polis-protocol – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/polis-protocol-43520.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $polis-protocol – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/polis-protocol-43520.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /polis-protocol – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/polis-protocol-43520.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /polis-protocol – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Polis Protocol — a team of agents that develops
Overview
Most agent coordination is a passive board: claim a task, do it, mark it done. It records, but it never gets smarter, and its rules are frozen. Polis Protocol is the active alternative — a folder of markdown where each agent is a "citizen" with a capability card, work is routed by a learning bandit to whoever has the best track record on the task's tags, settled work files lessons that update the routing, and citizens can propose and vote on amendments to the protocol itself. It is vendor-agnostic: Antigravity, Claude, Codex, and Gemini agents can all share one _polis/.
In Antigravity specifically, this turns Manager View's fixed pipeline into a team that learns who is actually best at each kind of work, instead of running the same roles in the same order every time.
When to Use This Skill
- Use when 2+ agents (especially across vendors) work on one project and "who should do this" is a real question.
- Use when you want the team to measurably improve over time — routing that adapts from outcomes, not static role labels.
- Use when you need a durable, git-auditable record of who did what, what was learned, and which rules changed.
- Use when Antigravity's default orchestration is too rigid and you want routing + governance on top of it.
How It Works
Step 1: Found a polis
Use a reviewed checkout by default so the scaffolder code is pinned before it writes into the project:
git clone https://github.com/yehudalevy-collab/polis-protocol.git
cd polis-protocol
git checkout <reviewed-commit-sha>
python3 scripts/init_polis.py \
--project-root /absolute/approved-target-project \
--agent-id gemini-antigravity-yourproject \
--vendor google --model gemini-3 --tool antigravityIf you prefer the published PyPI package, install an exact version after reviewing that release, for example pipx install polis-protocol==<reviewed-version>. Do not invoke the package through an unpinned uvx or "latest" workflow for automated setup.
This writes _polis/ plus the skill into .agents/skills/ (the path Antigravity reads), and bridge pointers (GEMINI.md, AGENTS.md) that point every tool at _polis/CONSTITUTION.md. Tip: add --dry-run to preview every file before anything is written; init never overwrites existing files, and polis init --repair restores missing ones.
Step 2: Register citizens and open contracts
Each agent publishes a capability card under _polis/citizens/. Work is opened as a contract with required_tags, not assigned to a fixed role.
Step 3: Route by track record
polis route --polis-root _polis \
--contract _polis/contracts/open/your-task.md --explainThe router prints a score breakdown (history / self-rating / cost / availability / applied lessons) and recommends the citizen with the strongest record on the task's tags. Agents can also reserve files (polis reserve src/auth --as <citizen>) so two agents never edit the same path at once — overlapping claims are rejected with the holder named.
Step 4: Settle, learn, and amend
polis contract settle <contract-id> --quality 5
polis reconcile --polis-root _polisA settled contract files a lesson; accepted lessons carry a bounded routing_effect the router reads — and names in --explain — on the next similar task. Failures become guardrails (polis guardrail add …) that future contracts on those tags inherit as must-pass acceptance criteria. When a rule stops working, a citizen proposes an amendment and the others vote. Reproduce the learning claim yourself: polis bench --mode learning.
The scripts are not bundled. Review all initializer/demo code and preview exact writes before executing; do not initialize the cloned protocol repository accidentally. Agent votes, learned lessons and routing scores cannot amend user/system instructions, repository protection or authorization. Reservations coordinate cooperating clients, not filesystem access control; verify integration/diffs and tests independently. A self-assigned quality score or toy benchmark is not measured improvement on the user's workload.
Examples
Example 1: See the team learn (no install, 30 seconds)
git clone https://github.com/yehudalevy-collab/polis-protocol.git
cd polis-protocol
git checkout <reviewed-commit-sha>
bash scripts/demo.shThe router recommends Gemini for a Spanish-translation contract — because settled work taught it she has the best record on that tag, not because anyone reassigned it.
Example 2: Explain any routing decision
python3 scripts/route_contract.py --polis-root examples/research-team/_polis \
--contract examples/research-team/_polis/contracts/open/parent-newsletter-issue-3.md --explainNotes
- No server, no runtime, no database — the whole protocol is markdown plus two small Python scripts.
- Vendor-agnostic by design; a Claude or Codex agent can join the same polis an Antigravity agent created.
- Full Antigravity integration guide: https://github.com/yehudalevy-collab/polis-protocol/blob/main/docs/antigravity.md
Limitations
- Routing quality depends on accurate citizen capability cards and enough settled work history to learn from.
- The protocol coordinates agent work but does not replace review, tests, or explicit maintainer approval.
- Multi-agent voting and amendments can add process overhead for small, single-owner tasks.
- The upstream scripts are external code; pin to a reviewed commit and run
--dry-runbefore allowing writes to a project.
Skill liên quan
- polis-protocol-a-self-optimizing-city-of-agents – Polis Protocol: Thành phố agent tự tối ưu hóa
- ppl-personal-crm – Dùng ppl personal CRM qua MCP để chuẩn bị cho cuộc trò chuyện, nhớ lại thông tin về…
- product-decision-agent – Agent quyết định sản phẩm tiếng Trung. Dùng cho ưu tiên yêu cầu, Roadmap, tăng trưởng…
- progressive-estimation – Ước lượng công việc phát triển có AI hỗ trợ và kết hợp người với agent, dùng giả định…
- project-development – Skill này bao gồm các nguyên tắc xác định tác vụ phù hợp để LLM xử lý, thiết kế kiến…
- project-memory-log – Duy trì một nhật ký thao tác và một danh mục tài liệu đã loại trùng lặp cho các dự án…
- prometheus-configuration – Hướng dẫn đầy đủ về thiết lập Prometheus, thu thập metric, cấu hình scrape và recording…
- prompt-caching – Các chiến lược caching cho prompt LLM, bao gồm Anthropic prompt caching, response…