Hasty Briefsbeta

Bilingual

GitHub - cloudflare/agents: Build and deploy AI Agents on Cloudflare

4 days ago
  • #Durable Objects
  • #Cloudflare
  • #Agents
  • Agents are persistent, stateful execution environments powered by Cloudflare Durable Objects.
  • Each agent has its own state, storage, lifecycle, and supports real-time communication, scheduling, AI model calls, MCP, workflows, etc.
  • Agents hibernate when idle and wake on demand, allowing millions to run cost-effectively.
  • Quick start: Use `npm create cloudflare@latest -- --template cloudflare/agents-starter` or add to an existing project with `npm install agents`.
  • Example: A counter agent with persistent state, callable methods, and real-time sync to a React frontend.
  • Features include persistent state, callable methods, scheduling, WebSockets, AI chat, MCP, workflows, email routing, SQL, and React hooks.
  • Coming soon: Realtime voice agents, web browsing, sandboxed code execution, and multi-channel communication.
  • Packages: Core SDK (`agents`), AI chat (`@cloudflare/ai-chat`), Hono middleware (`hono-agents`), and experimental Code Mode (`@cloudflare/codemode`).
  • Examples directory contains self-contained demos covering most SDK features.
  • Run examples locally with `npm run dev` in the desired directory.
  • Full documentation available on developers.cloudflare.com and in the repo's `docs/` directory.
  • Node 24+ required. Uses npm workspaces for installation and building.