Skip to content

[Agents] Think works in a @cloudflare/computer Workspace - #34297

Draft
mattzcarey wants to merge 5 commits into
productionfrom
agents-computer-workspace-changelog
Draft

mattzcarey wants to merge 5 commits into
productionfrom
agents-computer-workspace-changelog

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Adds a changelog entry for Think moving to a @cloudflare/computer Workspace, and updates the Think docs to match. The Think tools page now covers Computer's workspace tools, exec backends, ws:tools, lazyWorkspace, and upgrading from Shell. The getting started, configuration, Agent Skills, Code Mode AI SDK and browser pages no longer use @cloudflare/shell.

This ships in cloudflare/agents #2559 to #2565:

  • @cloudflare/shell is deprecated, and Computer's tools replace Think's built-in tools (workspaceBash, createWorkspaceTools and @cloudflare/think/tools/workspace are removed, with no new config property; the Workspace backends decide exec)
  • createExecuteTool is deprecated in favour of exec with ws:tools
  • Shell data is not moved, so users have to copy it with the migration guide

Merge this when cloudflare/agents #2559 to #2565 are released. Update the changelog date to the release day, and check that the migration guide link resolves on main.

pnpm run check and pnpm run build pass. I checked the new anchors on the Think tools page in the build output.

@github-actions github-actions Bot added product:changelog product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. labels Oct 14, 2026

## Migrate your workspace data

This is a breaking change. Computer stores files in different tables from Shell, and nothing moves your data automatically. To keep an existing workspace, copy its files with the script in [Migrating from `@cloudflare/shell` to `@cloudflare/computer`](https://github.com/cloudflare/agents/blob/main/docs/shell/migrating-to-computer.md). If you do not, your agent starts with an empty workspace.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is a breaking change. Computer stores files in different tables from Shell, and nothing moves your data automatically. To keep an existing workspace, copy its files with the script in [Migrating from `@cloudflare/shell` to `@cloudflare/computer`](https://github.com/cloudflare/agents/blob/main/docs/shell/migrating-to-computer.md). If you do not, your agent starts with an empty workspace.
This is a breaking change. Computer stores files in different tables from Shell, and there is no automatic data migration between workspace formats. To keep an existing workspace, copy its files with the script in [Migrating from `@cloudflare/shell` to `@cloudflare/computer`](https://github.com/cloudflare/agents/blob/main/docs/shell/migrating-to-computer.md). If you do not, your agent starts with an empty workspace.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 5d5b441.

- Streams responses to a React chat UI
- Has persistent memory the model can read and write
- Includes workspace file tools (read, write, edit, find, grep, delete)
- Includes workspace file tools (read, ls, find, grep, write, edit, delete)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Includes workspace file tools (read, ls, find, grep, write, edit, delete)
- Includes workspace file tools (read, ls, find, grep, write, edit, delete) from @cloudflare/computer

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 5d5b441.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://agents-computer-workspace-changelog.previews.developers.cloudflare.com (commit 0e02e1b)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
fa33b00 2026-10-16T21:27:01.574Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://850a2411.previews.developers.cloudflare.com 0e02e1b 2026-10-14T13:44:21.277Z Visit the dashboard ↗
  • Build: In progress 🔵

View logs ↗
f782612 2026-10-14T13:23:56.394Z View logs ↗

@@ -581,7 +581,7 @@ The browser agent example uses the legacy tools. It covers Browser Run setup, to

### Think execute tool

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we remove this section

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, removed in 5d5b441. It only documented the deprecated execute tool, and the Think tools page already covers that with a deprecation notice. Nothing linked to the section.

@aron-cf aron-cf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Some comments inline. I need to get on those workspace docs.

@@ -0,0 +1,39 @@
---
title: Think agents now use a @cloudflare/computer Workspace
description: Think and Agent Skills now work in a Workspace from @cloudflare/computer. @cloudflare/shell is deprecated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Think and Agent Skills now work in a Workspace from @cloudflare/computer. @cloudflare/shell is deprecated.
description: @cloudflare/computer now provides the Think filesystem and execution environment. @cloudflare/shell is deprecated.

@@ -0,0 +1,39 @@
---
title: Think agents now use a @cloudflare/computer Workspace

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much?

Suggested change
title: Think agents now use a @cloudflare/computer Workspace
title: Giving Think a computer


import { TypeScriptExample } from "~/components";

[Think](/agents/harnesses/think/) and [Agent Skills](/agents/runtime/execution/agent-skills/) now work in a `Workspace` from [`@cloudflare/computer`](https://github.com/cloudflare/computer). Think's built-in workspace tools are now Computer's tools. Add an execution backend to the Workspace and the model gets an `exec` tool.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Think](/agents/harnesses/think/) and [Agent Skills](/agents/runtime/execution/agent-skills/) now work in a `Workspace` from [`@cloudflare/computer`](https://github.com/cloudflare/computer). Think's built-in workspace tools are now Computer's tools. Add an execution backend to the Workspace and the model gets an `exec` tool.
[Think](/agents/harnesses/think/) and [Agent Skills](/agents/runtime/execution/agent-skills/) are now backed by [`@cloudflare/computer`](https://github.com/cloudflare/computer), providing the file system, execution environment and toolset, `read`, `write`, `find`, `glob`, `exec`.


[Think](/agents/harnesses/think/) and [Agent Skills](/agents/runtime/execution/agent-skills/) now work in a `Workspace` from [`@cloudflare/computer`](https://github.com/cloudflare/computer). Think's built-in workspace tools are now Computer's tools. Add an execution backend to the Workspace and the model gets an `exec` tool.

`@cloudflare/shell` is deprecated, and so is Think's `createExecuteTool`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this below the example to tie it in with the migration information. What's the maintainance status and timeline until it's unsupported?

| `edit` | Apply exact text replacements to a file, falling back to whitespace-tolerant search |
| `delete` | Delete a file or directory |
| `exec` | Run a command or module on one of the Workspace's execution backends |
| `publish` | Share a workspace file through a presigned URL, when the Workspace has assets |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to add git and artifacts? Or leave them private?


</WranglerConfig>

Computer also ships a `just-bash` shell backend that runs in Dynamic Workers, and a container backend with a full Linux userland. Refer to the [Computer README](https://github.com/cloudflare/computer/tree/main/packages/computer#choosing-a-backend) for each backend's bindings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Computer also ships a `just-bash` shell backend that runs in Dynamic Workers, and a container backend with a full Linux userland. Refer to the [Computer README](https://github.com/cloudflare/computer/tree/main/packages/computer#choosing-a-backend) for each backend's bindings.
Computer also ships a container backend to provide a Linux shell and a `just-bash` backend that runs in Dynamic Workers, these are both still experimental. Refer to the [Computer README](https://github.com/cloudflare/computer/tree/main/packages/computer#choosing-a-backend) for each backend's bindings.

### Call the agent's tools from code

By default, the workspace stores everything in SQLite. For large files, override `workspace` to add R2 spillover:
Give a JavaScript backend a `ws:tools` module, and code the model runs with `exec` can import the agent's tools. Code reads files through `node:fs/promises`, so serve `getTools()` rather than the workspace tools:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Give a JavaScript backend a `ws:tools` module, and code the model runs with `exec` can import the agent's tools. Code reads files through `node:fs/promises`, so serve `getTools()` rather than the workspace tools:
The file-system can always be accessed via `node:fs/promises` but additional tools can be provided to the `WorkerJavaScriptBackend` using `createToolBindings` to make the registered tools accessible to the JavaScript environment through the `ws:tools` module:

```

</TypeScriptExample>
`ws:tools` does not export tools that need approval or tools that run in the browser, because nothing can approve or run them from code. Calls from code do not go through `beforeToolCall`. Refer to [`ws:tools`](https://github.com/cloudflare/computer/blob/main/docs/17_isolate_javascript.md#wstools) for how calls and results work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need those workspace docs before we ship this.

### Change the tools

<WranglerConfig>
`exec` offers every backend the Workspace has, and each backend describes itself to the model. To change a built-in tool, return a tool with the same name from `getTools()`. It replaces the built-in. To hide tools for a turn, return `activeTools` from `beforeTurn`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`exec` offers every backend the Workspace has, and each backend describes itself to the model. To change a built-in tool, return a tool with the same name from `getTools()`. It replaces the built-in. To hide tools for a turn, return `activeTools` from `beforeTurn`.
To change a built-in tool, return a tool with the same name from `getTools()`. It replaces the built-in. To hide tools for a turn, return `activeTools` from `beforeTurn`.

bucket_name = "agent-files"
### Share a workspace

To work in a Workspace another Durable Object owns, wrap `getWorkspace` in `lazyWorkspace`. Think contacts the owner only when a turn first touches a file:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to revisit this API...

Suggested change
To work in a Workspace another Durable Object owns, wrap `getWorkspace` in `lazyWorkspace`. Think contacts the owner only when a turn first touches a file:
To access a Workspace efficiently from another worker via RPC wrap `getWorkspace` in `lazyWorkspace`:

@cloudflare-docs-bot

Copy link
Copy Markdown
Contributor

⚠️ @mattzcarey This pull request adds a changelog entry dated in the past:

  • src/content/changelog/agents/2026-10-14-think-computer-workspace.mdx — dated 2026-10-14

Typically, changelog entries should be dated the day they merge. This is not blocking — if the date is unintentional, please update it.

aron-cf added a commit that referenced this pull request Oct 15, 2026
- Cover the Think, AI SDK, Pi, and OpenCode harnesses, with a note
  pointing to each and typed adapters for Pi Durable and OpenCode.
- Update the Think guidance for the Computer workspace that Think now
  includes (PR #34297): no useThink, workspaceBash, or createAITools().
- Add an API reference for Workspace, workspace.fs, workspace.runtime,
  the tool functions, and the host modules, and link to it.
- Link the Worker Loader binding to /dynamic-workers/ directly, which
  fixes the nimbus/internal-link redirect error.
- Fix the description, the "accesing" and "it's" typos, and wording.
KastanDay pushed a commit to KastanDay/cloudflare-docs that referenced this pull request Oct 15, 2026
* docs(agents): add File system page under Tools

Add /agents/tools/filesystem/, placed above Sandbox in the Tools sidebar.
It covers adding a Cloudflare Computer workspace to a Durable Object,
giving a model the workspace file tools with createAITools(), and
optionally running JavaScript with WorkerJavaScriptBackend.

* Apply batched suggestions from code review

Co-authored-by: Aron <263346377+aron-cf@users.noreply.github.com>

* docs(agents): address review feedback on File system page

- Cover the Think, AI SDK, Pi, and OpenCode harnesses, with a note
  pointing to each and typed adapters for Pi Durable and OpenCode.
- Update the Think guidance for the Computer workspace that Think now
  includes (PR cloudflare#34297): no useThink, workspaceBash, or createAITools().
- Add an API reference for Workspace, workspace.fs, workspace.runtime,
  the tool functions, and the host modules, and link to it.
- Link the Worker Loader binding to /dynamic-workers/ directly, which
  fixes the nimbus/internal-link redirect error.
- Fix the description, the "accesing" and "it's" typos, and wording.
@github-actions

Copy link
Copy Markdown
Contributor

Worker Preview URL: https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com
Worker Preview Deployment URL: https://401a3dfa.previews.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/harnesses/think/tools/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/harnesses/think/tools/
https://developers.cloudflare.com/changelog/post/2026-10-14-think-computer-workspace/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/changelog/post/2026-10-14-think-computer-workspace/
https://developers.cloudflare.com/agents/harnesses/think/configuration/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/harnesses/think/configuration/
https://developers.cloudflare.com/agents/tools/codemode/ai-sdk/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/tools/codemode/ai-sdk/
https://developers.cloudflare.com/agents/harnesses/think/getting-started/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/harnesses/think/getting-started/
https://developers.cloudflare.com/agents/tools/browser/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/tools/browser/
https://developers.cloudflare.com/agents/harnesses/think/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/harnesses/think/
https://developers.cloudflare.com/agents/runtime/execution/agent-skills/ https://gh-agents-computer-workspace-changelog.previews.developers.cloudflare.com/agents/runtime/execution/agent-skills/

@cloudflare cloudflare deleted a comment from github-actions Bot Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:changelog size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants