-
Notifications
You must be signed in to change notification settings - Fork 293
Agent class docs #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
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**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love this
| await stub.bar(); | ||
| ``` | ||
|
|
||
| Since we have a URL addressing scheme, we also get access to `routePartykitRequest()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the docs I wished I had
mattzcarey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So good. No notes
|
📚 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.