ao-answer
它能做什么
这项技能找出卡住等待你处理的 AI 编程会话。它会显示每个问题或审批请求,方便你直接在聊天中作答。
适用场景
- ✓当你想知道哪些智能体会话正在等待你的回复的时候。
- ✓当智能体请你批准某项更改或选择某个选项的时候。
- ✓当你希望智能体按照你设定的规则处理等待中的问题的时候。
技能链接
https://github.com/OrchestratorInc/agent-orchestrator/blob/main/integrations/grok-bot/skills/ao-answer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想现在就看看我的 AO 项目里有什么在等我处理。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查每台电脑上正在等待或被阻塞的会话,并列出待处理的问题。你的选择会按照你的原样发送到该会话。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Follow the ao-rules skill. Its "Decisions" section says who may answer. Answers go straight to the worker, not through the orchestrator: the user's pick must arrive exactly as given.
1. Find what's waiting
On every host, in parallel:
f(){ <aoapi helper>
aoapi GET 'sessions?active=true' | python3 -c '
import json,sys,time,calendar
now=time.time()
for s in json.load(sys.stdin)["sessions"]:
st=(s.get("activity") or {}).get("state"); t=(s.get("lastEventAt") or "")[:19]
if st in ("waiting_input","blocked"): print("W", s["id"])
elif st=="idle" and t and now-calendar.timegm(time.strptime(t,"%Y-%m-%dT%H:%M:%S"))<86400: print("I", s["id"], s.get("lastEventAt"))' |
while read -r k id at; do
if [ "$k" = W ]; then
aoapi GET "sessions/$id/conversation" | python3 -c '
import json,sys
d=json.load(sys.stdin); found=False
for a in d.get("activities") or []:
if a.get("activityKind") in ("approval","user_input") and a.get("status")=="pending":
found=True; print(json.dumps({"session":sys.argv[1],"kind":a["activityKind"],"requestId":a.get("requestId"),
"summary":a.get("summary"),"decisions":a.get("decisions") or (a.get("detail") or {}).get("decisions"),"detail":a.get("detail")}))
if not found: print(json.dumps({"session":sys.argv[1],"kind":"reply"}))' "$id" 2>/dev/null
else
aoapi GET "sessions/$id/history?offset=0&limit=1" | python3 -c '
import json,sys,re
t=(json.load(sys.stdin).get("turns") or [{}])[0]; r=(t.get("agentResponse") or "").strip()
if re.search(r"\?[\s*_`)\]]*$", r): print(json.dumps({"session":sys.argv[1],"kind":"reply","lastEventAt":sys.argv[2],"asked":r[-300:]}))' "$id" "$at" 2>/dev/null
fi
done; }; f
Each line is one thing waiting:
kind |
What it is |
|---|---|
approval |
Permission to run a command or change files. summary and detail.input say what; decisions are the options [{id, kind, label}] |
user_input |
A question. detail.message asks it; detail.schema.properties are the fields, with choices in enum or oneOf |
reply |
The agent asked in plain text: a session that waits with no request (or a terminal session), or an idle session from the last 24 hours whose last reply ends with a question (asked holds its end). Read its last reply (ao-status "One session in detail") |
In the AO waiting check routine: keep what you already showed in ~/.ao-grok/shown.txt on via, one line per item (<host> <session> <requestId>, or <host> <session> reply <lastEventAt> for a reply), and message only about new items. Send nothing when nothing new is waiting.
2. Show it
Per session, one short briefing first: <host>/<session> and its name, what it is doing, and what it asks, in one or two sentences. Don't recommend anything. Then:
approval: the command or change verbatim, the risk you judge (ao-rules), and thedecisionslabels exactly as options in one card. Mark a decision whosekindisallow_alwaysas "changes this agent's permissions for good".user_input: one card with every question in it, in order (the card pages through them). A field withoneOforenumis a question: use theoneOftitles orenumvalues as its options, exactly. A field whose_meta._askUserQuestionCustomAnswer.questionIdnames another field is that question's "Other" box: show it as a typed-answer option on that question, not as its own question. Any other free-text field is a question with a typed answer.detail.inputModeurlcan't be answered from chat: tell the user to open AO.reply: the agent's question from its last reply, with options if it gave clear ones, else ask for a typed answer.
Several sessions at once: explain them together, then cards per session.
3. Answer
On the owner host, from its via computer:
- Approval:
aoapi POST "sessions/<id>/conversation/approvals/<requestId>/resolve" "$(python3 -c 'import json,sys; print(json.dumps({"decisionId":sys.argv[1]}))' '<decision id>')" - Question:
contentmaps each field name to the pick. For a picked option use itsoneOfconst(or theenumvalue), not the title. For a typed "Other" answer, put the text under the "Other" field (for examplequestion_0_custom) and leave its question out:aoapi POST "sessions/<id>/conversation/inputs/<requestId>/resolve" "$(python3 -c 'import json,sys; print(json.dumps({"action":"accept","content":json.loads(sys.argv[1])}))' '{"<field>":"<pick>"}')"The user says no or skip: `{"act
常见问题
它会不经询问替我回答吗?
只有在你为此设定了规则时才会,例如离开模式或长期有效的批准。
我的回答在发送给智能体之前会被修改吗?
不会。你的选择会按你给出的原样发送给工作智能体。
如果一个空闲的会话提出了问题怎么办?
这项技能也会列出过去一天内、且最后一次回复中提出了问题的空闲会话。
详情
作者的原始描述
Find AO sessions that wait on the user, show each question or approval as tap-to-answer options, and send the answer back to that session, following ao-rules "Decisions" (default, away mode, standing approvals). Use for "what's waiting on me", "answer <session>", "approve it", the AO waiting check routine, and away mode.
热度
- GitHub 星标
- 14k
- 排名
- #11261
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …