workspace
Read and write files in the shared session workspace. Use this to access files created by any skill — code-agent outputs, office documents, images, and more. All within the same isolated session.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Workspace
Provides unified read/write access to all files in the current session. The userId and sessionId are injected automatically — you only specify the logical path.
Path Conventions
| Prefix | What it accesses |
|---|---|
code-agent/<file> |
Files created by the code agent (auto-synced) |
code-interpreter/<file> |
Files saved by code interpreter via output_filename |
documents/powerpoint/<file> |
PowerPoint presentations |
documents/word/<file> |
Word documents |
documents/excel/<file> |
Excel spreadsheets |
documents/image/<file> |
Images from other tools |
Note: Code interpreter only saves to workspace when
output_filenameis set inexecute_code. Files fromexecute_commandorfile_operationsstay inside the sandbox.
Usage
See everything in the session:
workspace_list()
workspace_list("code-agent/")
Read a file the code agent created:
workspace_read("code-agent/calculator.png") # binary → base64
workspace_read("code-agent/report.md") # text → string
Pass a file from one skill to another:
result = workspace_read("documents/excel/data.xlsx") # encoding: base64
workspace_write("code-agent/data.xlsx", result["content"], encoding="base64")
Notes
- Text files return
encoding: "text"with plain string content - Binary files (images, Office docs, PDF, etc.) return
encoding: "base64" -
workspace_writeaccepts both encodings — use"base64"for binary - Files written here are immediately available to all other skills in the session
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!