Skip to content

Commit 8d46b7e

Browse files
Remove incorrect state wrapper in session post payload (#822)
Co-authored-by: Joe Fernandez <[email protected]>
1 parent a0bdd6b commit 8d46b7e

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/deploy/cloud-run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ Once your agent is deployed to Cloud Run, you can interact with it via the deplo
446446
curl -X POST -H "Authorization: Bearer $TOKEN" \
447447
$APP_URL/apps/capital_agent/users/user_123/sessions/session_abc \
448448
-H "Content-Type: application/json" \
449-
-d '{"state": {"preferred_language": "English", "visit_count": 5}}'
449+
-d '{"preferred_language": "English", "visit_count": 5}'
450450
```
451451

452452
#### Run the Agent

docs/deploy/gke.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ Once your agent is deployed to GKE, you can interact with it via the deployed UI
523523
curl -X POST \
524524
$APP_URL/apps/capital_agent/users/user_123/sessions/session_abc \
525525
-H "Content-Type: application/json" \
526-
-d '{"state": {"preferred_language": "English", "visit_count": 5}}'
526+
-d '{"preferred_language": "English", "visit_count": 5}'
527527
```
528528

529529
#### Run the Agent

docs/get-started/testing.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ a new session with the agent using:
9898
```shell
9999
curl -X POST http://localhost:8000/apps/my_sample_agent/users/u_123/sessions/s_123 \
100100
-H "Content-Type: application/json" \
101-
-d '{"state": {"key1": "value1", "key2": 42}}'
101+
-d '{"key1": "value1", "key2": 42}'
102102
```
103103

104104
Let's break down what's happening:
@@ -109,7 +109,7 @@ Let's break down what's happening:
109109
can replace `my_sample_agent` with the name of your agent folder. You can
110110
replace `u_123` with a specific user ID, and `s_123` with a specific session
111111
ID.
112-
* `{"state": {"key1": "value1", "key2": 42}}`: This is optional. You can use
112+
* `{"key1": "value1", "key2": 42}`: This is optional. You can use
113113
this to customize the agent's pre-existing state (dict) when creating the
114114
session.
115115

@@ -321,18 +321,16 @@ Creates a new session or updates an existing one. If a session with the given ID
321321
**Request Body**
322322
```json
323323
{
324-
"state": {
325-
"key1": "value1",
326-
"key2": 42
327-
}
324+
"key1": "value1",
325+
"key2": 42
328326
}
329327
```
330328

331329
**Example Request**
332330
```shell
333331
curl -X POST http://localhost:8000/apps/my_sample_agent/users/u_123/sessions/s_abc \
334332
-H "Content-Type: application/json" \
335-
-d '{"state": {"visit_count": 5}}'
333+
-d '{"visit_count": 5}'
336334
```
337335

338336
**Example Response**

0 commit comments

Comments
 (0)