关于 async-repl-protocol
用于测试时操作 Agentica 异步 REPL harness 的技能,说明何时对返回 Future 的工具使用 await,并要求计算和返回内容放在同一个代码块中。
主要功能
- 01对返回 Future 的工具使用 await
- 02每条回复只写一个代码块
适用场景
- 01在测试中调用异步工具
- 02从 REPL 返回计算结果
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ parcadei/ continuous-claude-v3 --skill async-repl-protocol安装后在 Claude Code 中输入/async-repl-protocol确认已加载。
详细介绍
异步 REPL 协议
使用 Agentica 的异步 REPL 测试工具时。
规则
1. 对返回 Future 的工具使用 await
content = await view_file(path) # NOT view_file(path)
answer = await ask_memory("...")
2. 每次回复只能包含一个代码块
在一个代码块中计算并返回。多个代码块意味着只有第一个会执行。
# GOOD: Single block
content = await view_file(path)
return any(c.isdigit() for c in content)
# BAD: Split blocks (second block never runs)
content = await view_file(path)
评论
支持 Markdown