Agent class docs#636
Conversation
|
Claude Code ReviewThis is a high-quality documentation addition. The PR adds comprehensive documentation explaining the Agent class architecture through its inheritance layers (DurableObject → Server → Agent). The content is technically accurate and well-structured. Code Quality: ✓
Architecture Alignment: ✓
Testing Coverage: N/A
Minor observation (not blocking): Verdict: LGTM - Ready to merge. |
commit: |
Syncs documentation from cloudflare/agents PR #636 which adds comprehensive explanations of the Agent class architecture, including its inheritance chain from DurableObject → Server → Agent. This document provides: - Detailed explanation of the three-layer architecture - Understanding of underlying Durable Object primitives - PartyKit Server layer enhancements - Agent-specific features like state management, scheduling, queuing, MCP integration, and email handling - Code examples for all major Agent APIs Source: cloudflare/agents#636 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Documentation SyncThe documentation changes from this PR have been synced to the cloudflare-docs repository. Documentation PR: cloudflare/cloudflare-docs#26320 The new documentation has been added to
🤖 Automated documentation sync via Claude Code |
| The `Agent` class is an extension of `DurableObject`. That is to say, they _are_ **Durable Objects**. If you're not familiar with Durable Objects, it is highly recommended that you read ["What are Durable Objects"](https://developers.cloudflare.com/durable-objects/) but at their core, Durable Objects are globally addressable (each instance has a unique ID) single-threaded compute instances with long term storage (KV/SQLite). | ||
| That being said, `Agent` does **not** extend `DurableObject` directly but instead `Server`. `Server` is a class provided by [PartyKit](https://github.com/cloudflare/partykit/tree/main/packages/partyserver). | ||
|
|
||
| You can visualize the logic as a Matryoshka doll: **DurableObject** -> **Server** -> **Agent**. |
| await stub.bar(); | ||
| ``` | ||
|
|
||
| Since we have a URL addressing scheme, we also get access to `routePartykitRequest()`. |
There was a problem hiding this comment.
this is the docs I wished I had
|
📚 Documentation sync initiated A PR has been created in cloudflare-docs to sync these documentation changes: cloudflare-docs PR: cloudflare/cloudflare-docs#26320 The documentation has been adapted for the cloudflare-docs structure and is ready for review. 🤖 Automated comment via Claude Code |
No description provided.