Introduction
Core Concepts
REST API
Integrations
Playground
Create a new run
Create and start a new run for the specified agent.
POST
/
runs
Copy
curl --request POST \
--url http://localhost:8000/runs \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "chat",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": [
"<string>"
],
"state": "<string>"
},
"input": [
{
"parts": [
{
"name": "<string>",
"content_type": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"role": "user"
}
],
"mode": "sync"
}'
Copy
{
"agent_name": "chat",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"await_request": {},
"output": [
{
"parts": [
{
"name": "<string>",
"content_type": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"role": "user"
}
],
"error": {
"code": "server_error",
"message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
Body
application/json
Response
200
application/json
Run started (streaming or immediate)
The response is of type object
.
Copy
curl --request POST \
--url http://localhost:8000/runs \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "chat",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": [
"<string>"
],
"state": "<string>"
},
"input": [
{
"parts": [
{
"name": "<string>",
"content_type": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"role": "user"
}
],
"mode": "sync"
}'
Copy
{
"agent_name": "chat",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"await_request": {},
"output": [
{
"parts": [
{
"name": "<string>",
"content_type": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"role": "user"
}
],
"error": {
"code": "server_error",
"message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
Assistant
Responses are generated using AI and may contain mistakes.