llm-to-agent/docs/agent/tools-workspace.md
2026-08-21 16:33:23 +08:00

39 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tools 与 Workspace
Tool 是 Agent 主动调用外部能力的统一边界Workspace 是文件与 Shell 操作的默认作用域。
## Tool 契约与注册
- 期望实现阶段P1
- 实际开发状态:未开始
- 已确认点Tool 声明名称、描述、参数并返回结构化结果;实际执行由 Runtime 承载。
- 待确认点:参数 Schema、错误结果、流式 Tool 输出与注册 API。
## Task Workspace
- 期望实现阶段P2
- 实际开发状态:未开始
- 已确认点:位于 `~/.agent/tasks/<task-id>/workspace/`Shell 和文件 Tool 默认以其为作用域。
- 待确认点:初始化内容、路径展示、临时文件和清理行为。
## 文件 Tool
- 期望实现阶段P2
- 实际开发状态:未开始
- 已确认点:首批支持读写文件、目录浏览和文本搜索。
- 待确认点:补丁接口、编码处理、大文件限制与二进制文件策略。
## Shell Tool
- 期望实现阶段P2
- 实际开发状态:未开始
- 已确认点:记录命令、输出、退出码和错误;首期安全机制保持轻量。
- 待确认点:超时、取消、后台进程、交互命令和输出上限。
## 单 Agent Tool Calling
- 期望实现阶段P2
- 实际开发状态:未开始
- 已确认点Agent 自主选择 Tool、读取结果并继续调用模型直至给出最终回复。
- 待确认点:循环上限、失败反馈、并行调用和客户端事件协议。