Create and start a new run for the specified agent.
curl --request POST \
--url http://localhost:8000/runs \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "chat",
"input": [
{
"role": "<string>",
"parts": [
{
"content_type": "text/plain",
"name": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>",
"metadata": {
"kind": "citation",
"start_index": 123,
"end_index": 123,
"url": "<string>",
"title": "<string>",
"description": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": [
"<string>"
],
"state": "<string>"
},
"mode": "sync"
}
'{
"agent_name": "chat",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"output": [
{
"role": "<string>",
"parts": [
{
"content_type": "text/plain",
"name": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>",
"metadata": {
"kind": "citation",
"start_index": 123,
"end_index": 123,
"url": "<string>",
"title": "<string>",
"description": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"await_request": {},
"error": {
"code": "server_error",
"message": "<string>",
"data": {}
},
"finished_at": "2023-11-07T05:31:56Z"
}A unique identifier for the agent following the RFC 1123 DNS label naming convention.
1 - 63"chat"
1Show child attributes
Specifies the sender of the message. Allowed values:
"user" for messages sent by an end-user."agent for anonymous agent."agent/{agent_name}" for messages sent by an agent, where {agent_name} is the identifier of the agent.Ordered sequence of message parts
1Show child attributes
plain, base64 Represents an inline citation, providing info about information source. This is supposed to be rendered as an inline icon, optionally marking a text range it belongs to.
If CitationMetadata is included together with content in the message part, the citation belongs to that content and renders at the MessagePart position. This way may be used for non-text content, like images and files.
Alternatively, start_index and end_index may define a text range, counting characters in the current Message across all MessageParts with content type text/*, where the citation will be rendered. If one of start_index and end_index is missing or their values are equal, the citation renders only as an inline icon at that position.
If both start_index and end_index are not present and MessagePart has no content, the citation renders as inline icon only at the MessagePart position.
Show child attributes
"citation"Accompanying text, which may be a general description of the source document, or a specific snippet.
Identifier of a session
Mode of the request
sync, async, stream Run started (streaming or immediate)
A unique identifier for the agent following the RFC 1123 DNS label naming convention.
1 - 63"chat"
Identifier of a run
Status of the run
created, in-progress, awaiting, cancelling, cancelled, completed, failed Show child attributes
Specifies the sender of the message. Allowed values:
"user" for messages sent by an end-user."agent for anonymous agent."agent/{agent_name}" for messages sent by an agent, where {agent_name} is the identifier of the agent.Ordered sequence of message parts
1Show child attributes
plain, base64 Represents an inline citation, providing info about information source. This is supposed to be rendered as an inline icon, optionally marking a text range it belongs to.
If CitationMetadata is included together with content in the message part, the citation belongs to that content and renders at the MessagePart position. This way may be used for non-text content, like images and files.
Alternatively, start_index and end_index may define a text range, counting characters in the current Message across all MessageParts with content type text/*, where the citation will be rendered. If one of start_index and end_index is missing or their values are equal, the citation renders only as an inline icon at that position.
If both start_index and end_index are not present and MessagePart has no content, the citation renders as inline icon only at the MessagePart position.
Show child attributes
"citation"Accompanying text, which may be a general description of the source document, or a specific snippet.
Identifier of a session
Payload describing what is awaited from the client to continue the run.
curl --request POST \
--url http://localhost:8000/runs \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "chat",
"input": [
{
"role": "<string>",
"parts": [
{
"content_type": "text/plain",
"name": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>",
"metadata": {
"kind": "citation",
"start_index": 123,
"end_index": 123,
"url": "<string>",
"title": "<string>",
"description": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": [
"<string>"
],
"state": "<string>"
},
"mode": "sync"
}
'{
"agent_name": "chat",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"output": [
{
"role": "<string>",
"parts": [
{
"content_type": "text/plain",
"name": "<string>",
"content": "<string>",
"content_encoding": "plain",
"content_url": "<string>",
"metadata": {
"kind": "citation",
"start_index": 123,
"end_index": 123,
"url": "<string>",
"title": "<string>",
"description": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"await_request": {},
"error": {
"code": "server_error",
"message": "<string>",
"data": {}
},
"finished_at": "2023-11-07T05:31:56Z"
}