An agent on Cloudflare is a Durable Object with the Agents SDK Lifecycle installed. The Lifecycle starts the capabilities you add to it, such as WebSockets, State, and Scheduler. A harness is the capability that runs the agent loop. Pick the path that matches where you are starting from.
Build your first Durable Agent
Run the Pi harness in a Durable Object, give it a workspace, and connect over WebSockets.
Learn the runtime
Build a counter on a Durable Object with the Lifecycle, State, and WebSockets, then connect a client.
Add to an existing project
Install the Lifecycle on a Durable Object in a Workers project you already have.
Testing your Agents
Write tests with Vitest and the Workers test pool.