Amp 把 Agent 推过代码边界:GPT-6 Astra 与 GPT-Live-1 的实战用法
💡 工具推荐:API 测试工具、JSON 格式化、Cron 表达式生成器、.env 生成器
OpenAI 在 10 月 14 日发布了 Amp 的客户案例,里面最有用的细节不是任何跑分。而是一家 20 人的公司用 Agent 顶掉了市场岗、部分 Amp 用户一周要烧掉 100 亿 token,以及 Amp 的 CEO 认为,界面上那个显眼的 token 计数器,恰恰就是让团队不敢去发现 Agent 能力上限的东西。这背后其实是一次路由决策:GPT-6 Astra 负责长周期任务、写作与设计,GPT-Live-1 负责实时语音,Ultrafast 模式负责延迟敏感的编辑。三个模型,三种活,一个产品。
Agent 早就不只是自动补全了,路由表是你能察觉这一点的方式
这个案例到底讲了什么
Amp 是 Sourcegraph 团队做的编码 Agent,CEO Quinn Slack 把每一次模型进步都理解成给 Agent 多让出一块空间——从帮开发者决定做什么,到写代码、设计页面。Amp 里消耗的 token 大部分走 OpenAI 的模型。案例里点名的几块很具体:GPT-6 Astra,团队用它产出文档和设计页面,而且要求符合一套非常挑剔的品牌风格;GPT-Live-1,支撑 Calling Puck,让用户能实时跟 Puck 说话;以及 Amp 正在用 Astra 测试的 Ultrafast 模式。Puck 本身值得多看一眼:它是 Amp 里的对话式助手,职责是启动和管理其它 Agent。这个产品不是「一个 Agent」,而是一个面向 Agent 机群的操控台,模型是按活挑的,不是按公司挑的。
# Three jobs, three models. Routing lives in a table so a reviewer can read it.
ROUTES = {
"plan_next_milestone": {"model": "gpt-6-astra", "mode": "standard", "why": "long horizon, quality first"},
"write_docs_and_landing": {"model": "gpt-6-astra", "mode": "standard", "why": "voice and design consistency"},
"edit_open_file": {"model": "gpt-6-astra", "mode": "ultrafast", "why": "a human is waiting keystroke by keystroke"},
"voice_control_fleet": {"model": "gpt-live-1", "mode": "realtime", "why": "turn taking, not batch"},
}
def route(task, latency_budget_ms=None):
plan = ROUTES.get(task)
if plan is None:
return {"model": "gpt-6-astra", "mode": "standard", "why": "unclassified task, take the careful path"}
if latency_budget_ms is not None and latency_budget_ms < 2000 and plan["mode"] == "standard":
return {**plan, "mode": "ultrafast", "why": "latency budget forces the fast path"}
return dict(plan)
print(route("edit_open_file"))
print(route("write_docs_and_landing", latency_budget_ms=1500))
# A model choice made in a code review comment is a model choice nobody can audit later.token 计数器本身就是个产品决策
Slack 提到有用户一周消耗 100 亿 token,并且说,如果人一直盯着用量的每一次增长,反而会限制自己去探索 Agent 到底能做什么。这也是 Amp 上线 Sign in with ChatGPT 的原因:它给用户更多 token 和更宽的模型访问权(包括 Astra),从而改变人们愿不愿意把更大的任务交出去。这一点最值得抄。如果你的平台在计量上做得非常激进,你观察到的就会是一堆保守用法,然后得出「Agent 也就这样」的结论。诚实的做法是:先定一个自己承受得起的预算,然后别在产品里一直盯着它。
# A fleet budget you can read out loud once a week beats a surprise invoice.
from collections import defaultdict
WEEKLY_CAP = 5_000_000_000
class Fleet:
def __init__(self, cap=WEEKLY_CAP):
self.cap = cap
self.spent = 0
self.by_agent = defaultdict(int)
def charge(self, agent, tokens):
self.spent += tokens
self.by_agent[agent] += tokens
share = self.spent / self.cap
verdict = "allow" if share < 0.85 else "throttle" if share < 1.0 else "stop"
return {"agent": agent, "spent": self.spent, "used_pct": round(share * 100, 2), "verdict": verdict}
fleet = Fleet()
for agent, tokens in [("planner", 1_200_000_000), ("marketing", 800_000_000), ("docs", 2_600_000_000)]:
print(fleet.charge(agent, tokens))
print(dict(sorted(fleet.by_agent.items(), key=lambda kv: -kv[1])))
# The marketing agent is the one nobody budgets for. Watch that line first.每周的 token 曲线,比任何发布稿都更能说明一个 Agent 平台的状态
路由应该写进表里,而不是留在评审人的记忆里
一旦承认不同的活需要不同的模型,下一个问题就是:这个决定存放在哪里。放在聊天记录里等于没存放。放进一张表里,它就进了代码仓库,任何改动都会出现在评审里。下面的表把任务映射到模型、模式和一句理由。最有意思的分支是延迟那一条:当有人正在逐字等待时,哪怕更慢的那个是更强的模型,它也是错的答案。
# Voice is a dispatcher. Keep the transcript, the intent and the spawned agent together.
import re
INTENTS = [
(re.compile(r"\b(start|launch|spawn)\b.*\b(bug|investigat\w*|debug)\b", re.I), "debug_agent"),
(re.compile(r"\b(coordinate|orchestrate)\b.*\bagents?\b", re.I), "orchestrator"),
(re.compile(r"\b(find|recall|search|where)\b.*\b(conversation|thread|earlier)\b", re.I), "history_search"),
]
def dispatch(transcript):
for pattern, action in INTENTS:
if pattern.search(transcript):
return {"action": action, "transcript": transcript, "confirmed": False}
return {"action": "clarify", "transcript": transcript, "confirmed": False}
for line in [
"start an agent to investigate the flaky checkout test",
"coordinate the agents working on the migration",
"where did we talk about the retry bug earlier",
]:
print(dispatch(line))
# confirmed=False on purpose. A command spoken into a watch should be cheap to undo.语音是机群的入口,不是一个功能点
Calling Puck 让用户能实时跟 Puck 对话,甚至在手表上,而 Slack 举的场景是你离开电脑时让 Agent 继续干活。这个定位很关键。这里的语音不是听写,也不是聊天机器人的升级版,它是后台工作者的调度入口:启动一个 Agent、协调好几个、找出一条早先的对话。如果你要做同样的事,请把一句语音当成「意图 + 一次确认」,而不是「转录一出来就直接执行」。语音识别会安静地出错,而一个 Agent 机群不会。
# Faster round trips buy you a second pass. Spend that budget deliberately.
def plan_for(round_trip_ms, wall_clock_budget_ms, max_passes=3):
passes = 0
remaining = wall_clock_budget_ms
while remaining > round_trip_ms and passes < max_passes:
passes += 1
remaining -= round_trip_ms
return {
"round_trip_ms": round_trip_ms,
"max_passes": passes,
"leftover_ms": remaining,
"strategy": "self-critique before returning" if passes >= 2 else "return on the first pass",
}
print(plan_for(round_trip_ms=1800, wall_clock_budget_ms=12000))
print(plan_for(round_trip_ms=400, wall_clock_budget_ms=12000))
# When models got fast, the useful question stopped being "how many agents" and became
# "how much checking can I afford before the human loses interest".Amp 用一个 Agent 顶了市场岗,且没有专职人员。这种决定值得写进文档
速度改变的是行为,不只是延迟
Amp 一直在用 GPT-6 Astra 测试 Ultrafast 模式,Slack 的观察偏行为层面而非技术层面:现在人们会在等待的过程中同时开好几个 Agent 任务;响应变快之后,可能变成同时只开更少的 Agent,或者把省下来的时间留给 Agent 自查。这个视角很适合用来理解你的墙钟预算。如果一个来回从 1.8 秒降到 0.4 秒,你提升的不仅是一个指标,而是在同一个人还能忍受的耐心窗口里,多买了两次复核。要不要花掉它,是个需要明确做出的选择,下面这段代码就是把它显式化。
# Amp's own framing: pull the work before and after code into the agent too.
WORKFLOW = [
("decide_what_to_build", "product", ["read_issues", "draft_options", "estimate_risk"]),
("write_the_code", "engineering", ["edit_files", "run_tests"]),
("grow_the_product", "marketing", ["rewrite_docs", "improve_onboarding", "draft_search_copy"]),
]
def handoff(workflow, owner_map=None):
owner_map = owner_map or {}
rows = []
for stage, function, tools in workflow:
rows.append({
"stage": stage,
"function": function,
"tools": tools,
"human_owner": owner_map.get(function, "unassigned"),
})
return rows
for row in handoff(WORKFLOW, {"engineering": "on-call", "product": "founder"}):
print(row)
# An agent covering a function with no human owner is a decision. Write it down.周一就能抄走的三件事
有三样东西很容易迁移。第一,把模型路由写成配置,每一行都带理由,这样这个决定就能活得比做决定的人更久。第二,按周给机群做预算,并且把 token 归因到具体 Agent,因为把预算打穿的那个,往往不是任何人眼里的「算力消耗大户」。第三,让语音指令可以撤销。Amp 自己的下一步,是把编码前后更多的工作也拉进 Agent,让人能把一个想法推得更远,而不必亲手处理每一步。这当然是一份产品路线图,但它也是个不错的自检标准:一个人周一开始的事情,到周五他还认得出吗?
📌 常见问题 FAQ
OpenAI 这篇 Amp 案例到底发布了什么?
这是一篇 2026 年 10 月 14 日发布的客户案例,讲 Amp 如何使用 OpenAI 的模型。内容包括 Sign in with ChatGPT 集成、用 GPT-6 Astra 做写作与设计、用 GPT-Live-1 支撑 Calling Puck 的实时语音,以及 Amp 用 GPT-6 Astra 测试 Ultrafast 模式。
Amp 用户会消耗多少 token?
Amp 的 CEO Quinn Slack 提到,部分用户每周消耗 100 亿 token。这也是 Sign in with ChatGPT 集成的背景:它给用户更多 token 和更宽的模型访问权。
Amp 里的 Puck 是什么?
Puck 是内置于 Amp 的对话式助手,帮用户启动和管理其它 Agent,比如启动一个 Agent 去排查 bug,或者协调多个 Agent。Calling Puck 在它之上加了实时语音,由 GPT-Live-1 驱动。
所有任务都该路由到最强的模型吗?
不该,要按任务形态路由。长周期规划与设计类工作值得上更强的模型,而交互式编辑通常由延迟主导。一张带理由的路由表能让这个决定保持可评审。
怎么避免多 Agent 平台把预算打穿?
按周跟踪开销,并把 token 归因到具体 Agent,每次调用都给出硬性结论。把 token 归到花掉它的那个 Agent,而不是归到「平台」整体,才能真正暴露那个意料之外的消耗方。