Skip to main content
command CX Codex GP ChatGPT official · OpenAI

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.

Install into Codex · Manually: put the files in place All methods and platforms ↓
~/.codex/prompts/build-agent.md
Open on GitHub

What 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.md

Call it with /prompts:build-agent. Codex marks this format deprecated in favour of skills

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

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set420

The whole set →
jupyter-notebooks This skill builds, edits, and checks repeatable SQL or Python notebooks. Use it when an analysis must be readable, rerunnable, and easy to audit. CX Codex GP ChatGPT ★ 7,604repo stars report-to-google-doc Turns an existing HTML analytics report into a DOCX and uploads it to Google Drive. Handy when the report has to reach someone as a link. CX Codex GP ChatGPT ★ 7,604repo stars intake Opens Creative Production at its no-brief starting screen when the product is mentioned without a concrete task. It gives the next turn a starter grid to work from. CX Codex GP ChatGPT ★ 7,604repo stars build-mcp A slash command that walks your agent through building a remote MCP server on Cloudflare Workers, with tools, OAuth 2.0 and deployment. CX Codex GP ChatGPT ★ 7,604repo stars canva-implement-feedback This skill reads every comment thread on a Canva design, makes the clear-cut edits through the API, and lists what still needs a human. CX Codex GP ChatGPT ★ 7,604repo stars canva-design-feedback This skill reviews Canva designs and returns ordered feedback on hierarchy, copy, spacing, readability, and accessibility. It helps when a slide, poster, or flyer needs a clear critique. CX Codex GP ChatGPT ★ 7,604repo stars canva-bulk-create Turns a table of data into one Canva design per row by autofilling a brand template. Useful when you need product cards or posts built from a CSV in one go. CX Codex GP ChatGPT ★ 7,604repo stars fix-codesign-error Inspects a macOS signing or entitlement failure and lays out the shortest fix path. Useful when a build refuses to launch or fails validation. CX Codex GP ChatGPT ★ 7,604repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor