Skip to content

examples/tutorial: add a minimal PDF recipe card agent - #22

Merged
aron-cf merged 5 commits into
mainfrom
tutorial
Jul 31, 2026
Merged

examples/tutorial: add a minimal PDF recipe card agent#22
aron-cf merged 5 commits into
mainfrom
tutorial

Conversation

@aron-cf

@aron-cf aron-cf commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

A one-file example of a Think agiet whose working directory is a Workspace backed by a Cloudflare Container. POST /prompt with a dish name and the agent finds a recipe on openstove.org with the webfetch tool, writes a markdown card through the workspace on the host, converts it with pandoc in the container, and the worker puts the resulting PDF in R2 and answers with a link to it.

The point of the example is the shared filesystem: the write happens on the host and the pandoc run happens in the container, with no copying in between. The container image installs pandoc and typst rather than a LaTeX distribution, which keeps the PDF engine to a single 30 MB binary.

The README contains a step-by-step guide to reproducing the application.

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/computer/@cloudflare/computer@22

commit: 21d7997

aron-cf and others added 5 commits July 31, 2026 10:53
A one-file example of a AIChatAgent whose working directory is a
Workspace backed by a Cloudflare Container. POST /prompt with a dish
name and the agent finds a recipe on openstove.org with the webfetch
tool, writes a markdown card through the workspace on the host,
converts it with pandoc in the container, and the worker puts the
resulting PDF in R2 and answers with a link to it.

The point of the example is the shared filesystem: the write happens
on the host and the pandoc run happens in the container, with no
copying in between. The container image installs pandoc and typst
rather than a LaTeX distribution, which keeps the PDF engine to a
single 30 MB binary.

The README contains a step-by-step guide to reproducing the application.
Update the tutorial after the package rename so it imports @cloudflare/computer, runs computerd, and names the example workspace consistently. Use the Computer Workspace compatibility surface that the published Think package consumes instead of the stale experimental subpath.

Refresh the lockfile for the tutorial workspace and align the Biome schema URL with the installed CLI version so the repository check can parse the config.
Mark the tutorial AI binding as remote so local development keeps the Worker, Durable Object, and container local while proxying Workers AI to Cloudflare.
@aron-cf
aron-cf merged commit 62271ad into main Jul 31, 2026
11 checks passed
@aron-cf
aron-cf deleted the tutorial branch July 31, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants