Amp推出Threads HTTP API
AI 总结
据Amp Chronicle报道,Amp新增的Threads HTTP API可创建Amp orb线程、读取代理回复并发送后续消息。报告列出了令牌权限与请求示例,涵盖告警分诊、定时错误排查和调查main分支CI故障等自动化场景。对于组织或团队级自动化,报告建议使用连接到代码托管平台的服务账号,以便代理克隆代码仓库。
深度见解
该API为自动化系统提供了委派任务给Amp代理并持续处理线程的接口,可用于告警、CI、机器人及内部工作流集成。
You can now create Amp orb threads, read agent responses, and post follow-up messages through the HTTP API.
This makes it easy for any automated system to delegate work to Amp:
- Investigate alerts. An error tracker or paging webhook starts a thread for each critical alert.
- Fix CI failures. When CI fails on
main, a thread finds the cause and opens a fix PR. - Triage on a schedule. Every morning, a job sends the past day's top errors to Amp.
- Start threads from bots and internal tools. A Slack bot, a support workflow, or an issue-report queue starts a thread, then reads the result or sends a follow-up.
To try it, create a personal access token in Settings → Access Tokens with these scopes:
amp.api:threads:writeamp.api:threads.meta:readamp.api:threads.contents:read
If you're testing this in the terminal, set AMP_TOKEN to this value.