メインコンテンツへスキップ

From Conversation to Article: AFS on Cloudflare

ArcBlock
AFSArchitecture

At Cloudflare Connect, a question during our live demo brought the infrastructure into focus: how does creating an article through AFS work with Workers, Durable Objects, and R2?

AFS gives an AI agent a path-based interface to content and capabilities. Cloudflare supplies the infrastructure underneath ARC's Cloudflare runtime. For this demo, we asked ChatGPT to turn the conversation into an article we could review on the website before publishing.

Start with a real content path

During the demo, ChatGPT used the ArcBlock AFS connection to list /packages, then read an existing article at:

text
/packages/content/articles/cloudflare-connect-nextgen/content.md

The response contained the actual article source, including its title, author, description and Markdown body. The agent could inspect how the site represents a post through the same path interface it used to discover the content.

That is the useful abstraction. The agent works with an article as content at a path. The AFS provider connects those operations to the storage implementation; the agent does not need to translate an article read into an R2 request itself.

For the new draft, we used a separate Git checkout of the website source. Its English and Chinese Markdown files live under content/articles/cloudflare-connect-afs-demo/. This demonstration combines a real remote AFS read with local draft preparation and preview. It does not write the new article into the production site's AFS mount.

What each Cloudflare service does

ServiceRole in ARC's Cloudflare implementation
WorkersReceives requests and runs the Cloudflare runtime's application logic.
Durable ObjectsARC binds an AUPSessionDO Durable Object for interactive UI sessions. Cloudflare provides the coordination primitive; the runtime defines the session behavior.
R2Stores content objects in the DID Space backend. Public media can use a separately configured R2 bucket.
D1Stores the DID Space backend's directory and metadata records alongside the content held in R2.

We checked these responsibilities against ARC's Cloudflare runtime configuration and UI session implementation. AFS is the access interface above those services, rather than another storage bucket.

A static article request need not exercise an interactive Durable Object session. Nor does the presence of a session object, by itself, prove that several editors can edit the same document concurrently. That behavior depends on the application.

Try the conversation-to-preview workflow

Give the agent the facts you want recorded, then ask it to inspect an existing article through AFS before preparing a new draft. Review the resulting title, names, claims and links in the rendered page. A follow-up question can become a revision to the same draft.

For this session, the requested handoff is a private Tailscale preview. The preview serves ARC's generated website pages from this local draft. The local runtime returned a routing error for article pages, so this review uses the built HTML. It demonstrates the content and rendering workflow; it is not a newly deployed Cloudflare Worker.

Publishing is a separate step after the people in the conversation have reviewed the result. Access to content tools does not remove the need for write permissions or editorial approval.

Where this approach fits

This workflow fits a conference conversation that needs to become a reviewable post while the participants are still together. It also lets a technical follow-up, such as the question about Cloudflare storage, become part of the explanation instead of disappearing into meeting notes.

For a single static post, Markdown and an ordinary static site can be enough. AFS becomes useful when an agent needs a consistent way to discover content and work with the site's capabilities. Storage configuration, access control and publication remain responsibilities of the surrounding system.

Further reading

Prepared with ChatGPT from the live conversation and checked against ARC source and Cloudflare documentation.