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/configuration.mdx
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,15 +42,16 @@ Below is a minimal `wrangler.jsonc` file that defines the configuration for an A
42
42
"durable_objects": {
43
43
"bindings": [
44
44
{
45
-
"name":"MyAgent",
46
-
"class_name":"MyAgent",
45
+
"name":"MyAgent",// How your Agent is called from your Worker
46
+
"class_name":"MyAgent",// Must match the class name of the Agent in your code
47
47
},
48
48
],
49
49
},
50
50
"migrations": [
51
51
{
52
52
"tag":"v1",
53
-
"new_sqlite_classes": ["MyAgent"], // Mandatory
53
+
// Mandatory for the Agent to store state
54
+
"new_sqlite_classes": ["MyAgent"],
54
55
},
55
56
],
56
57
"observability": {
@@ -65,4 +66,4 @@ The configuration includes:
65
66
66
67
- A `main` field that points to the entry point of your Agent, which is typically a TypeScript (or JavaScript) file.
67
68
- A `durable_objects` field that defines the [Durable Object namespace](/durable-objects/reference/glossary/) that your Agents will run within.
68
-
- A `migrations` field that defines the code migrations that your Agent will use. This field is mandatory and must contain at least one migration.
69
+
- A `migrations` field that defines the code migrations that your Agent will use. This field is mandatory and must contain at least one migration. The `new_sqlite_classes` field is mandatory for the Agent to store state.
0 commit comments