diff --git a/docs/deploy/cloud-run.md b/docs/deploy/cloud-run.md index cb880419a..407fa50c9 100644 --- a/docs/deploy/cloud-run.md +++ b/docs/deploy/cloud-run.md @@ -446,7 +446,7 @@ Once your agent is deployed to Cloud Run, you can interact with it via the deplo curl -X POST -H "Authorization: Bearer $TOKEN" \ $APP_URL/apps/capital_agent/users/user_123/sessions/session_abc \ -H "Content-Type: application/json" \ - -d '{"state": {"preferred_language": "English", "visit_count": 5}}' + -d '{"preferred_language": "English", "visit_count": 5}' ``` #### Run the Agent diff --git a/docs/deploy/gke.md b/docs/deploy/gke.md index 985a0f0f3..9b77257b7 100644 --- a/docs/deploy/gke.md +++ b/docs/deploy/gke.md @@ -523,7 +523,7 @@ Once your agent is deployed to GKE, you can interact with it via the deployed UI curl -X POST \ $APP_URL/apps/capital_agent/users/user_123/sessions/session_abc \ -H "Content-Type: application/json" \ - -d '{"state": {"preferred_language": "English", "visit_count": 5}}' + -d '{"preferred_language": "English", "visit_count": 5}' ``` #### Run the Agent diff --git a/docs/get-started/testing.md b/docs/get-started/testing.md index 80e34f758..6a67aace2 100644 --- a/docs/get-started/testing.md +++ b/docs/get-started/testing.md @@ -98,7 +98,7 @@ a new session with the agent using: ```shell curl -X POST http://localhost:8000/apps/my_sample_agent/users/u_123/sessions/s_123 \ -H "Content-Type: application/json" \ - -d '{"state": {"key1": "value1", "key2": 42}}' + -d '{"key1": "value1", "key2": 42}' ``` Let's break down what's happening: @@ -109,7 +109,7 @@ Let's break down what's happening: can replace `my_sample_agent` with the name of your agent folder. You can replace `u_123` with a specific user ID, and `s_123` with a specific session ID. -* `{"state": {"key1": "value1", "key2": 42}}`: This is optional. You can use +* `{"key1": "value1", "key2": 42}`: This is optional. You can use this to customize the agent's pre-existing state (dict) when creating the session. @@ -321,10 +321,8 @@ Creates a new session or updates an existing one. If a session with the given ID **Request Body** ```json { - "state": { - "key1": "value1", - "key2": 42 - } + "key1": "value1", + "key2": 42 } ``` @@ -332,7 +330,7 @@ Creates a new session or updates an existing one. If a session with the given ID ```shell curl -X POST http://localhost:8000/apps/my_sample_agent/users/u_123/sessions/s_abc \ -H "Content-Type: application/json" \ - -d '{"state": {"visit_count": 5}}' + -d '{"visit_count": 5}' ``` **Example Response**