This template provides a minimal setup to get a basic AI Agent setup with streaming events over websockets and the ability to compose multiple AI 'programs' together in a workflow.
There are two subdirectories:
server
Cloudflare worker
www
React working in Vite with HMR and some ESLint rules.
In wrangler.toml
set your OPENAI_API_KEY
cd server && npm i
and
cd www && npm i
Then run heroku local
in the project root.
You'll need the heroku command line tool to do this.
If you don't have heroku installed you can also run the dev servers by
cd server && npm run dev
and
cd www && npm run dev
Heroku is not required for deploying this project, you'll need to use Cloudflare Workers for the server and ideally Cloudflare Pages for the web app.