Add a session using the compatibility path
curl --request POST \
--url http://localhost:8000/dev/apps/{app_name}/eval_sets/{eval_set_id}/add_session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
'import requests
url = "http://localhost:8000/dev/apps/{app_name}/eval_sets/{eval_set_id}/add_session"
payload = {
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({evalId: 'case-001', sessionId: 'session-001', userId: 'user-001'})
};
fetch('http://localhost:8000/dev/apps/{app_name}/eval_sets/{eval_set_id}/add_session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"error": "CONTENT_LENGTH_REQUIRED"
}{
"error": "REQUEST_TOO_LARGE"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Compatibility endpoints
Add a session using the compatibility path
Equivalent to the hyphenated Add a session as an evaluation case endpoint
Exposed by the verified SDK/ADK versions for trusted development and debugging. Paths depend on the installed ADK version and should not be used as public application entry points
POST
/
dev
/
apps
/
{app_name}
/
eval_sets
/
{eval_set_id}
/
add_session
Add a session using the compatibility path
curl --request POST \
--url http://localhost:8000/dev/apps/{app_name}/eval_sets/{eval_set_id}/add_session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
'import requests
url = "http://localhost:8000/dev/apps/{app_name}/eval_sets/{eval_set_id}/add_session"
payload = {
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({evalId: 'case-001', sessionId: 'session-001', userId: 'user-001'})
};
fetch('http://localhost:8000/dev/apps/{app_name}/eval_sets/{eval_set_id}/add_session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"error": "CONTENT_LENGTH_REQUIRED"
}{
"error": "REQUEST_TOO_LARGE"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}This underscore path uses the same request and response as its hyphenated counterpart and remains available to existing clients. Confirm that the session and set exist, and review the conversation data that will be saved as a sample
See the corresponding evaluation endpoint for the replacement and its complete requirements
Writing or deleting evaluation samples changes the actual evaluation set
Authorizations
Optional locally without a gateway; cloud deployments use the Runtime API key or user-pool JWT required by that deployment, never the model API key
Path Parameters
Application name; harness_agent for the CLI deployment
Evaluation set ID
Body
application/json
Response
Successful response
Last modified on September 19, 2026