Commit 10ce8bc
Sync documentation from cloudflare/agents PR 812
This commit syncs documentation changes from PR 812 which includes:
## New Features Documented
### Scheduling
- scheduleEvery() method for fixed-interval recurring tasks
- Overlap prevention and error resilience
- Comparison between cron and interval scheduling
### MCP Client
- Options-based addMcpServer() API (cleaner alternative to positional params)
- Transport options configuration
- Backward compatibility maintained
### Callable Methods (NEW PAGE)
- @callable decorator for WebSocket RPC
- Streaming with StreamingResponse.error() method
- Client-side RPC timeout support
- Method introspection with getCallableMethods()
- Options-based streaming API
### Custom Routing (NEW PAGE)
- basePath for custom URL routing
- Server-sent identity with onIdentity callbacks
- Identity change handling on reconnect
- Security controls with sendIdentityOnConnect
- Instance naming patterns
### State Management
- Enhanced onStateUpdate with source parameter
- Bidirectional state updates
- Vanilla JS AgentClient examples
- Best practices for avoiding loops
### WebSockets
- Connection management (getConnections, getConnection)
- Connection tags and filtering
- Per-connection state
- Hibernation behavior documentation
- Broadcasting patterns
## New Documentation Pages
- api-reference/callable-methods.mdx - Complete @callable decorator reference
- concepts/routing.mdx - Custom routing and identity management
- getting-started/quickstart.mdx - Comprehensive quickstart guide
- guides/add-to-existing-project.mdx - Integration with existing Workers
## Updated Pages
- api-reference/schedule-tasks.mdx
- api-reference/store-and-sync-state.mdx
- api-reference/websockets.mdx
- model-context-protocol/mcp-client-api.mdx
All documentation follows cloudflare-docs style guidelines with proper
component usage (TypeScriptExample, WranglerConfig, PackageManagers),
full relative links with trailing slashes, and no contractions.
Related PR: cloudflare/agents#812
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent c3ba130 commit 10ce8bc
File tree
8 files changed
+2247
-19
lines changed- src/content/docs/agents
- api-reference
- concepts
- getting-started
- guides
- model-context-protocol
8 files changed
+2247
-19
lines changedLines changed: 565 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | | - | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| |||
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
Lines changed: 42 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| 58 | + | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
53 | 69 | | |
54 | 70 | | |
55 | 71 | | |
| |||
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
130 | | - | |
| 146 | + | |
131 | 147 | | |
132 | 148 | | |
133 | 149 | | |
| |||
145 | 161 | | |
146 | 162 | | |
147 | 163 | | |
| 164 | + | |
148 | 165 | | |
149 | 166 | | |
150 | 167 | | |
| |||
159 | 176 | | |
160 | 177 | | |
161 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
162 | 200 | | |
163 | 201 | | |
164 | 202 | | |
| |||
169 | 207 | | |
170 | 208 | | |
171 | 209 | | |
172 | | - | |
| 210 | + | |
173 | 211 | | |
174 | 212 | | |
175 | | - | |
| 213 | + | |
| 214 | + | |
176 | 215 | | |
177 | 216 | | |
178 | 217 | | |
| |||
0 commit comments