You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/agents/api-reference/agents-api.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -313,7 +313,7 @@ Visit the documentation on [storing and syncing state](/agents/api-reference/sto
313
313
Client for connecting to an Agent from the browser.
314
314
315
315
```ts
316
-
import { AgentClient } from"agents-sdk/client";
316
+
import { AgentClient } from"agents/client";
317
317
318
318
// Options for creating an AgentClient
319
319
typeAgentClientOptions= {
@@ -341,7 +341,7 @@ class AgentClient extends WebSocket {
341
341
Make an HTTP request to an Agent.
342
342
343
343
```ts
344
-
import { agentFetch } from"agents-sdk/client";
344
+
import { agentFetch } from"agents/client";
345
345
346
346
// Options for the agentFetch function
347
347
typeAgentClientFetchOptions= {
@@ -368,7 +368,7 @@ The Agents SDK provides a React API for simplifying connection and routing to Ag
368
368
React hook for connecting to an Agent.
369
369
370
370
```ts
371
-
import { useAgent } from"agents-sdk/react";
371
+
import { useAgent } from"agents/react";
372
372
373
373
// Options for the useAgent hook
374
374
typeUseAgentOptions<State=unknown> = {
@@ -399,14 +399,14 @@ function useAgent<State = unknown>(
399
399
400
400
The Agents SDK exposes an `AIChatAgent` class that extends the `Agent` class and exposes an `onChatMessage` method that simplifies building interactive chat agents.
401
401
402
-
You can combine this with the `useAgentChat` React hook from the `agents-sdk/ai-react` package to manage chat state and messages between a user and your Agent(s).
402
+
You can combine this with the `useAgentChat` React hook from the `agents/ai-react` package to manage chat state and messages between a user and your Agent(s).
403
403
404
404
#### AIChatAgent
405
405
406
406
Extension of the `Agent` class with built-in chat capabilities.
Copy file name to clipboardExpand all lines: src/content/docs/agents/api-reference/websockets.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,12 +40,12 @@ export class ChatAgent extends Agent {
40
40
41
41
### Connecting clients
42
42
43
-
The Agent framework includes a useful helper package for connecting directly to your Agent (or other Agents) from a client application. Import `agents-sdk/client`, create an instance of `AgentClient` and use it to connect to an instance of your Agent:
43
+
The Agent framework includes a useful helper package for connecting directly to your Agent (or other Agents) from a client application. Import `agents/client`, create an instance of `AgentClient` and use it to connect to an instance of your Agent:
44
44
45
45
<TypeScriptExample>
46
46
47
47
```ts
48
-
import { AgentClient } from"agents-sdk/client";
48
+
import { AgentClient } from"agents/client";
49
49
50
50
const connection =newAgentClient({
51
51
agent: "dialogue-agent",
@@ -68,12 +68,12 @@ connection.send(
68
68
69
69
### React clients
70
70
71
-
React-based applications can import `agents-sdk/react` and use the `useAgent` hook to connect to an instance of an Agent directly:
71
+
React-based applications can import `agents/react` and use the `useAgent` hook to connect to an instance of an Agent directly:
description: A starter template for building AI-powered chat agents using Cloudflare's Agent platform, powered by agents-sdk. This project provides a foundation for creating interactive chat experiences with AI, complete with a modern UI and tool integration capabilities.
8
+
description: A starter template for building AI-powered chat agents using Cloudflare's Agent platform, powered by the Agents SDK. This project provides a foundation for creating interactive chat experiences with AI, complete with a modern UI and tool integration capabilities.
description: Use the Workers "mega prompt" to build a Agents using your preferred AI tools and/or IDEs. The prompt understands agents-sdk APIs, best practices and guidelines, and makes it easier to build valid Agents and Workers.
8
+
description: Use the Workers "mega prompt" to build a Agents using your preferred AI tools and/or IDEs. The prompt understands the Agents SDK APIs, best practices and guidelines, and makes it easier to build valid Agents and Workers.
Copy file name to clipboardExpand all lines: src/content/docs/agents/getting-started/testing-your-agent.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Because Agents run on Cloudflare Workers and Durable Objects, they can be tested
16
16
17
17
:::note
18
18
19
-
The `agents-sdk-starter` template and new Cloudflare Workers projects already include the relevant `vitest` and `@cloudflare/vitest-pool-workers` packages, as well as a valid `vitest.config.js` file.
19
+
The `agents-starter` template and new Cloudflare Workers projects already include the relevant `vitest` and `@cloudflare/vitest-pool-workers` packages, as well as a valid `vitest.config.js` file.
0 commit comments