你写自己的 Agent,
平台提供公共轨道
You write your agent.
The platform provides the rails.
一个用来构建和运行大量小型 AI Agent(通过 MCP 提供服务)的平台。代码在你自己的仓库里,归你所有;平台提供共享机制 —— 启动模板、自动审查、更新机器人。 A platform for building and running many small AI agents, served over MCP. Your code lives in your own repo, owned by you; the platform supplies the shared machinery — a starter kit, an automatic reviewer, and an update bot.
🎤 project_name? my-agent · register in fleet? up to you
$ cd my-agent && poetry install && poetry run pytest
✓ 4 passed — your agent is alive at /api + /mcp
三个仓库,三个动作Three repos, three actions
整个系统只有三类仓库、三个连接动作。平台拥有「轨道」(模板和规则),你拥有「货物」(你的 Agent)。 The whole system is three kinds of repos connected by three actions. The platform owns the rails (template and rules); you own the cargo (your agent).
flowchart LR
subgraph PLAT["Platform · turingplanet"]
TPL["agent-template
the scaffold"]
POL["policies@vN
review flow · schema · AI reviewer"]
REG["agent-registry
members.yaml + migration bot"]
end
MEM["your-agent
(your account)
/api · /mcp · review.yml"]
TPL -->|"1. COPY — scaffold once; then detaches"| MEM
MEM -.->|"2. REFERENCE — every PR calls policies@vN"| POL
MEM -->|"registered in members.yaml"| REG
REG ==>|"3. SYNC — bot opens update PR, never auto-merges"| MEM
复印一次,然后是你的Copied once, then yours
用 copier copy 从模板生成你的仓库 —— 就像复印一张菜谱卡。之后这份副本完全属于你,模板再变也不会自动改你的代码。Scaffold your repo from the template with copier copy — like photocopying a recipe card. The copy is yours; later template changes never touch your code on their own.
按版本号引用规则Rules pinned by version
你的 CI 引用 policies@vN —— 固定版本、永不强制升级。审查在你自己的仓库里跑,什么都不会发给平台。Your CI references policies@vN — pinned, never force-upgraded. Review runs inside your own repo; nothing is sent to the platform.
更新以 PR 形式送达Updates arrive as PRs
平台发新版本时,机器人在你的仓库开一个 PR —— 这就是通知本身。永远不会自动合并,合不合并由你决定。When the platform ships a new version, a bot opens a PR on your repo — the PR is the notification. It never auto-merges; merging is your call.
门禁做决定,AI 只提建议。PR 能否合并由确定性的自动检查(安装、测试、lint、安全扫描)说了算;AI 审查员只留评论,永远无权拦截你的 PR。 The gate decides, the AI only advises. Whether a PR can merge is determined by deterministic checks (install, tests, lint, security). The AI reviewer leaves comments only — it can never block you.
为什么可以信任它Why you can trust it
这个平台是按「怀疑者优先」设计的。以下每一条都可以在公开代码里自己验证。 This platform was designed skeptic-first. Every claim below is verifiable in the public code.
- ✓一切公开、可审计。模板(agent-template)、规则与审查流程(policies)、本文档,全部是公开仓库。没有任何隐藏逻辑。 Everything is public and auditable. The template (agent-template), the rules and review flow (policies), and these docs are all public repos. No hidden logic.
- ✓模板不含、也不索取任何密钥。脚手架生成的代码里没有 secret,不要求你交出任何 token。AI 审查用的 API key 由你自己保管、放在你自己仓库的 secret 里,不配置就自动跳过。 The template contains no secrets and asks for none. The scaffold ships zero secrets and never asks you to hand over a token. The AI-review API key is yours, stored in your own repo's secrets — leave it unset and that step is skipped gracefully.
- ✓任何改动只能以 PR 形式到达你的仓库,永不自动合并。机器人没有直接改你 main 分支的能力;每个更新 PR 还要先过你自己的门禁。 Changes reach your repo only as PRs, never auto-merged. The bot cannot touch your main branch directly, and every update PR must pass your own gate first.
- ✓门禁是确定性的,AI 无权拦截。决定 PR 命运的是可复现的自动检查;AI 只能评论。你不会被一个黑盒模型卡住。 The gate is deterministic; the AI cannot block you. Reproducible automated checks decide your PR's fate; the AI can only comment. You'll never be stuck behind a black-box model.
- ✓加入舰队完全可选。你可以只用模板独立开发和部署,永远不注册。注册的唯一作用是让更新机器人知道给你的仓库开 PR。 Joining the fleet is optional. You can scaffold, build, and deploy entirely on your own and never register. Registration only tells the update bot to open PRs on your repo.
「下载仓库」?不 —— 你到底得到了什么"Download a repo"? No — here's what you actually get
加入平台不是下载我们的代码库。copier copy 会为你生成一个全新的、属于你自己的仓库 —— 十几个小文件,五分钟就能全部读完。以下就是全部内容:
Joining does not mean downloading our codebase. copier copy generates a brand-new repo that belongs to you — about a dozen small files you can read in full in five minutes. This is everything:
my-agent/
├── agent.manifest.yaml # 你仓库的「说明卡」:怎么构建、怎么测试# your repo's index card: how to build & test
├── .copier-answers.yml # 记录模板版本,未来更新用# records the template version, for future updates
├── config.py # 唯一的配置文件(端口 / 模型 / 环境变量)# the single config file (port / model / env vars)
├── pyproject.toml # Python 依赖(poetry)# Python dependencies (poetry)
├── railpack.json # 一键部署到 Railway 的启动配置# zero-config deploy to Railway
├── api/ # FastAPI 接口 —— 你的业务逻辑写在这里# FastAPI endpoints — your business logic goes here
├── mcp_server/ # MCP 服务器 —— 让 AI 客户端连接你的 Agent# the MCP server — lets AI clients connect to your agent
├── tests/ # 起步测试# starter tests
├── scripts/ # 可选:注册进舰队的脚本# optional: the fleet-registration script
└── .github/workflows/
└── review.yml # 你的 CI:引用 policies@vN 跑审查门禁# your CI: references policies@vN to run the gate
没有安装器、没有后台进程、没有向外发送数据的代码。生成之后它就是一个普通的 Python 小项目,跑不跑、传不传 GitHub、部不部署,全由你决定。 No installer, no background process, no code that phones home. Once generated it's just a small ordinary Python project — whether you run it, push it, or deploy it is entirely up to you.
先试 30 秒 —— 什么都不用装Try it in 30 seconds — install nothing
舰队里的 Agent 就是一个可连接的 MCP 服务。用 Claude Code 一条命令连上一个真实在线的成员 Agent,亲手调用它的工具: A fleet agent is simply a connectable MCP service. With one Claude Code command, connect to a real, live member agent and call its tools yourself:
claude mcp add --transport http legion-demo https://legion-demo-production.up.railway.app/mcp
然后在 Claude 里问一句「用 legion-demo 打个招呼」。没有 Claude Code?直接在浏览器打开它的 API 文档(Swagger) 点几下试试 —— 这也是每个成员 Agent 自带的。你刚刚体验到的,就是你自己的 Agent 部署后的样子:/mcp 给 AI 客户端,/api 给普通 HTTP 调用。
Then ask Claude to "say hi using legion-demo". No Claude Code? Open the agent's API docs (Swagger) in your browser and click around — every member agent ships this too. What you just experienced is exactly what your own agent looks like once deployed: /mcp for AI clients, /api for plain HTTP.
快速开始Quickstart
前置条件:Python 3.11+、Copier、Poetry。 Prerequisites: Python 3.11+, Copier, Poetry.
-
生成你自己的 Agent 仓库Generate your own agent repo
回答几个问题(项目名默认取文件夹名;是否注册进舰队 —— 可以选否)。 Answer a few questions (project name defaults to the folder; fleet registration — feel free to say no).copier copy gh:turingplanet/agent-template ./my-agent && cd my-agent -
本地跑起来,冒烟测试Run it locally, smoke-test
让 Claude 直接连上本地的 MCP 服务器: Connect Claude straight to the local MCP server:poetry install && poetry run pytestclaude mcp add my-agent -- poetry -C "$(pwd)" run python "$(pwd)/mcp_server/server.py" -
写你的业务逻辑Write your business logic
改api/和mcp_server/里的占位代码。开 PR 时,你仓库自己的门禁会跑安装、测试、lint、安全检查。 Replace the placeholder code inapi/andmcp_server/. When you open a PR, your repo's own gate runs install, tests, lint, and security checks. -
(可选)一键部署(Optional) Deploy in one step
仓库自带 Railway 零配置部署(railpack.json)—— 推上 GitHub、在 Railway 里选中仓库即可上线,自动获得公网/mcp和/api。生成的 README 里有完整步骤。 The repo ships zero-config Railway deployment (railpack.json) — push to GitHub, select the repo in Railway, and you're live with a public/mcpand/api. Full steps are in your generated README.
常见问题Common questions
| 问题Question | 简短回答Short answer |
|---|---|
| 规则(policies)更新了,我要手动跟进吗?会有人通知我吗?policies changed — do I update by hand? Will I be told? | 你被固定在指定版本上,永远不会被强制升级。机器人会在你的仓库开一个升级 PR —— 那个 PR 就是通知;也可以随时手动改版本号。You're pinned and never force-upgraded. The bot opens an upgrade PR on your repo — that PR is the notification; or bump the version by hand anytime. |
| 模板更新了怎么办?我的代码会被覆盖吗?The template changed — will my code get overwritten? | 机器人开一个 copier update PR,三方合并保留你的代码;有冲突会以标记形式留给你解决。不合并就什么都不变。The bot opens a copier update PR; the 3-way merge preserves your code, and conflicts surface as markers for you to resolve. Don't merge, and nothing changes. |
| AI 审查会拦住我的 PR 吗?Can the AI review block my PR? | 不会。AI 只能留评论;能否合并只由确定性的自动检查决定。No. The AI can only comment; merging is decided solely by the deterministic checks. |
| 我可以退出吗?Can I leave? | 随时。你的仓库本来就归你;从 members.yaml 移除后机器人不再给你开 PR,你的 Agent 照常运行。Anytime. Your repo was always yours; removal from members.yaml just stops the bot's PRs — your agent keeps running unchanged. |