build-agent — Codex command: what it does, how to install
Scaffolds AI agents using Cloudflare Agents SDK with persistent state, live WebSockets, and cron jobs. Useful when setting up backend agent workflows.
~/.codex/prompts/build-agent.mdWhat build-agent does
This command sets up AI agents on top of the Cloudflare Agents SDK. It handles persistent state storage alongside real-time WebSocket communication. You can also configure scheduled cron triggers, RAG flows, and multi-agent setups.
The command relies directly on local skill files under skills/building-ai-agent-on-cloudflare/. It reads SKILL.md for core rules, then checks references/examples.md and references/agent-patterns.md for implementation details. Without these local files present in the repository, the command lacks its foundational instructions.
Codex executes the workflow using system tools like Read, Write, Edit, and Bash.
What it helps with
- create stateful Cloudflare agents with persistent storage
- configure real-time WebSocket communication for assistants
- schedule recurring agent tasks with cron syntax
- orchestrate multi-agent interactions and tool calls
Example prompts for the agent
- /cloudflare:build-agent a customer support chatbot
- /cloudflare:build-agent real-time coding assistant with WebSocket
- /cloudflare:build-agent multi-agent workflow orchestrator
How to install build-agent
Manually: put the files in place
~/.codex/prompts/build-agent.mdCall it with /prompts:build-agent. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.claude/commands/build-agent.mdCall it with /build-agent. For all projects use ~/.claude/commands/
Manually: put the files in place
.github/prompts/build-agent.prompt.mdManually: put the files in place
.gemini/commands/build-agent.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about build-agent
How to install build-agent in Codex?
Place the command file at ~/.codex/prompts/build-agent.md. You can then call the prompt directly within Codex.
What does build-agent do?
It guides the creation of stateful AI agents on the Cloudflare Agents SDK. It generates patterns for persistent memory, real-time messaging, and scheduled jobs.
Which files does build-agent read during execution?
It reads instructions from skills/building-ai-agent-on-cloudflare/SKILL.md and pattern references inside the references/ folder.
Source text
build-agent.md · MIT
--- description: Build an AI agent on Cloudflare using the Agents SDK argument-hint: [agent-description] allowed-tools: [Read, Glob, Grep, Bash, Write, Edit, WebFetch] --- # Build AI Agent on Cloudflare This command helps you build AI agents using the Cloudflare Agents SDK with state management, real-time WebSockets, scheduled tasks, and tool integration. ## Arguments The user invoked this command with: $ARGUMENTS ## Instructions When this command is invoked: 1. Read the skill file at `skills/building-ai-agent-on-cloudflare/SKILL.md` for core guidance 2. Reference `skills/building-ai-agent-on-cloudflare/references/examples.md` for templates 3. Use `skills/building-ai-agent-on-cloudflare/references/agent-patterns.md` for tool calling and patterns 4. Use `skills/building-ai-agent-on-cloudflare/references/state-patterns.md` for state management 5. Consult `skills/building-ai-agent-on-cloudflare/references/troubleshooting.md` for common issues ## Capabilities - Stateful AI agents with persistent memory - Real-time WebSocket communication - Scheduled tasks and cron jobs - Tool integration and function calling - Multi-agent orchestration - RAG (Retrieval Augmented Generation) patterns ## Example Usage ``` /cloudflare:build-agent a customer support chatbot /cloudflare:build-agent real-time coding assistant with WebSocket /cloudflare:build-agent multi-agent workflow orchestrator ```
© Cloudflare · MIT · openai/plugins