sub-pi-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sub-pi-agentask Pi to review the auth module and run its tests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sub-pi-agent
把任务交给可复用的 Pi agent,让主 agent 专注规划和审查。
独立的 stdio MCP 服务,适用于 Codex 和其他 MCP 客户端。支持命名 agent、跨 MCP 重启保留上下文、提问交回和运行中纠偏;等待由 MCP 处理,无需主模型反复轮询。无需 Codex App Server、桌面事件注入或专用启动器。
怎么用
例如,让 Pi 检查一个模块并运行相关测试,主 agent 同时处理其他工作。Pi 缺少信息时交回问题,主 agent 回答后继续同一个会话;任务完成后读取结果并审查,需要修改时也不用从头交代背景。
Related MCP server: pi-agent-mcp
快速开始
需要 Node.js ≥22.19.0,以及已配置模型和认证的 Pi。尚未配置时,先按 Pi 官方说明安装 CLI,运行 pi,用 /login 和 /model 完成配置。本服务内置 Pi SDK 1.2.0,读取同一套配置,不依赖全局 Pi CLI 执行任务。
1. 接入 Codex
把下面配置加到 ~/.codex/config.toml,然后重新加载 MCP:
[mcp_servers.pi]
command = "npx"
args = ["-y", "sub-pi-agent@0.1.1"]
startup_timeout_sec = 120
tool_timeout_sec = 600Windows 若无法启动 npx,将 command 改为 "npx.cmd"。其他 MCP 客户端、源码安装及配置说明。
2. 派发第一个任务
在客户端让主 agent 调用 pi_spawn_agent,传入下面的参数。将 cwd 替换为实际项目的绝对路径:
{
"name": "review-project",
"description": "梳理项目结构和测试入口",
"cwd": "/absolute/path/to/project",
"task": "阅读项目说明,概括项目结构和测试入口。不要修改文件;缺少必要信息时交回问题。"
}省略 model 使用该项目下的 Pi 默认模型。任务会调用模型,可能产生费用。
3. 等待并读取结果
保存返回的 session_id。有独立工作就继续做;没有时调用 pi_wait_agent,传入 {"session_id":"<返回的 ID>"}。
done:调用pi_get_result读取交付并审查needs_input:调用pi_poll_agent读问题,再用同一 ID 调用pi_continue_agent,将答案放在task中等待超时:任务仍在运行,可以再次等待
error/interrupted:用pi_get_result查看错误和部分结果
以上读取工具都使用同一个 session_id。任务结束后可用 pi_release_agent 卸载资源,之后仍能继续上下文。完整流程和参数见工具参考;首次接入可按冒烟测试验证。
使用边界
Pi 以启动 MCP 的本机用户权限访问文件和执行命令,没有独立沙箱;请只在可信项目中使用
会话和结果保存在本机,跨重启可恢复;MCP 退出会中断执行,需显式继续
没有反向实时通知,不会在上层聊天结束后自动唤醒主 agent
文档
安装与配置:客户端接入、模型设置优先级
工具参考:11 个工具、状态、纠偏、提问与未读提醒
数据与生命周期:存储目录、环境变量、恢复与权限
验证与排障:冒烟测试、常见错误和处理方法
开发与发布:测试、打包和发布
来源与许可
基于 Courtney Andrew Richardson 的 crichalchemist/agent-pi 1.8.0(f3ac8c1)修改,保留原版 MIT LICENSE。本版本增加持久化会话、提问交回、未读事件、等待与精简活动状态,并整理为独立 MCP/npm 入口。
Available Tools
11 toolspi_continue_agentA
Continue a registered agent by explicit ID, retaining its Pi conversation/tool context. For needs_input, pass the answer as task; otherwise pass the next assignment. Returns identity/status immediately. Do independent work or use pi_wait_agent when idle; pi_poll_agent inspects progress/questions and pi_get_result reads final delivery. Restores released sessions after MCP restart, rejects running agents, never imports arbitrary Pi CLI sessions. Omit model to follow current Pi settings.
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| model | No | Optional explicit override; omitted uses current Pi default. | |
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so well: it states the call 'Returns identity/status immediately,' 'Restores released sessions after MCP restart,' 'rejects running agents,' and 'never imports arbitrary Pi CLI sessions.' These are non-obvious behavioral traits. It stops short of describing error/response shape, which slightly holds it below 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose, then conditional parameter rules, return behavior, sibling routing and constraints in dense but non-redundant clauses. The final routing sentence packs several ideas together, but every sentence contributes information an agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No annotations and no output schema means the description must carry behavior and returns, which it does: immediacy of return, restart recovery, rejection of running agents and CLI-session exclusion are all covered. A brief note on the response contents would make it fully self-sufficient, but it is close.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is only 33% (model alone is documented), so the description must compensate. It explains task semantics well ('pass the answer' for needs_input, otherwise the next assignment) and confirms session_id is a 'registered agent by explicit ID,' while model guidance matches the schema. This largely fills the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Continue a registered agent by explicit ID, retaining its Pi conversation/tool context,' which clearly separates it from spawning a new agent. It names pi_wait_agent, pi_poll_agent and pi_get_result, but never distinguishes itself from the confusable pi_followup_agent or pi_steer_agent, leaving some sibling ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete when-to-use rules: 'For needs_input, pass the answer as task; otherwise pass the next assignment' and 'Do independent work or use pi_wait_agent when idle.' It routes to three alternatives with their roles, but does not address when NOT to use this versus pi_followup_agent or pi_steer_agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_followup_agentA
Queue a follow-up message for a spawned Pi agent. Delivered only after the agent finishes all work. Use this when you do not want to interrupt the agent at all.
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the key trait: the message is queued and only delivered after all work completes. However, it says nothing about failure modes (invalid/terminated session_id), whether the call blocks, or what happens if the agent never finishes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, no filler, with the core behavior and the non-interrupting condition front-loaded. Every sentence adds distinct information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with no output schema this is close, but the absence of any guidance on obtaining a valid session_id, error behavior, or interaction with pi_wait_agent/pi_get_result (which the agent likely needs to retrieve the eventual result) leaves gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it only partially does. It implies 'message' is the follow-up text and 'session_id' identifies the target agent, but gives no format, sourcing (where a session_id comes from), or constraints for either required parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Queue') and resource ('follow-up message for a spawned Pi agent'), plus a scope-defining behavior ('delivered only after the agent finishes all work'). This lets an agent distinguish it from pi_steer_agent, which implies interrupting the agent mid-run.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use this when you do not want to interrupt the agent at all' is an explicit usage condition that implicitly routes away from pi_steer_agent. It stops short of naming the alternative sibling or stating exclusions (e.g., what to do if the agent has already finished).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_get_resultA
Read final delivery, without waiting: done returns the last Pi reply, error/interrupted returns the final partial reply and error in the JSON body. Before final delivery exists, returns only {ready:false,reason,next}, never progress or a question body; use pi_poll_agent. Reading final delivery acknowledges its unread event. Results remain readable after release or MCP restart.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and delivers: the differing return body per terminal state, the exact non-final payload ({ready:false,reason,next}), the guarantee that no progress/question body is ever returned, the side effect that reading acknowledges the unread event, and persistence across release or MCP restart. That is genuinely non-obvious lifecycle and side-effect context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose is front-loaded in the first clause and every subsequent clause adds a distinct fact (state bodies, non-final shape, routing to pi_poll_agent, ack side effect, retention). The middle is dense with chained clauses, which slightly hurts readability but not information density.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description does the heavy lifting by spelling out the JSON bodies for each state and the durability guarantee. It stops short of covering failure modes (e.g. unknown or released session_id) and full field semantics of the done payload, which an agent would still have to discover.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description never mentions session_id or its expected format, so it adds nothing over the schema's single required string. The parameter name is self-explanatory for a session-scoped call, which keeps this at a minimum-viable 3 rather than lower.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Read final delivery') and immediately defines its semantics for each terminal state (done / error / interrupted), which distinguishes it from the sibling family. It also names pi_poll_agent as the tool for the not-yet-final case, so an agent can route without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Read final delivery, without waiting' plus 'Before final delivery exists... use pi_poll_agent' gives an explicit when-to-use and a named alternative. It does not mention pi_wait_agent or when blocking would be preferable, so the exclusion set is incomplete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_list_agentsA
List only this MCP registry, including unloaded recoverable agents. Compact identity/status metadata, no transcript. active means running; needs_input means Pi handed back a question: poll it, then continue the same ID with an answer. Listed agents become eligible for this connection's unread event reminders. Does not refresh idle timers.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional absolute project directory filter. | |
| status | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so unusually well: it discloses a side effect ('Listed agents become eligible for this connection's unread event reminders') and an explicit non-effect ('Does not refresh idle timers'), plus the scope limit of unloaded-but-recoverable agents. This is exactly the behavioral context an agent cannot infer from structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads scope and return shape in the first two clauses, then adds operational detail, so nothing is buried. It is dense and slightly run-on across semicolons, but each clause carries distinct, non-redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description correctly specifies return content ('compact identity/status metadata, no transcript'). It covers the state model and side effects, but is silent on result size, ordering, or whether the status filter matches exactly one state.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: cwd is self-documented in the schema, and the description explains the meaning of two enum values (active, needs_input) that the schema leaves bare. The remaining three status values (done, error, interrupted) are undefined in both places, and no filtering/combination semantics are given, so it adds only partial compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('List only this MCP registry') and immediately scopes it against the sibling set by naming what is included (unloaded recoverable agents) and what is not returned (transcript). An agent can distinguish this from pi_list_models and the poll/wait/get_result family without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete workflow routing for the needs_input state: 'poll it, then continue the same ID with an answer,' which names the downstream tools to use. It does not present explicit when-not-to-use guidance or contrast itself against pi_poll_agent/pi_wait_agent for the general case, so it falls short of full alternative mapping.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_list_modelsA
List Pi models available for this session with tier labels (fast/balanced/frontier).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full disclosure burden. It usefully reveals the response content (tier labels) and scopes results to the current session, but says nothing about read-only nature, ordering, errors, or whether a session must already exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler. The verb and resource come first, followed by the scope and the useful output detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a trivial zero-argument read tool with no output schema, the description covers what is returned and the scope of 'available.' Minor omissions only (ordering, whether models are session-bound or global) keep it short of perfect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. There are no parameter semantics to explain, and the description correctly adds nothing extraneous about inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (List) and resource (Pi models) plus the scope ('available for this session') and the return content (tier labels fast/balanced/frontier). The resource is wholly distinct from every sibling, which all manage agents, so an agent can route to it unambiguously.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: the agent can infer this is a discovery call for picking a model, presumably before pi_spawn_agent. There is no explicit when-to-use statement, no note that it takes no arguments, and no pointer to the sibling that consumes the result.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_poll_agentA
Immediately read latest assistant text, compact activity metadata and any pending question, without reasoning text or raw tool records. output can stay unchanged while Pi thinks or runs tools; activity shows the latest phase/tool and its update time. needs_input returns question {id,text}: answer via pi_continue_agent on the same ID. Reading a question acknowledges its reminder; polling does not acknowledge final delivery. When idle, use pi_wait_agent instead of repeatedly polling.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does substantial work: output can stay unchanged while Pi thinks, activity reports latest phase/tool and update time, reading a question acknowledges its reminder while polling does not acknowledge final delivery. It omits error behavior, session validity, and rate-limit concerns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Information is dense and front-loaded: what is returned, what is excluded, then the two behavioral edge cases and the sibling routing. It is telegraphic but each clause carries meaning; minor terseness ('activity shows the latest phase/tool') slightly hurts readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter polling tool with no annotations or output schema, the description covers return semantics, polling/acknowledgement behavior, and alternative routing well. The remaining gap is the undefined session_id, which no other structured field supplies.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single session_id parameter has 0% schema description coverage and the description never defines it — it only alludes to 'the same ID' in the context of pi_continue_agent. With one undocumented parameter, the description does not compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('read') and enumerates the resource precisely: latest assistant text, compact activity metadata, pending question, while explicitly excluding reasoning text and raw tool records. It names sibling pi_wait_agent, so an agent can distinguish it without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear routing rule ('When idle, use pi_wait_agent instead of repeatedly polling') and prescribes a follow-up path for the needs_input case ('answer via pi_continue_agent on the same ID'). It lacks guidance on frequency/backoff outside the idle case, so it stops short of full when/when-not coverage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_release_agentA
Unload an idle agent runtime and release its write lease, retaining its name, description, results and native Pi session on disk for later continuation. Rejects busy agents. Does not delete the agent or its context.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses the mutating act (releasing the write lease), the precondition (busy agents are rejected), and the reversibility profile (name, description, results and session retained). It stops short of covering failure modes, permissions, or how the agent becomes active again.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences, front-loaded with the core action, then the precondition, then the non-destructive guarantee. No filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter mutation with no output schema and no annotations, the description covers the important behavioral facts: what is released, what is preserved, and the idle precondition. Only minor gaps (no return/error behavior) remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description never mentions session_id, so it adds no meaning beyond the bare schema. The single parameter is largely self-evident, keeping this at a minimum-viable 3 rather than lower.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb and resource ('unload an idle agent runtime and release its write lease') and explicitly delineates what it does NOT do ('Does not delete the agent or its context'), which separates it from the pi_terminate_agent sibling. An agent can identify the operation without opening schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states a clear precondition ('Rejects busy agents') and an implicit context (retaining state 'for later continuation', i.e., when you want to free a runtime without ending the agent). It does not explicitly name alternatives like pi_terminate_agent or pi_continue_agent, so it lacks the direct when/when-not routing of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_spawn_agentA
Start a named Pi agent asynchronously. Returns identity/status, not a completed result. Continue independent work; when idle, call pi_wait_agent instead of repeatedly polling. pi_poll_agent reads progress or a needs_input question; answer through pi_continue_agent on the same ID. Read final delivery with pi_get_result once done. Unread events may accompany any tool response; no live notifications. Use pi_list_agents for reuse. Omit model to follow Pi settings.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute task/project working directory. Pass it explicitly when the MCP client starts servers outside the project. | |
| name | No | Optional human-readable agent name; generated when omitted. | |
| task | Yes | Task description for the Pi agent | |
| model | No | Optional model key in "provider/model-id" format (e.g. anthropic/claude-sonnet-4-6, openai/gpt-4o). Omit to use the model resolved from the user's current Pi settings default (read per task, so a settings change applies to the next spawn). Pass an explicit model to override it. | |
| description | No | Optional short description to help identify and reuse this agent. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so well: asynchronous execution, that the response is identity/status rather than a result, that there are no live notifications, that unread events may ride along with any tool response, and how model defaulting behaves. It does not discuss permissions, concurrency limits, or cost, so it falls short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action and return semantics, then lifecycle routing. It is dense and largely earn-your-place, though the telegraphic style (semicolon-joined fragments) makes it slightly harder to parse than it needs to be.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no annotations, so the description must explain return shape and follow-up path — it does both. Given the 11-tool sibling set and 5-param schema, the definition gives an agent enough to spawn and drive an agent to completion; only auth/limits context is absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all five parameters including cwd, name, model format, and description. The one added line ('Omit model to follow Pi settings') restates what the model param description already says, so there is no real value beyond the schema. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Start a named Pi agent asynchronously') and immediately bounds the outcome ('Returns identity/status, not a completed result'), which is exactly the ambiguity an agent faces with a spawn tool. It also implicitly separates itself from pi_followup_agent/pi_list_agents by directing reuse to pi_list_agents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit when-to-use and when-not: continue independent work, call pi_wait_agent when idle rather than repeatedly polling, use pi_poll_agent for progress or needs_input, answer via pi_continue_agent, read final delivery with pi_get_result, and use pi_list_agents for reuse. Every sibling in the lifecycle is routed by condition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_steer_agentA
Queue a steering message for a running Pi agent. Returns the message verbatim plus a delivery status: {ok:true,message,status:"queued"} means only that Pi accepted it for delivery after the current assistant turn finishes its tool calls — it does NOT mean the message was delivered or that Pi has responded. {ok:false,message,status:"rejected",reason} means nothing was sent (unknown session, session not running, or Pi refused the steer). Use pi_followup_agent to queue a message for after all work is finished.
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and delivers: it discloses that 'queued' is an acceptance receipt, not delivery; that delivery occurs only after the current turn's tool calls; and that rejection covers unknown session, non-running session, or a refusal. That async, non-interrupting semantics is exactly the context an agent would otherwise get wrong.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose and routing come first, and the return-shape documentation is needed because there is no output schema. The status tuples are dense but each clause carries information; slight redundancy in restating ok/message/status fields keeps it from a 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with no annotations and no output schema, the description covers purpose, alternative routing, success semantics, and all known failure modes. The remaining hole is parameter meaning and any note on ordering when multiple steers are queued.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must supply meaning for session_id and message, and it supplies none. Both names are largely self-evident, which softens the gap, but the description does not say where session_id comes from (e.g., a pi_spawn_agent result) or any constraints on message content/length.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence states a specific verb (queue), resource (steering message), and precondition (for a running Pi agent). It explicitly names the sibling pi_followup_agent and the condition that distinguishes the two, so an agent can route correctly without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear routing rule: use pi_followup_agent 'to queue a message for after all work is finished,' implying this tool is for mid-run steering. The when-to-use is strongly implied by 'running Pi agent' plus the contrast, but no explicit statement of when steering is inappropriate (e.g., agent idle or nearly done) is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_terminate_agentA
Stop the current task, mark it interrupted, and return its partial latest reply. Retains the registered agent and context for explicit continuation; use pi_release_agent to unload an idle runtime.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses the mutation (task stopped), the state transition (marked interrupted), what is preserved (registered agent and context), and what is returned (partial latest reply). It omits idempotency, permission requirements, and whether a stopped agent can be resumed only via continuation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler; the action and its side effects come first, and the sibling-routing clause follows. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema or annotations exist, so the description must explain effects and returns; it does cover both, plus continuation semantics. The only material gap is the undocumented session_id parameter.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description never mentions session_id, so the single parameter's meaning is left entirely to the caller's inference. The name is suggestive but the definition adds no semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Stop the current task') and enumerates the observable effects (marks it interrupted, returns partial latest reply). It explicitly contrasts itself with the sibling pi_release_agent, so an agent can pick between the two without reading either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear when-not rule: use pi_release_agent to unload an idle runtime instead of terminating. It also states the continuation path (the agent/context is retained). No guidance is offered relative to pi_steer_agent or pi_followup_agent, but the primary discriminator is present.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_wait_agentA
When no independent work remains, wait for this agent to need input, finish, fail or be interrupted. The MCP process waits without calling a model; progress changes alone do not wake it. Already actionable states return immediately. Returns {status,timed_out,next}; no progress, question or delivery body, and no event acknowledgement. On timeout Pi keeps running: wait again or inspect progress. Read questions with pi_poll_agent and final delivery with pi_get_result. Cancelling the wait does not stop Pi.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| timeout_ms | No | Maximum wait in milliseconds (default 180000 / 3 minutes, max 300000 / 5 minutes). The MCP client tool timeout must exceed this duration. A timeout does not stop the agent. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does so richly: the wait calls no model, progress changes alone do not wake it, the return shape is {status,timed_out,next} with no body or acknowledgement, and timeout/cancellation leave Pi running. These are exactly the non-obvious traits an agent could not infer from the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose and guardrail lead the text, followed by return shape and recovery guidance; every sentence adds operational value. It is dense and slightly run-on, but there is essentially no filler to cut.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema and no annotations, the description discloses the return shape, the blocking semantics, and the timeout/cancel behavior an agent needs. Nothing required to call this correctly or interpret the result is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: timeout_ms is well documented in-schema, while session_id is undocumented in both places. The description reinforces timeout semantics ('On timeout Pi keeps running: wait again or inspect progress') but adds nothing about identifying the session, so it neither under- nor over-compensates for the gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (wait) on a specific resource (this agent) with the exact conditions that end the wait: need input, finish, fail, or be interrupted. It also scopes when the tool is appropriate ('when no independent work remains'), which cleanly separates it from the polling and result siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit timing guidance ('When no independent work remains'), an edge-case rule ('Already actionable states return immediately'), and named alternatives with their distinct roles: pi_poll_agent for questions, pi_get_result for final delivery. An agent knows exactly when to reach for this versus a sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v0.1.1- First observed
pi_continue_agent - First observed
pi_followup_agent - First observed
pi_get_result - First observed
pi_list_agents - First observed
pi_list_models - First observed
pi_poll_agent - First observed
pi_release_agent - First observed
pi_spawn_agent - First observed
pi_steer_agent - First observed
pi_terminate_agent - First observed
pi_wait_agent
TDQS
Scored across 11 tools
Most tools have clearly distinct purposes (spawn vs continue vs poll vs get_result vs terminate vs release). However, pi_steer_agent, pi_followup_agent, and pi_continue_agent all send messages to agents with subtly different timing; while descriptions clarify, an agent could still momentarily confuse which to use.
All tool names use a consistent snake_case pi_ prefix followed by verb_noun (pi_spawn_agent, pi_list_agents, pi_get_result, etc.). The pattern is predictable and readable throughout.
With 11 tools, the set is well-scoped for asynchronous agent orchestration. Each tool covers a distinct lifecycle operation (spawn, list, poll, wait, continue, steer, followup, terminate, release, get result, list models) without redundancy.
The surface covers the full agent lifecycle: creation, monitoring, interaction, termination, and release, plus model listing. The only minor gap is the absence of a permanent delete operation—release intentionally retains agents, so cleanup beyond unloading is not possible.
Maintenance
Related MCP Connectors
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Discover and call AI agents via MCP. Supports A2A agents and platform agents with async tasks.
Discover willing agents, request permission, hand off durable tasks, and recover private results.
Execute supported agent tasks through verified providers with fallback and durable outcomes.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables MCP hosts to delegate coding tasks to Pi CLI as a programmable sub-agent with session tracking and process management.74MIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP hosts like Claude Code and Codex to spawn, manage, and interact with persistent, reusable Pi coding-agent sessions, supporting task dispatch, status checks, and session lifecycle control.2 npm-
- AlicenseAqualityAmaintenanceEnables delegating coding tasks to a pi agent as a steerable background worker, allowing mid-run redirection, follow-ups, and keeping the delegate's context isolated from your main conversation.1225 npm19MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients such as Claude Code and Codex to delegate background Pi Coding Agent tasks, inspect and steer running work, and recover saved checkpoints after server restarts.291 npm12MIT