Skip to content

feat: add AgentsKit Workers AI agent template - #1068

Open
EmersonBraun wants to merge 3 commits into
cloudflare:mainfrom
EmersonBraun:codex/agentskit-agent-template
Open

feat: add AgentsKit Workers AI agent template#1068
EmersonBraun wants to merge 3 commits into
cloudflare:mainfrom
EmersonBraun:codex/agentskit-agent-template

Conversation

@EmersonBraun

Copy link
Copy Markdown

What changed

  • add a self-contained AgentsKit agent template backed by the native Workers AI binding
  • translate Workers AI events into provider-neutral AgentsKit text, error, and done stream chunks
  • expose a validated SSE chat API and a responsive browser interface
  • add 11 request and adapter tests plus a Playwright smoke test
  • register the template with Cloudflare metadata and reproducible npm and pnpm lockfiles

Why

This gives Cloudflare developers a small, edge-native starting point for composing an agent around Workers AI without an external provider key. The adapter boundary keeps the inference stream compatible with AgentsKit's message and streaming contracts, so users can add memory, tools, retrieval, or another provider without replacing the UI and API flow.

Validation

  • pnpm --filter agentskit-agent-template test — 11 tests passed
  • pnpm --filter agentskit-agent-template check — TypeScript and Wrangler dry-run passed
  • pnpm exec playwright test playwright-tests/agentskit-agent-template.spec.ts --reporter=list — Chromium smoke test passed
  • pnpm run check — 72 repository tasks passed, including template lint, lockfile validation, builds, type generation, dry-runs, and Prettier

The dry-run bundles the Worker at 40.30 KiB (8.93 KiB gzip) with only the native AI and ASSETS bindings. No credentials or external API keys are included.

@EmersonBraun
EmersonBraun marked this pull request as ready for review July 27, 2026 16:59
@EmersonBraun

Copy link
Copy Markdown
Author

Hi — would this Workers AI template still be a fit for the catalog? The branch is mergeable and the template was rebased and revalidated against current main. I'm happy to adjust its metadata or structure to current conventions.

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