Skip to content

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

Open
aron-cf wants to merge 1 commit into
mainfrom
tutorial
Open

examples/tutorial: add a minimal PDF recipe card agent#22
aron-cf wants to merge 1 commit into
mainfrom
tutorial

Conversation

@aron-cf

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

Copy link
Copy Markdown
Contributor

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.

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.
@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/workspace/@cloudflare/workspace@22

commit: d4bb53a

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.

1 participant