Skip to content
Effloow
← Back to article
EFFLOOW LAB LAB-RUN

Cloudflare Project Think Durable Agent Runtime 2026

Evidence notes document the bounded local or source-based checks behind an Effloow article. They are not product endorsements, legal advice, or benchmark claims.

Date: 2026-05-13
Track: sandbox-poc
Slug: cloudflare-project-think-durable-agent-runtime-2026
Status: Source-based PoC (no live API keys available; package install verified)


Environment

  • OS: macOS Darwin 24.6.0 (Apple Silicon)
  • Node.js: v22 (Cloudflare Workers requirement)
  • npm: v10+
  • Cloudflare Workers account: not available in sandbox; package install only

What Was Verified

Package Installability

Checked package registry for @cloudflare/think:

npm show @cloudflare/think version
# Result: 0.0.1-experimental.3 (as of 2026-05-13)

Install command as documented:

npm install @cloudflare/think agents ai @cloudflare/shell zod workers-ai-provider

All packages resolved successfully to the npm registry. No build errors on install dry-run.

GitHub Repository Inspection

Repository: github.com/cloudflare/agents — 30+ self-contained demo scripts in /examples/. Key files confirmed:

  • docs/think/index.md — Think base class overview
  • packages/think/src/index.ts — exports Think, Session, runFiber
  • packages/shell/src/index.ts — exports Workspace (SQLite + R2 filesystem)

SDK Surface Confirmed

From official docs (developers.cloudflare.com/agents/api-reference/think/):

import { Think } from "@cloudflare/think";
import { createWorkersAI } from "workers-ai-provider";

export class MyAgent extends Think<Env, unknown> {
  getModel() {
    const ai = createWorkersAI({ binding: this.env.AI });
    return ai("@cf/meta/llama-3.3-70b-instruct");
  }
}

Execution Ladder Tiers — Confirmed from Docs

Tier Name Package / API Capability
0 Workspace @cloudflare/shell Durable filesystem, SQLite + R2
1 Dynamic Worker @cloudflare/codemode Sandboxed V8 isolate, no network
2 npm @cloudflare/worker-bundler Fetch npm pkgs, esbuild, load in DW
3 Browser Cloudflare Browser Run Navigation, click, extract
4 Sandbox cloudflare/sandbox-sdk Full Linux env, git, npm test, cargo

Fiber Primitive — Conceptual Reproduction

Source: blog.cloudflare.com/project-think/, noise.getoto.net/2026/04/15/...

import { runFiber } from "@cloudflare/think";

// Fibers checkpoint at ctx.stash() calls.
// If the worker restarts, execution resumes from the last stash() point.
async function longTask(ctx) {
  const step1 = await doExpensiveWork();
  await ctx.stash({ step1 });   // checkpoint saved to SQLite

  const step2 = await callExternalAPI(step1);
  await ctx.stash({ step1, step2 });

  return finalize(step1, step2);
}

export class MyAgent extends Think<Env, unknown> {
  async onTask(task: string) {
    return runFiber(this.ctx, () => longTask(this.ctx));
  }
}

This pattern is the key architectural difference from standard Cloudflare Workflows: fibers are co-located with the Durable Object and use its SQLite for checkpointing, so there is no separate Workflow state machine.

Sub-Agents (Facets) — API Surface Confirmed

From developers.cloudflare.com/agents/api-reference/sub-agents/:

// Parent spawns a child with typed RPC
const facet = await this.spawnFacet("data-processor", DataProcessorAgent);
const result = await facet.processChunk(data);

Each facet (child Durable Object) has:

  • Isolated SQLite storage
  • Own execution context
  • Typed RPC stub returned to parent
  • Colocated on the same machine as parent

Session API — Confirmed Structure

From developers.cloudflare.com/agents/api-reference/sessions/:

  • Messages stored as relational tree (parent_id FK)
  • Fork: create branch from any node without modifying main path
  • Compaction: non-destructive summarization as context overlay
  • Full-text search: FTS5 index over all messages

What Was NOT Tested

  • End-to-end agent deployment (requires Cloudflare Workers account + paid plan)
  • Actual fiber crash recovery in production (no production env)
  • Browser Run and Sandbox tiers (require Workers Paid plan + specific bindings)
  • Real LLM inference via @cf/meta/llama-3.3-70b-instruct

Limitations

  • Project Think is experimental preview as of 2026-05. API surface is stable but may evolve.
  • Dynamic Workers require Workers Paid plan.
  • Cloudflare Sandbox tier (Tier 4) requires additional sandbox binding configuration.
  • No public benchmark data comparing fiber checkpointing overhead vs. re-execution.

Sources

Read the article

This note supports the public article and records what was actually checked.

Open article →