Skip to content

[Agents] Move the Think samples to Think 0.24 and add Think Context and Sessions pages - #35548

Closed
mattzcarey wants to merge 5 commits into
productionfrom
docs/agents-think-024-samples
Closed

mattzcarey wants to merge 5 commits into
productionfrom
docs/agents-think-024-samples

Conversation

@mattzcarey

Copy link
Copy Markdown
Member

Moves the Think pages to @cloudflare/think 0.24.0 and @cloudflare/computer 0.10, and adds two Think pages: Context (context blocks, providers, the frozen prompt, reminders, memory and search, with a note that most agents need skills more than context) and Sessions (compaction, message storage, media eviction, prompt caching). This carries the work of #35055 onto current production.

The Think pages still used APIs that Think no longer exports or has deprecated:

  • defineScheduledTasks and defineMessengers are gone, so those samples return plain objects
  • context blocks move from the deprecated configureSession().withContext() chain to configureContext()
  • useAgentChat imports from @cloudflare/think/react, and onStepFinish becomes onStepEnd
  • the workspace examples use CodemodeBackend and codemode: host modules from Computer 0.10

#35055's "Memory and context" page is split in two so each page covers one thing, and the Context page states what Think does: an overridden getSystemPrompt() stays above the blocks, and a reminder rides on the newest user message until a refresh.

pnpm run build and pnpm run lint:nimbus pass locally. The Context and Sessions samples compile with tsc --strict against @cloudflare/[email protected] and @cloudflare/[email protected]; the other sample changes are #35055's, which were checked against the same versions.

@mattzcarey
mattzcarey requested review from a team, irvinebroque and rita3ko as code owners November 23, 2026 16:19
@github-actions github-actions Bot added the product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. label Nov 23, 2026
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed d42afa2 · 0 findings · incremental

Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Worker Preview URL: https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com
Worker Preview Deployment URL: https://b1b5ae20.previews.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/harnesses/think/tools/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/tools/
https://developers.cloudflare.com/agents/harnesses/think/context/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/context/
https://developers.cloudflare.com/agents/harnesses/think/sessions/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/sessions/
https://developers.cloudflare.com/agents/harnesses/think/configuration/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/configuration/
https://developers.cloudflare.com/agents/harnesses/think/getting-started/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/getting-started/
https://developers.cloudflare.com/agents/harnesses/think/messengers/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/messengers/
https://developers.cloudflare.com/agents/harnesses/think/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/
https://developers.cloudflare.com/agents/harnesses/think/lifecycle-hooks/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/lifecycle-hooks/
https://developers.cloudflare.com/agents/harnesses/think/scheduled-tasks/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/scheduled-tasks/
https://developers.cloudflare.com/agents/harnesses/think/recovery/ https://gh-docs-agents-think-024-samples.previews.developers.cloudflare.com/agents/harnesses/think/recovery/

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-agents-think-024-samples.previews.developers.cloudflare.com (commit d42afa2)

This URL reflects your latest Preview deployment

Preview Deployments by commit

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

View logs ↗
https://973c6286.previews.developers.cloudflare.com d42afa2 2026-11-24T00:09:14.279Z Visit the dashboard ↗
  • Build: In progress 🔵

View logs ↗
a6c7243 2026-11-23T23:38:13.629Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://ed1e04ef.previews.developers.cloudflare.com 94e0d2e 2026-11-23T17:49:23.808Z Visit the dashboard ↗
  • Build: In progress 🔵

View logs ↗
c45e958 2026-11-23T16:56:01.869Z View logs ↗

@mattzcarey

Copy link
Copy Markdown
Member Author

Merged as part of #35542: that PR was stacked on this one, and its squash merge brought every change here into production. Closing.

@mattzcarey mattzcarey closed this Nov 24, 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. size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant