Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/content/docs/agents/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
TabItem,
Tabs,
TypeScriptExample,
WranglerConfig,
} from "~/components";

The Agents SDK enables you to build and deploy AI-powered agents that can autonomously perform tasks, communicate with clients in real time, call AI models, persist state, schedule tasks, run asynchronous workflows, browse the web, query data from your database, support human-in-the-loop interactions, and [a lot more](/agents/api-reference/).
Expand Down Expand Up @@ -50,7 +51,7 @@ And then define your first Agent by creating a class that extends the `Agent` cl
<TypeScriptExample>

```ts
import { Agent, AgentNamespace } from 'agents';
import { Agent, AgentNamespace } from "agents";

export class MyAgent extends Agent {
// Define methods on the Agent:
Expand All @@ -65,6 +66,21 @@ export class MyAgent extends Agent {

</TypeScriptExample>

Lastly, add the [Durable Objects](/durable-objects/) binding to your wrangler file:

<WranglerConfig>
```toml
[[durable_objects.bindings]]
name = "MyAgent"
class_name = "MyAgent"

[[migrations]]
tag = "v1"
new_sqlite_classes = ["MyAgent"]

```
</WranglerConfig>

Dive into the [Agent SDK reference](/agents/api-reference/agents-api/) to learn more about how to use the Agents SDK package and defining an `Agent`.

### Why build agents on Cloudflare?
Expand Down
Loading