API Models
Agent
Bases: BaseModel
A description of an agent supported by this server
Show JSON schema:
{
"$defs": {
"AgentMetadata": {
"description": "Basic information associated to the agent",
"properties": {
"ref": {
"$ref": "#/$defs/AgentRef"
},
"description": {
"description": "Description of this agent, which should include what the intended use is, what tasks it accomplishes and how uses input and configs to produce the output and any other side effect",
"title": "Description",
"type": "string"
}
},
"required": [
"ref",
"description"
],
"title": "AgentMetadata",
"type": "object"
},
"AgentRef": {
"description": "Reference to an Agent Record in the Agent Directory, it includes name, version and a locator.",
"properties": {
"name": {
"description": "Name of the agent that identifies the agent in its record",
"title": "Name",
"type": "string"
},
"version": {
"description": "Version of the agent in its record. Should be formatted according to semantic versioning (https://semver.org)",
"title": "Version",
"type": "string"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URL of the record. Can be a network location, i.e. an entry in the Agent Directory or a file.",
"title": "Url"
}
},
"required": [
"name",
"version"
],
"title": "AgentRef",
"type": "object"
}
},
"description": "A description of an agent supported by this server",
"properties": {
"agent_id": {
"description": "Unique identifier of the agent in this server.",
"title": "Agent Id",
"type": "string"
},
"metadata": {
"$ref": "#/$defs/AgentMetadata"
}
},
"required": [
"agent_id",
"metadata"
],
"title": "Agent",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
agent_id
(StrictStr
) -
metadata
(AgentMetadata
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
agent_id
pydantic-field
Unique identifier of the agent in this server.
from_dict(obj)
classmethod
Create an instance of Agent from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
from_json(json_str)
classmethod
Create an instance of Agent from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent.py
52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent.py
47 48 49 50 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent.py
43 44 45 |
|
AgentACPDescriptor
Bases: BaseModel
Describe all the ACP specs of an agent, including schemas and protocol features.
Show JSON schema:
{
"$defs": {
"AgentACPSpec": {
"description": "Specification of agent capabilities, config, input, output, and interrupts",
"properties": {
"capabilities": {
"$ref": "#/$defs/AgentCapabilities"
},
"input": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Input",
"type": "object"
},
"output": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Output",
"type": "object"
},
"custom_streaming_update": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "This describes the format of an Update in the streaming. Must be specified if `streaming.custom` capability is true and cannot be specified otherwise. Format follows: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Custom Streaming Update"
},
"thread_state": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "This describes the format of ThreadState. Cannot be specified if `threads` capability is false. If not specified, when `threads` capability is true, then the API to retrieve ThreadState from a Thread or a Run is not available. This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Thread State"
},
"config": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Config",
"type": "object"
},
"interrupts": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AgentACPSpecInterruptsInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of possible interrupts that can be provided by the agent. If `interrupts` capability is true, this needs to have at least one item.",
"title": "Interrupts"
}
},
"required": [
"capabilities",
"input",
"output",
"config"
],
"title": "AgentACPSpec",
"type": "object"
},
"AgentACPSpecInterruptsInner": {
"description": "AgentACPSpecInterruptsInner",
"properties": {
"interrupt_type": {
"description": "Name of this interrupt type. Needs to be unique in the list of interrupts.",
"title": "Interrupt Type",
"type": "string"
},
"interrupt_payload": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Interrupt Payload",
"type": "object"
},
"resume_payload": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Resume Payload",
"type": "object"
}
},
"required": [
"interrupt_type",
"interrupt_payload",
"resume_payload"
],
"title": "AgentACPSpecInterruptsInner",
"type": "object"
},
"AgentCapabilities": {
"description": "Declares what invocation features this agent is capable of.",
"properties": {
"threads": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent supports run threads. If this is `false`, then the threads tagged with `Threads` are not available. If missing, it means `false`",
"title": "Threads"
},
"interrupts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent runs can interrupt to request additional input and can be subsequently resumed. If missing, it means `false`",
"title": "Interrupts"
},
"callbacks": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent supports a webhook to report run results. If this is `false`, providing a `webhook` at run creation has no effect. If missing, it means `false`",
"title": "Callbacks"
},
"streaming": {
"anyOf": [
{
"$ref": "#/$defs/StreamingModes"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "AgentCapabilities",
"type": "object"
},
"AgentMetadata": {
"description": "Basic information associated to the agent",
"properties": {
"ref": {
"$ref": "#/$defs/AgentRef"
},
"description": {
"description": "Description of this agent, which should include what the intended use is, what tasks it accomplishes and how uses input and configs to produce the output and any other side effect",
"title": "Description",
"type": "string"
}
},
"required": [
"ref",
"description"
],
"title": "AgentMetadata",
"type": "object"
},
"AgentRef": {
"description": "Reference to an Agent Record in the Agent Directory, it includes name, version and a locator.",
"properties": {
"name": {
"description": "Name of the agent that identifies the agent in its record",
"title": "Name",
"type": "string"
},
"version": {
"description": "Version of the agent in its record. Should be formatted according to semantic versioning (https://semver.org)",
"title": "Version",
"type": "string"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URL of the record. Can be a network location, i.e. an entry in the Agent Directory or a file.",
"title": "Url"
}
},
"required": [
"name",
"version"
],
"title": "AgentRef",
"type": "object"
},
"StreamingModes": {
"description": "Supported streaming modes. If missing, streaming is not supported. If no mode is supported attempts to stream output will result in an error.",
"properties": {
"values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports values streaming. If `false` or missing, values streaming is not supported. Values streaming consists of a stream of objects of type `ValueRunResultUpdate`, where each one sent over the stream fully replace the previous one.",
"title": "Values"
},
"custom": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports custom objects streaming. If `false` or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under `specs.custom_streaming_update`.",
"title": "Custom"
}
},
"title": "StreamingModes",
"type": "object"
}
},
"description": "Describe all the ACP specs of an agent, including schemas and protocol features.",
"properties": {
"metadata": {
"$ref": "#/$defs/AgentMetadata"
},
"specs": {
"$ref": "#/$defs/AgentACPSpec"
}
},
"required": [
"metadata",
"specs"
],
"title": "AgentACPDescriptor",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
metadata
(AgentMetadata
) -
specs
(AgentACPSpec
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_descriptor.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_dict(obj)
classmethod
Create an instance of AgentACPDescriptor from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_descriptor.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of AgentACPDescriptor from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_descriptor.py
53 54 55 56 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_descriptor.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_descriptor.py
48 49 50 51 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_descriptor.py
44 45 46 |
|
AgentACPSpec
Bases: BaseModel
Specification of agent capabilities, config, input, output, and interrupts
Show JSON schema:
{
"$defs": {
"AgentACPSpecInterruptsInner": {
"description": "AgentACPSpecInterruptsInner",
"properties": {
"interrupt_type": {
"description": "Name of this interrupt type. Needs to be unique in the list of interrupts.",
"title": "Interrupt Type",
"type": "string"
},
"interrupt_payload": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Interrupt Payload",
"type": "object"
},
"resume_payload": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Resume Payload",
"type": "object"
}
},
"required": [
"interrupt_type",
"interrupt_payload",
"resume_payload"
],
"title": "AgentACPSpecInterruptsInner",
"type": "object"
},
"AgentCapabilities": {
"description": "Declares what invocation features this agent is capable of.",
"properties": {
"threads": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent supports run threads. If this is `false`, then the threads tagged with `Threads` are not available. If missing, it means `false`",
"title": "Threads"
},
"interrupts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent runs can interrupt to request additional input and can be subsequently resumed. If missing, it means `false`",
"title": "Interrupts"
},
"callbacks": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent supports a webhook to report run results. If this is `false`, providing a `webhook` at run creation has no effect. If missing, it means `false`",
"title": "Callbacks"
},
"streaming": {
"anyOf": [
{
"$ref": "#/$defs/StreamingModes"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "AgentCapabilities",
"type": "object"
},
"StreamingModes": {
"description": "Supported streaming modes. If missing, streaming is not supported. If no mode is supported attempts to stream output will result in an error.",
"properties": {
"values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports values streaming. If `false` or missing, values streaming is not supported. Values streaming consists of a stream of objects of type `ValueRunResultUpdate`, where each one sent over the stream fully replace the previous one.",
"title": "Values"
},
"custom": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports custom objects streaming. If `false` or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under `specs.custom_streaming_update`.",
"title": "Custom"
}
},
"title": "StreamingModes",
"type": "object"
}
},
"description": "Specification of agent capabilities, config, input, output, and interrupts",
"properties": {
"capabilities": {
"$ref": "#/$defs/AgentCapabilities"
},
"input": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Input",
"type": "object"
},
"output": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Output",
"type": "object"
},
"custom_streaming_update": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "This describes the format of an Update in the streaming. Must be specified if `streaming.custom` capability is true and cannot be specified otherwise. Format follows: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Custom Streaming Update"
},
"thread_state": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "This describes the format of ThreadState. Cannot be specified if `threads` capability is false. If not specified, when `threads` capability is true, then the API to retrieve ThreadState from a Thread or a Run is not available. This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Thread State"
},
"config": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Config",
"type": "object"
},
"interrupts": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AgentACPSpecInterruptsInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of possible interrupts that can be provided by the agent. If `interrupts` capability is true, this needs to have at least one item.",
"title": "Interrupts"
}
},
"required": [
"capabilities",
"input",
"output",
"config"
],
"title": "AgentACPSpec",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
capabilities
(AgentCapabilities
) -
input
(Dict[str, Any]
) -
output
(Dict[str, Any]
) -
custom_streaming_update
(Optional[Dict[str, Any]]
) -
thread_state
(Optional[Dict[str, Any]]
) -
config
(Dict[str, Any]
) -
interrupts
(Optional[List[AgentACPSpecInterruptsInner]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
config
pydantic-field
This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
custom_streaming_update = None
pydantic-field
This describes the format of an Update in the streaming. Must be specified if streaming.custom
capability is true and cannot be specified otherwise. Format follows: https://spec.openapis.org/oas/v3.1.1.html#schema-object
input
pydantic-field
This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
interrupts = None
pydantic-field
List of possible interrupts that can be provided by the agent. If interrupts
capability is true, this needs to have at least one item.
output
pydantic-field
This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
thread_state = None
pydantic-field
This describes the format of ThreadState. Cannot be specified if threads
capability is false. If not specified, when threads
capability is true, then the API to retrieve ThreadState from a Thread or a Run is not available. This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
from_dict(obj)
classmethod
Create an instance of AgentACPSpec from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
from_json(json_str)
classmethod
Create an instance of AgentACPSpec from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec.py
58 59 60 61 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec.py
53 54 55 56 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec.py
49 50 51 |
|
AgentACPSpecInterruptsInner
Bases: BaseModel
AgentACPSpecInterruptsInner
Show JSON schema:
{
"description": "AgentACPSpecInterruptsInner",
"properties": {
"interrupt_type": {
"description": "Name of this interrupt type. Needs to be unique in the list of interrupts.",
"title": "Interrupt Type",
"type": "string"
},
"interrupt_payload": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Interrupt Payload",
"type": "object"
},
"resume_payload": {
"additionalProperties": true,
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
"title": "Resume Payload",
"type": "object"
}
},
"required": [
"interrupt_type",
"interrupt_payload",
"resume_payload"
],
"title": "AgentACPSpecInterruptsInner",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
interrupt_type
(StrictStr
) -
interrupt_payload
(Dict[str, Any]
) -
resume_payload
(Dict[str, Any]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec_interrupts_inner.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
interrupt_payload
pydantic-field
This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
interrupt_type
pydantic-field
Name of this interrupt type. Needs to be unique in the list of interrupts.
resume_payload
pydantic-field
This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
from_dict(obj)
classmethod
Create an instance of AgentACPSpecInterruptsInner from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec_interrupts_inner.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
from_json(json_str)
classmethod
Create an instance of AgentACPSpecInterruptsInner from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec_interrupts_inner.py
52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec_interrupts_inner.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec_interrupts_inner.py
47 48 49 50 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_acp_spec_interrupts_inner.py
43 44 45 |
|
AgentCapabilities
Bases: BaseModel
Declares what invocation features this agent is capable of.
Show JSON schema:
{
"$defs": {
"StreamingModes": {
"description": "Supported streaming modes. If missing, streaming is not supported. If no mode is supported attempts to stream output will result in an error.",
"properties": {
"values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports values streaming. If `false` or missing, values streaming is not supported. Values streaming consists of a stream of objects of type `ValueRunResultUpdate`, where each one sent over the stream fully replace the previous one.",
"title": "Values"
},
"custom": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports custom objects streaming. If `false` or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under `specs.custom_streaming_update`.",
"title": "Custom"
}
},
"title": "StreamingModes",
"type": "object"
}
},
"description": "Declares what invocation features this agent is capable of.",
"properties": {
"threads": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent supports run threads. If this is `false`, then the threads tagged with `Threads` are not available. If missing, it means `false`",
"title": "Threads"
},
"interrupts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent runs can interrupt to request additional input and can be subsequently resumed. If missing, it means `false`",
"title": "Interrupts"
},
"callbacks": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "This is `true` if the agent supports a webhook to report run results. If this is `false`, providing a `webhook` at run creation has no effect. If missing, it means `false`",
"title": "Callbacks"
},
"streaming": {
"anyOf": [
{
"$ref": "#/$defs/StreamingModes"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "AgentCapabilities",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
threads
(Optional[StrictBool]
) -
interrupts
(Optional[StrictBool]
) -
callbacks
(Optional[StrictBool]
) -
streaming
(Optional[StreamingModes]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_capabilities.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
callbacks = False
pydantic-field
This is true
if the agent supports a webhook to report run results. If this is false
, providing a webhook
at run creation has no effect. If missing, it means false
interrupts = False
pydantic-field
This is true
if the agent runs can interrupt to request additional input and can be subsequently resumed. If missing, it means false
threads = False
pydantic-field
This is true
if the agent supports run threads. If this is false
, then the threads tagged with Threads
are not available. If missing, it means false
from_dict(obj)
classmethod
Create an instance of AgentCapabilities from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_capabilities.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of AgentCapabilities from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_capabilities.py
54 55 56 57 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_capabilities.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_capabilities.py
49 50 51 52 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_capabilities.py
45 46 47 |
|
AgentMetadata
Bases: BaseModel
Basic information associated to the agent
Show JSON schema:
{
"$defs": {
"AgentRef": {
"description": "Reference to an Agent Record in the Agent Directory, it includes name, version and a locator.",
"properties": {
"name": {
"description": "Name of the agent that identifies the agent in its record",
"title": "Name",
"type": "string"
},
"version": {
"description": "Version of the agent in its record. Should be formatted according to semantic versioning (https://semver.org)",
"title": "Version",
"type": "string"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URL of the record. Can be a network location, i.e. an entry in the Agent Directory or a file.",
"title": "Url"
}
},
"required": [
"name",
"version"
],
"title": "AgentRef",
"type": "object"
}
},
"description": "Basic information associated to the agent",
"properties": {
"ref": {
"$ref": "#/$defs/AgentRef"
},
"description": {
"description": "Description of this agent, which should include what the intended use is, what tasks it accomplishes and how uses input and configs to produce the output and any other side effect",
"title": "Description",
"type": "string"
}
},
"required": [
"ref",
"description"
],
"title": "AgentMetadata",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
ref
(AgentRef
) -
description
(StrictStr
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_metadata.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
description
pydantic-field
Description of this agent, which should include what the intended use is, what tasks it accomplishes and how uses input and configs to produce the output and any other side effect
from_dict(obj)
classmethod
Create an instance of AgentMetadata from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_metadata.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
from_json(json_str)
classmethod
Create an instance of AgentMetadata from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_metadata.py
52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_metadata.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_metadata.py
47 48 49 50 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_metadata.py
43 44 45 |
|
AgentRef
Bases: BaseModel
Reference to an Agent Record in the Agent Directory, it includes name, version and a locator.
Show JSON schema:
{
"description": "Reference to an Agent Record in the Agent Directory, it includes name, version and a locator.",
"properties": {
"name": {
"description": "Name of the agent that identifies the agent in its record",
"title": "Name",
"type": "string"
},
"version": {
"description": "Version of the agent in its record. Should be formatted according to semantic versioning (https://semver.org)",
"title": "Version",
"type": "string"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URL of the record. Can be a network location, i.e. an entry in the Agent Directory or a file.",
"title": "Url"
}
},
"required": [
"name",
"version"
],
"title": "AgentRef",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_ref.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
name
pydantic-field
Name of the agent that identifies the agent in its record
url = None
pydantic-field
URL of the record. Can be a network location, i.e. an entry in the Agent Directory or a file.
version
pydantic-field
Version of the agent in its record. Should be formatted according to semantic versioning (https://semver.org)
from_dict(obj)
classmethod
Create an instance of AgentRef from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_ref.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
from_json(json_str)
classmethod
Create an instance of AgentRef from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_ref.py
52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_ref.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_ref.py
47 48 49 50 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_ref.py
43 44 45 |
|
AgentSearchRequest
Bases: BaseModel
Payload for listing agents.
Show JSON schema:
{
"description": "Payload for listing agents.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match all agents with the name specified.",
"title": "Name"
},
"version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match all agents with the version specified. Formatted according to semantic versioning (https://semver.org)",
"title": "Version"
},
"limit": {
"anyOf": [
{
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": 10,
"description": "Maximum number to return.",
"title": "Limit"
},
"offset": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": 0,
"description": "Offset to start from.",
"title": "Offset"
}
},
"title": "AgentSearchRequest",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
name
(Optional[StrictStr]
) -
version
(Optional[StrictStr]
) -
limit
(Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]]
) -
offset
(Optional[Annotated[int, Field(strict=True, ge=0)]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_search_request.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
limit = 10
pydantic-field
Maximum number to return.
name = None
pydantic-field
Match all agents with the name specified.
offset = 0
pydantic-field
Offset to start from.
version = None
pydantic-field
Match all agents with the version specified. Formatted according to semantic versioning (https://semver.org)
from_dict(obj)
classmethod
Create an instance of AgentSearchRequest from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_search_request.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
from_json(json_str)
classmethod
Create an instance of AgentSearchRequest from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_search_request.py
54 55 56 57 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_search_request.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_search_request.py
49 50 51 52 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/agent_search_request.py
45 46 47 |
|
Config
Bases: BaseModel
The configuration for the agent.
Show JSON schema:
{
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
tags
(Optional[List[StrictStr]]
) -
recursion_limit
(Optional[StrictInt]
) -
configurable
(Optional[Dict[str, Any]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/config.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
configurable = None
pydantic-field
The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.
from_dict(obj)
classmethod
Create an instance of Config from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/config.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
from_json(json_str)
classmethod
Create an instance of Config from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/config.py
52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/config.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/config.py
47 48 49 50 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/config.py
43 44 45 |
|
Content
Bases: BaseModel
The content of the message.
Show JSON schema:
{
"$defs": {
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
}
},
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
}
Config:
validate_assignment
:True
protected_namespaces
:()
Fields:
-
oneof_schema_1_validator
(Optional[StrictStr]
) -
oneof_schema_2_validator
(Optional[List[ContentOneOfInner]]
) -
actual_instance
(Optional[Union[List[ContentOneOfInner], str]]
) -
one_of_schemas
(Set[str]
)
Validators:
-
actual_instance_must_validate_oneof
→actual_instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
from_json(json_str)
classmethod
Returns the object represented by the json string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
to_dict()
Returns the dict representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content.py
131 132 133 134 135 136 137 138 139 140 |
|
to_json()
Returns the JSON representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content.py
121 122 123 124 125 126 127 128 129 |
|
to_str()
Returns the string representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content.py
142 143 144 |
|
ContentOneOfInner
Bases: BaseModel
ContentOneOfInner
Show JSON schema:
{
"$defs": {
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
}
},
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
}
Config:
default
:{'validate_assignment': True, 'protected_namespaces': ()}
Fields:
-
anyof_schema_1_validator
(Optional[MessageTextBlock]
) -
anyof_schema_2_validator
(Optional[MessageAnyBlock]
) -
actual_instance
(Optional[Union[MessageAnyBlock, MessageTextBlock]]
) -
any_of_schemas
(Set[str]
)
Validators:
-
actual_instance_must_validate_anyof
→actual_instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content_one_of_inner.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
from_json(json_str)
classmethod
Returns the object represented by the json string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content_one_of_inner.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
to_dict()
Returns the dict representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content_one_of_inner.py
122 123 124 125 126 127 128 129 130 |
|
to_json()
Returns the JSON representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content_one_of_inner.py
112 113 114 115 116 117 118 119 120 |
|
to_str()
Returns the string representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/content_one_of_inner.py
132 133 134 |
|
CustomRunResultUpdate
Bases: BaseModel
Object holding a custom defined update of the agent result during streaming.
Show JSON schema:
{
"$defs": {
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
}
},
"description": "Object holding a custom defined update of the agent result during streaming.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the run.",
"title": "Run Id"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "Status of the Run when this result was generated"
},
"update": {
"additionalProperties": true,
"description": "An update in the SSE event streaming where streaming mode is set to custom. The schema is described in agent ACP descriptor under 'spec.custom_streaming_update'.",
"title": "Update",
"type": "object"
}
},
"required": [
"type",
"status",
"update"
],
"title": "CustomRunResultUpdate",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
Validators:
-
type_validate_enum
→type
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
run_id = None
pydantic-field
The ID of the run.
status
pydantic-field
Status of the Run when this result was generated
update
pydantic-field
An update in the SSE event streaming where streaming mode is set to custom. The schema is described in agent ACP descriptor under 'spec.custom_streaming_update'.
from_dict(obj)
classmethod
Create an instance of CustomRunResultUpdate from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
from_json(json_str)
classmethod
Create an instance of CustomRunResultUpdate from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
61 62 63 64 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
56 57 58 59 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
52 53 54 |
|
type_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/custom_run_result_update.py
38 39 40 41 42 43 |
|
Message
Bases: BaseModel
Message
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
}
},
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
id = None
pydantic-field
The ID of the message.
metadata = None
pydantic-field
The metadata of the message.
role
pydantic-field
The role of the message.
from_dict(obj)
classmethod
Create an instance of Message from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of Message from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message.py
54 55 56 57 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message.py
49 50 51 52 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message.py
45 46 47 |
|
MessageAnyBlock
Bases: BaseModel
MessageAnyBlock
Show JSON schema:
{
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
type
(StrictStr
) -
metadata
(Optional[Dict[str, Any]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_any_block.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
from_dict(obj)
classmethod
Create an instance of MessageAnyBlock from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_any_block.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
from_json(json_str)
classmethod
Create an instance of MessageAnyBlock from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_any_block.py
51 52 53 54 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_any_block.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_any_block.py
46 47 48 49 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_any_block.py
42 43 44 |
|
MessageTextBlock
Bases: BaseModel
MessageTextBlock
Show JSON schema:
{
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
text
(StrictStr
) -
type
(Optional[Any]
) -
metadata
(Optional[Dict[str, Any]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_text_block.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
from_dict(obj)
classmethod
Create an instance of MessageTextBlock from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_text_block.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
from_json(json_str)
classmethod
Create an instance of MessageTextBlock from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_text_block.py
52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_text_block.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_text_block.py
47 48 49 50 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/message_text_block.py
43 44 45 |
|
Run
Bases: BaseModel
Holds common information of a run
Show JSON schema:
{
"$defs": {
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
}
},
"description": "Holds common information of a run",
"properties": {
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.",
"title": "Thread Id"
},
"agent_id": {
"description": "The agent that was used for this run.",
"title": "Agent Id",
"type": "string"
},
"created_at": {
"description": "The time the run was created.",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"updated_at": {
"description": "The last time the run was updated.",
"format": "date-time",
"title": "Updated At",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
}
},
"required": [
"run_id",
"agent_id",
"created_at",
"updated_at",
"status"
],
"title": "Run",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
run_id
(StrictStr
) -
thread_id
(Optional[StrictStr]
) -
agent_id
(StrictStr
) -
created_at
(datetime
) -
updated_at
(datetime
) -
status
(RunStatus
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
agent_id
pydantic-field
The agent that was used for this run.
created_at
pydantic-field
The time the run was created.
run_id
pydantic-field
The ID of the run.
status
pydantic-field
The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'.
thread_id = None
pydantic-field
Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.
updated_at
pydantic-field
The last time the run was updated.
from_dict(obj)
classmethod
Create an instance of Run from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
from_json(json_str)
classmethod
Create an instance of Run from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run.py
57 58 59 60 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run.py
52 53 54 55 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run.py
48 49 50 |
|
RunCreate
Bases: BaseModel
Payload for creating a run.
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "Payload for creating a run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
}
},
"title": "RunCreate",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
agent_id
(Optional[StrictStr]
) -
input
(Optional[Dict[str, Any]]
) -
metadata
(Optional[Dict[str, Any]]
) -
config
(Optional[Config]
) -
webhook
(Optional[Annotated[str, Field(min_length=1, strict=True, max_length=65536)]]
) -
stream_mode
(Optional[StreamMode]
) -
on_disconnect
(Optional[StrictStr]
) -
multitask_strategy
(Optional[StrictStr]
) -
after_seconds
(Optional[StrictInt]
)
Validators:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
after_seconds = None
pydantic-field
The number of seconds to wait before starting the run. Use to schedule future runs.
agent_id = None
pydantic-field
The agent ID to run. If not provided will use the default agent for this service.
input = None
pydantic-field
The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.
metadata = None
pydantic-field
Metadata to assign to the run.
multitask_strategy = 'reject'
pydantic-field
Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.
on_disconnect = 'cancel'
pydantic-field
The disconnect mode to use. Must be one of 'cancel' or 'continue'.
webhook = None
pydantic-field
Webhook to call upon change of run status. This is a url that accepts a POST containing the Run
object as body. See Callbacks definition.
from_dict(obj)
classmethod
Create an instance of RunCreate from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
from_json(json_str)
classmethod
Create an instance of RunCreate from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
81 82 83 84 |
|
multitask_strategy_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
55 56 57 58 59 60 61 62 63 |
|
on_disconnect_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
45 46 47 48 49 50 51 52 53 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
76 77 78 79 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create.py
72 73 74 |
|
RunCreateStateful
Bases: BaseModel
Payload for creating a stateful run.
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "Payload for creating a stateful run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
},
"stream_subgraphs": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether to stream output from subgraphs.",
"title": "Stream Subgraphs"
},
"if_not_exists": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).",
"title": "If Not Exists"
}
},
"title": "RunCreateStateful",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
agent_id
(Optional[StrictStr]
) -
input
(Optional[Dict[str, Any]]
) -
metadata
(Optional[Dict[str, Any]]
) -
config
(Optional[Config]
) -
webhook
(Optional[Annotated[str, Field(min_length=1, strict=True, max_length=65536)]]
) -
stream_mode
(Optional[StreamMode]
) -
on_disconnect
(Optional[StrictStr]
) -
multitask_strategy
(Optional[StrictStr]
) -
after_seconds
(Optional[StrictInt]
) -
stream_subgraphs
(Optional[StrictBool]
) -
if_not_exists
(Optional[StrictStr]
)
Validators:
-
on_disconnect_validate_enum
→on_disconnect
-
multitask_strategy_validate_enum
→multitask_strategy
-
if_not_exists_validate_enum
→if_not_exists
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
after_seconds = None
pydantic-field
The number of seconds to wait before starting the run. Use to schedule future runs.
agent_id = None
pydantic-field
The agent ID to run. If not provided will use the default agent for this service.
if_not_exists = 'reject'
pydantic-field
How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).
input = None
pydantic-field
The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.
metadata = None
pydantic-field
Metadata to assign to the run.
multitask_strategy = 'reject'
pydantic-field
Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.
on_disconnect = 'cancel'
pydantic-field
The disconnect mode to use. Must be one of 'cancel' or 'continue'.
stream_subgraphs = False
pydantic-field
Whether to stream output from subgraphs.
webhook = None
pydantic-field
Webhook to call upon change of run status. This is a url that accepts a POST containing the Run
object as body. See Callbacks definition.
from_dict(obj)
classmethod
Create an instance of RunCreateStateful from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
from_json(json_str)
classmethod
Create an instance of RunCreateStateful from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
93 94 95 96 |
|
if_not_exists_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
67 68 69 70 71 72 73 74 75 |
|
multitask_strategy_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
57 58 59 60 61 62 63 64 65 |
|
on_disconnect_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
47 48 49 50 51 52 53 54 55 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
88 89 90 91 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateful.py
84 85 86 |
|
RunCreateStateless
Bases: BaseModel
Payload for creating a stateless run.
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "Payload for creating a stateless run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
},
"on_completion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "delete",
"description": "Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.",
"title": "On Completion"
}
},
"title": "RunCreateStateless",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
agent_id
(Optional[StrictStr]
) -
input
(Optional[Dict[str, Any]]
) -
metadata
(Optional[Dict[str, Any]]
) -
config
(Optional[Config]
) -
webhook
(Optional[Annotated[str, Field(min_length=1, strict=True, max_length=65536)]]
) -
stream_mode
(Optional[StreamMode]
) -
on_disconnect
(Optional[StrictStr]
) -
multitask_strategy
(Optional[StrictStr]
) -
after_seconds
(Optional[StrictInt]
) -
on_completion
(Optional[StrictStr]
)
Validators:
-
on_disconnect_validate_enum
→on_disconnect
-
multitask_strategy_validate_enum
→multitask_strategy
-
on_completion_validate_enum
→on_completion
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
after_seconds = None
pydantic-field
The number of seconds to wait before starting the run. Use to schedule future runs.
agent_id = None
pydantic-field
The agent ID to run. If not provided will use the default agent for this service.
input = None
pydantic-field
The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.
metadata = None
pydantic-field
Metadata to assign to the run.
multitask_strategy = 'reject'
pydantic-field
Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.
on_completion = 'delete'
pydantic-field
Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.
on_disconnect = 'cancel'
pydantic-field
The disconnect mode to use. Must be one of 'cancel' or 'continue'.
webhook = None
pydantic-field
Webhook to call upon change of run status. This is a url that accepts a POST containing the Run
object as body. See Callbacks definition.
from_dict(obj)
classmethod
Create an instance of RunCreateStateless from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
from_json(json_str)
classmethod
Create an instance of RunCreateStateless from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
92 93 94 95 |
|
multitask_strategy_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
56 57 58 59 60 61 62 63 64 |
|
on_completion_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
66 67 68 69 70 71 72 73 74 |
|
on_disconnect_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
46 47 48 49 50 51 52 53 54 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
87 88 89 90 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_create_stateless.py
83 84 85 |
|
RunError
Bases: BaseModel
Run terminated with an error
Show JSON schema:
{
"description": "Run terminated with an error",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"errcode": {
"description": "code of the error",
"title": "Errcode",
"type": "integer"
},
"description": {
"description": "description of the error",
"title": "Description",
"type": "string"
}
},
"required": [
"type",
"run_id",
"errcode",
"description"
],
"title": "RunError",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
type
(StrictStr
) -
run_id
(StrictStr
) -
errcode
(StrictInt
) -
description
(StrictStr
)
Validators:
-
type_validate_enum
→type
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
description
pydantic-field
description of the error
errcode
pydantic-field
code of the error
run_id
pydantic-field
The ID of the run.
from_dict(obj)
classmethod
Create an instance of RunError from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
from_json(json_str)
classmethod
Create an instance of RunError from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
60 61 62 63 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
55 56 57 58 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
51 52 53 |
|
type_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_error.py
37 38 39 40 41 42 |
|
RunInterrupt
Bases: BaseModel
Interrupt occurred during a Run
Show JSON schema:
{
"description": "Interrupt occurred during a Run",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"interrupt": {
"additionalProperties": true,
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf: - $ref: '#/components/schemas/ApprovalInterruptPayload' - $ref: '#/components/schemas/QuestionInterruptPayload' discriminator: propertyName: interruput_type mapping: approval: '#/components/schemas/ApprovalInterruptPayload' question: '#/components/schemas/QuestionInterruptPayload'",
"title": "Interrupt",
"type": "object"
}
},
"required": [
"type",
"interrupt"
],
"title": "RunInterrupt",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
type
(StrictStr
) -
interrupt
(Dict[str, Any]
)
Validators:
-
type_validate_enum
→type
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
interrupt
pydantic-field
This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with oneOf
and discriminator
. The discriminator is the interrupt_type
, while the schemas will be the ones defined in the agent spec under interrupts
/interrupt_payload
For example: oneOf: - $ref: '#/components/schemas/ApprovalInterruptPayload' - $ref: '#/components/schemas/QuestionInterruptPayload' discriminator: propertyName: interruput_type mapping: approval: '#/components/schemas/ApprovalInterruptPayload' question: '#/components/schemas/QuestionInterruptPayload'
from_dict(obj)
classmethod
Create an instance of RunInterrupt from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
from_json(json_str)
classmethod
Create an instance of RunInterrupt from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
58 59 60 61 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
53 54 55 56 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
49 50 51 |
|
type_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_interrupt.py
35 36 37 38 39 40 |
|
RunOutput
Bases: BaseModel
Output of a Run. Can be the final result or an interrupt.
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"RunError": {
"description": "Run terminated with an error",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"errcode": {
"description": "code of the error",
"title": "Errcode",
"type": "integer"
},
"description": {
"description": "description of the error",
"title": "Description",
"type": "string"
}
},
"required": [
"type",
"run_id",
"errcode",
"description"
],
"title": "RunError",
"type": "object"
},
"RunInterrupt": {
"description": "Interrupt occurred during a Run",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"interrupt": {
"additionalProperties": true,
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf: - $ref: '#/components/schemas/ApprovalInterruptPayload' - $ref: '#/components/schemas/QuestionInterruptPayload' discriminator: propertyName: interruput_type mapping: approval: '#/components/schemas/ApprovalInterruptPayload' question: '#/components/schemas/QuestionInterruptPayload'",
"title": "Interrupt",
"type": "object"
}
},
"required": [
"type",
"interrupt"
],
"title": "RunInterrupt",
"type": "object"
},
"RunResult": {
"description": "Final result of a Run.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type"
],
"title": "RunResult",
"type": "object"
}
},
"description": "Output of a Run. Can be the final result or an interrupt.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunResult"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunInterrupt"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_3_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunError"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"anyOf": [
{
"$ref": "#/$defs/RunError"
},
{
"$ref": "#/$defs/RunInterrupt"
},
{
"$ref": "#/$defs/RunResult"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"RunInterrupt",
"RunResult",
"RunError"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
},
"discriminator_value_class_map": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Discriminator Value Class Map",
"type": "object"
}
},
"title": "RunOutput",
"type": "object"
}
Config:
validate_assignment
:True
protected_namespaces
:()
Fields:
-
oneof_schema_1_validator
(Optional[RunResult]
) -
oneof_schema_2_validator
(Optional[RunInterrupt]
) -
oneof_schema_3_validator
(Optional[RunError]
) -
actual_instance
(Optional[Union[RunError, RunInterrupt, RunResult]]
) -
one_of_schemas
(Set[str]
) -
discriminator_value_class_map
(Dict[str, str]
)
Validators:
-
actual_instance_must_validate_oneof
→actual_instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_json(json_str)
classmethod
Returns the object represented by the json string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
to_dict()
Returns the dict representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output.py
141 142 143 144 145 146 147 148 149 150 |
|
to_json()
Returns the JSON representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output.py
131 132 133 134 135 136 137 138 139 |
|
to_str()
Returns the string representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output.py
152 153 154 |
|
RunOutputStream
Bases: BaseModel
Server-sent event containing one agent output event. Actual event type is carried inside the data.
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"CustomRunResultUpdate": {
"description": "Object holding a custom defined update of the agent result during streaming.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the run.",
"title": "Run Id"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "Status of the Run when this result was generated"
},
"update": {
"additionalProperties": true,
"description": "An update in the SSE event streaming where streaming mode is set to custom. The schema is described in agent ACP descriptor under 'spec.custom_streaming_update'.",
"title": "Update",
"type": "object"
}
},
"required": [
"type",
"status",
"update"
],
"title": "CustomRunResultUpdate",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
},
"StreamEventPayload": {
"description": "A serialized JSON data structure carried in the SSE event data field. The event can carry either a full `ValueRunResultUpdate`, if streaming mode is `values` or an `CustomRunResultUpdate` if streaming mode is `custom`",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/ValueRunResultUpdate"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/CustomRunResultUpdate"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"anyOf": [
{
"$ref": "#/$defs/CustomRunResultUpdate"
},
{
"$ref": "#/$defs/ValueRunResultUpdate"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"ValueRunResultUpdate",
"CustomRunResultUpdate"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
},
"discriminator_value_class_map": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Discriminator Value Class Map",
"type": "object"
}
},
"title": "StreamEventPayload",
"type": "object"
},
"ValueRunResultUpdate": {
"description": "Partial result provided as value through streaming.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "Status of the Run when this result was generated. This is particurarly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result."
},
"values": {
"additionalProperties": true,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values",
"type": "object"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Stream of messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type",
"run_id",
"status",
"values"
],
"title": "ValueRunResultUpdate",
"type": "object"
}
},
"description": "Server-sent event containing one agent output event. Actual event type is carried inside the data.",
"properties": {
"id": {
"description": "Unique identifier of the event",
"title": "Id",
"type": "string"
},
"event": {
"description": "Event type. This is the constant string `agent_event` to be compatible with SSE spec. The actual type differentiation is done in the event itself.",
"title": "Event",
"type": "string"
},
"data": {
"$ref": "#/$defs/StreamEventPayload"
}
},
"required": [
"id",
"event",
"data"
],
"title": "RunOutputStream",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
id
(StrictStr
) -
event
(StrictStr
) -
data
(StreamEventPayload
)
Validators:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
event
pydantic-field
Event type. This is the constant string agent_event
to be compatible with SSE spec. The actual type differentiation is done in the event itself.
id
pydantic-field
Unique identifier of the event
event_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
37 38 39 40 41 42 |
|
from_dict(obj)
classmethod
Create an instance of RunOutputStream from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
from_json(json_str)
classmethod
Create an instance of RunOutputStream from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
60 61 62 63 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
55 56 57 58 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_output_stream.py
51 52 53 |
|
RunResult
Bases: BaseModel
Final result of a Run.
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
}
},
"description": "Final result of a Run.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type"
],
"title": "RunResult",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
Validators:
-
type_validate_enum
→type
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
messages = None
pydantic-field
The messages returned by the run.
values = None
pydantic-field
The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.
from_dict(obj)
classmethod
Create an instance of RunResult from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
from_json(json_str)
classmethod
Create an instance of RunResult from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
60 61 62 63 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
55 56 57 58 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
51 52 53 |
|
type_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_result.py
37 38 39 40 41 42 |
|
RunSearchRequest
Bases: BaseModel
Payload for listing runs.
Show JSON schema:
{
"$defs": {
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
}
},
"description": "Payload for listing runs.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Matches all the Runs associated with the specified Agent ID.",
"title": "Agent Id"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/RunStatus"
},
{
"type": "null"
}
],
"default": null,
"description": "Matches all the Runs associated with the specified status. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Matches all threads for which metadata has keys and values equal to those specified in this object.",
"title": "Metadata"
},
"limit": {
"anyOf": [
{
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": 10,
"description": "Maximum number to return.",
"title": "Limit"
},
"offset": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": 0,
"description": "Offset to start from.",
"title": "Offset"
}
},
"title": "RunSearchRequest",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
agent_id
(Optional[StrictStr]
) -
status
(Optional[RunStatus]
) -
metadata
(Optional[Dict[str, Any]]
) -
limit
(Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]]
) -
offset
(Optional[Annotated[int, Field(strict=True, ge=0)]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_search_request.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
agent_id = None
pydantic-field
Matches all the Runs associated with the specified Agent ID.
limit = 10
pydantic-field
Maximum number to return.
metadata = None
pydantic-field
Matches all threads for which metadata has keys and values equal to those specified in this object.
offset = 0
pydantic-field
Offset to start from.
status = None
pydantic-field
Matches all the Runs associated with the specified status. One of 'pending', 'error', 'success', 'timeout', 'interrupted'.
from_dict(obj)
classmethod
Create an instance of RunSearchRequest from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_search_request.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of RunSearchRequest from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_search_request.py
56 57 58 59 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_search_request.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_search_request.py
51 52 53 54 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_search_request.py
47 48 49 |
|
RunStateful
Bases: BaseModel
Holds all the information of a stateful run
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"RunCreateStateful": {
"description": "Payload for creating a stateful run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
},
"stream_subgraphs": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether to stream output from subgraphs.",
"title": "Stream Subgraphs"
},
"if_not_exists": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).",
"title": "If Not Exists"
}
},
"title": "RunCreateStateful",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "Holds all the information of a stateful run",
"properties": {
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.",
"title": "Thread Id"
},
"agent_id": {
"description": "The agent that was used for this run.",
"title": "Agent Id",
"type": "string"
},
"created_at": {
"description": "The time the run was created.",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"updated_at": {
"description": "The last time the run was updated.",
"format": "date-time",
"title": "Updated At",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
},
"creation": {
"$ref": "#/$defs/RunCreateStateful"
}
},
"required": [
"run_id",
"agent_id",
"created_at",
"updated_at",
"status",
"creation"
],
"title": "RunStateful",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
run_id
(StrictStr
) -
thread_id
(Optional[StrictStr]
) -
agent_id
(StrictStr
) -
created_at
(datetime
) -
updated_at
(datetime
) -
status
(RunStatus
) -
creation
(RunCreateStateful
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateful.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
agent_id
pydantic-field
The agent that was used for this run.
created_at
pydantic-field
The time the run was created.
run_id
pydantic-field
The ID of the run.
status
pydantic-field
The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'.
thread_id = None
pydantic-field
Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.
updated_at
pydantic-field
The last time the run was updated.
from_dict(obj)
classmethod
Create an instance of RunStateful from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateful.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
from_json(json_str)
classmethod
Create an instance of RunStateful from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateful.py
59 60 61 62 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateful.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateful.py
54 55 56 57 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateful.py
50 51 52 |
|
RunStateless
Bases: BaseModel
Holds all the information of a stateless run
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"RunCreateStateless": {
"description": "Payload for creating a stateless run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
},
"on_completion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "delete",
"description": "Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.",
"title": "On Completion"
}
},
"title": "RunCreateStateless",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "Holds all the information of a stateless run",
"properties": {
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.",
"title": "Thread Id"
},
"agent_id": {
"description": "The agent that was used for this run.",
"title": "Agent Id",
"type": "string"
},
"created_at": {
"description": "The time the run was created.",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"updated_at": {
"description": "The last time the run was updated.",
"format": "date-time",
"title": "Updated At",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
},
"creation": {
"$ref": "#/$defs/RunCreateStateless"
}
},
"required": [
"run_id",
"agent_id",
"created_at",
"updated_at",
"status",
"creation"
],
"title": "RunStateless",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
run_id
(StrictStr
) -
thread_id
(Optional[StrictStr]
) -
agent_id
(StrictStr
) -
created_at
(datetime
) -
updated_at
(datetime
) -
status
(RunStatus
) -
creation
(RunCreateStateless
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateless.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
agent_id
pydantic-field
The agent that was used for this run.
created_at
pydantic-field
The time the run was created.
run_id
pydantic-field
The ID of the run.
status
pydantic-field
The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'.
thread_id = None
pydantic-field
Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.
updated_at
pydantic-field
The last time the run was updated.
from_dict(obj)
classmethod
Create an instance of RunStateless from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateless.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
from_json(json_str)
classmethod
Create an instance of RunStateless from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateless.py
59 60 61 62 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateless.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateless.py
54 55 56 57 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_stateless.py
50 51 52 |
|
RunStatus
Bases: str
, Enum
RunStatus
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_status.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
from_json(json_str)
classmethod
Create an instance of RunStatus from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_status.py
37 38 39 40 |
|
RunWaitResponseStateful
Bases: BaseModel
RunWaitResponseStateful
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"RunCreateStateful": {
"description": "Payload for creating a stateful run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
},
"stream_subgraphs": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether to stream output from subgraphs.",
"title": "Stream Subgraphs"
},
"if_not_exists": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).",
"title": "If Not Exists"
}
},
"title": "RunCreateStateful",
"type": "object"
},
"RunError": {
"description": "Run terminated with an error",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"errcode": {
"description": "code of the error",
"title": "Errcode",
"type": "integer"
},
"description": {
"description": "description of the error",
"title": "Description",
"type": "string"
}
},
"required": [
"type",
"run_id",
"errcode",
"description"
],
"title": "RunError",
"type": "object"
},
"RunInterrupt": {
"description": "Interrupt occurred during a Run",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"interrupt": {
"additionalProperties": true,
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf: - $ref: '#/components/schemas/ApprovalInterruptPayload' - $ref: '#/components/schemas/QuestionInterruptPayload' discriminator: propertyName: interruput_type mapping: approval: '#/components/schemas/ApprovalInterruptPayload' question: '#/components/schemas/QuestionInterruptPayload'",
"title": "Interrupt",
"type": "object"
}
},
"required": [
"type",
"interrupt"
],
"title": "RunInterrupt",
"type": "object"
},
"RunOutput": {
"description": "Output of a Run. Can be the final result or an interrupt.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunResult"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunInterrupt"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_3_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunError"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"anyOf": [
{
"$ref": "#/$defs/RunError"
},
{
"$ref": "#/$defs/RunInterrupt"
},
{
"$ref": "#/$defs/RunResult"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"RunInterrupt",
"RunResult",
"RunError"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
},
"discriminator_value_class_map": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Discriminator Value Class Map",
"type": "object"
}
},
"title": "RunOutput",
"type": "object"
},
"RunResult": {
"description": "Final result of a Run.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type"
],
"title": "RunResult",
"type": "object"
},
"RunStateful": {
"description": "Holds all the information of a stateful run",
"properties": {
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.",
"title": "Thread Id"
},
"agent_id": {
"description": "The agent that was used for this run.",
"title": "Agent Id",
"type": "string"
},
"created_at": {
"description": "The time the run was created.",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"updated_at": {
"description": "The last time the run was updated.",
"format": "date-time",
"title": "Updated At",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
},
"creation": {
"$ref": "#/$defs/RunCreateStateful"
}
},
"required": [
"run_id",
"agent_id",
"created_at",
"updated_at",
"status",
"creation"
],
"title": "RunStateful",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "RunWaitResponseStateful",
"properties": {
"run": {
"anyOf": [
{
"$ref": "#/$defs/RunStateful"
},
{
"type": "null"
}
],
"default": null,
"description": "The run information."
},
"output": {
"anyOf": [
{
"$ref": "#/$defs/RunOutput"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "RunWaitResponseStateful",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
run
(Optional[RunStateful]
) -
output
(Optional[RunOutput]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateful.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
run = None
pydantic-field
The run information.
from_dict(obj)
classmethod
Create an instance of RunWaitResponseStateful from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateful.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of RunWaitResponseStateful from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateful.py
53 54 55 56 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateful.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateful.py
48 49 50 51 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateful.py
44 45 46 |
|
RunWaitResponseStateless
Bases: BaseModel
RunWaitResponseStateless
Show JSON schema:
{
"$defs": {
"Config": {
"description": "The configuration for the agent.",
"properties": {
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"recursion_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recursion Limit"
},
"configurable": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
"title": "Configurable"
}
},
"title": "Config",
"type": "object"
},
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"RunCreateStateless": {
"description": "Payload for creating a stateless run.",
"properties": {
"agent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The agent ID to run. If not provided will use the default agent for this service.",
"title": "Agent Id"
},
"input": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'.",
"title": "Input"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to assign to the run.",
"title": "Metadata"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/Config"
},
{
"type": "null"
}
],
"default": null
},
"webhook": {
"anyOf": [
{
"maxLength": 65536,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition.",
"title": "Webhook"
},
"stream_mode": {
"anyOf": [
{
"$ref": "#/$defs/StreamMode"
},
{
"type": "null"
}
],
"default": null
},
"on_disconnect": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "cancel",
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
"title": "On Disconnect"
},
"multitask_strategy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "reject",
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
"title": "Multitask Strategy"
},
"after_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of seconds to wait before starting the run. Use to schedule future runs.",
"title": "After Seconds"
},
"on_completion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "delete",
"description": "Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.",
"title": "On Completion"
}
},
"title": "RunCreateStateless",
"type": "object"
},
"RunError": {
"description": "Run terminated with an error",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"errcode": {
"description": "code of the error",
"title": "Errcode",
"type": "integer"
},
"description": {
"description": "description of the error",
"title": "Description",
"type": "string"
}
},
"required": [
"type",
"run_id",
"errcode",
"description"
],
"title": "RunError",
"type": "object"
},
"RunInterrupt": {
"description": "Interrupt occurred during a Run",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"interrupt": {
"additionalProperties": true,
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf: - $ref: '#/components/schemas/ApprovalInterruptPayload' - $ref: '#/components/schemas/QuestionInterruptPayload' discriminator: propertyName: interruput_type mapping: approval: '#/components/schemas/ApprovalInterruptPayload' question: '#/components/schemas/QuestionInterruptPayload'",
"title": "Interrupt",
"type": "object"
}
},
"required": [
"type",
"interrupt"
],
"title": "RunInterrupt",
"type": "object"
},
"RunOutput": {
"description": "Output of a Run. Can be the final result or an interrupt.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunResult"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunInterrupt"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_3_validator": {
"anyOf": [
{
"$ref": "#/$defs/RunError"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"anyOf": [
{
"$ref": "#/$defs/RunError"
},
{
"$ref": "#/$defs/RunInterrupt"
},
{
"$ref": "#/$defs/RunResult"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"RunInterrupt",
"RunResult",
"RunError"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
},
"discriminator_value_class_map": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Discriminator Value Class Map",
"type": "object"
}
},
"title": "RunOutput",
"type": "object"
},
"RunResult": {
"description": "Final result of a Run.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type"
],
"title": "RunResult",
"type": "object"
},
"RunStateless": {
"description": "Holds all the information of a stateless run",
"properties": {
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads.",
"title": "Thread Id"
},
"agent_id": {
"description": "The agent that was used for this run.",
"title": "Agent Id",
"type": "string"
},
"created_at": {
"description": "The time the run was created.",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"updated_at": {
"description": "The last time the run was updated.",
"format": "date-time",
"title": "Updated At",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
},
"creation": {
"$ref": "#/$defs/RunCreateStateless"
}
},
"required": [
"run_id",
"agent_id",
"created_at",
"updated_at",
"status",
"creation"
],
"title": "RunStateless",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
},
"StreamMode": {
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
},
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "RunWaitResponseStateless",
"properties": {
"run": {
"anyOf": [
{
"$ref": "#/$defs/RunStateless"
},
{
"type": "null"
}
],
"default": null,
"description": "The run information."
},
"output": {
"anyOf": [
{
"$ref": "#/$defs/RunOutput"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "RunWaitResponseStateless",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
run
(Optional[RunStateless]
) -
output
(Optional[RunOutput]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateless.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
run = None
pydantic-field
The run information.
from_dict(obj)
classmethod
Create an instance of RunWaitResponseStateless from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateless.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of RunWaitResponseStateless from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateless.py
53 54 55 56 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateless.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateless.py
48 49 50 51 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/run_wait_response_stateless.py
44 45 46 |
|
StreamEventPayload
Bases: BaseModel
A serialized JSON data structure carried in the SSE event data field. The event can carry either a full ValueRunResultUpdate
, if streaming mode is values
or an CustomRunResultUpdate
if streaming mode is custom
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"CustomRunResultUpdate": {
"description": "Object holding a custom defined update of the agent result during streaming.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the run.",
"title": "Run Id"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "Status of the Run when this result was generated"
},
"update": {
"additionalProperties": true,
"description": "An update in the SSE event streaming where streaming mode is set to custom. The schema is described in agent ACP descriptor under 'spec.custom_streaming_update'.",
"title": "Update",
"type": "object"
}
},
"required": [
"type",
"status",
"update"
],
"title": "CustomRunResultUpdate",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
},
"ValueRunResultUpdate": {
"description": "Partial result provided as value through streaming.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "Status of the Run when this result was generated. This is particurarly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result."
},
"values": {
"additionalProperties": true,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values",
"type": "object"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Stream of messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type",
"run_id",
"status",
"values"
],
"title": "ValueRunResultUpdate",
"type": "object"
}
},
"description": "A serialized JSON data structure carried in the SSE event data field. The event can carry either a full `ValueRunResultUpdate`, if streaming mode is `values` or an `CustomRunResultUpdate` if streaming mode is `custom`",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/ValueRunResultUpdate"
},
{
"type": "null"
}
],
"default": null
},
"oneof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/CustomRunResultUpdate"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"anyOf": [
{
"$ref": "#/$defs/CustomRunResultUpdate"
},
{
"$ref": "#/$defs/ValueRunResultUpdate"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"ValueRunResultUpdate",
"CustomRunResultUpdate"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
},
"discriminator_value_class_map": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Discriminator Value Class Map",
"type": "object"
}
},
"title": "StreamEventPayload",
"type": "object"
}
Config:
validate_assignment
:True
protected_namespaces
:()
Fields:
-
oneof_schema_1_validator
(Optional[ValueRunResultUpdate]
) -
oneof_schema_2_validator
(Optional[CustomRunResultUpdate]
) -
actual_instance
(Optional[Union[CustomRunResultUpdate, ValueRunResultUpdate]]
) -
one_of_schemas
(Set[str]
) -
discriminator_value_class_map
(Dict[str, str]
)
Validators:
-
actual_instance_must_validate_oneof
→actual_instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_event_payload.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
from_json(json_str)
classmethod
Returns the object represented by the json string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_event_payload.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
to_dict()
Returns the dict representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_event_payload.py
127 128 129 130 131 132 133 134 135 136 |
|
to_json()
Returns the JSON representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_event_payload.py
117 118 119 120 121 122 123 124 125 |
|
to_str()
Returns the string representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_event_payload.py
138 139 140 |
|
StreamMode
Bases: BaseModel
If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under specs.capabilities
Show JSON schema:
{
"$defs": {
"StreamingMode": {
"description": "StreamingMode",
"enum": [
"values",
"custom"
],
"title": "StreamingMode",
"type": "string"
}
},
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/StreamingMode"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Anyof Schema 1 Validator"
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/StreamingMode"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"StreamingMode",
"List[StreamingMode]"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "StreamMode",
"type": "object"
}
Config:
default
:{'validate_assignment': True, 'protected_namespaces': ()}
Fields:
-
anyof_schema_1_validator
(Optional[List[StreamingMode]]
) -
anyof_schema_2_validator
(Optional[StreamingMode]
) -
actual_instance
(Optional[Union[List[StreamingMode], StreamingMode]]
) -
any_of_schemas
(Set[str]
)
Validators:
-
actual_instance_must_validate_anyof
→actual_instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_mode.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
from_json(json_str)
classmethod
Returns the object represented by the json string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_mode.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
to_dict()
Returns the dict representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_mode.py
130 131 132 133 134 135 136 137 138 |
|
to_json()
Returns the JSON representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_mode.py
120 121 122 123 124 125 126 127 128 |
|
to_str()
Returns the string representation of the actual instance
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/stream_mode.py
140 141 142 |
|
StreamingMode
Bases: str
, Enum
StreamingMode
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_mode.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
from_json(json_str)
classmethod
Create an instance of StreamingMode from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_mode.py
34 35 36 37 |
|
StreamingModes
Bases: BaseModel
Supported streaming modes. If missing, streaming is not supported. If no mode is supported attempts to stream output will result in an error.
Show JSON schema:
{
"description": "Supported streaming modes. If missing, streaming is not supported. If no mode is supported attempts to stream output will result in an error.",
"properties": {
"values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports values streaming. If `false` or missing, values streaming is not supported. Values streaming consists of a stream of objects of type `ValueRunResultUpdate`, where each one sent over the stream fully replace the previous one.",
"title": "Values"
},
"custom": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "This is `true` if the agent supports custom objects streaming. If `false` or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under `specs.custom_streaming_update`.",
"title": "Custom"
}
},
"title": "StreamingModes",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_modes.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
custom = None
pydantic-field
This is true
if the agent supports custom objects streaming. If false
or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under specs.custom_streaming_update
.
values = None
pydantic-field
This is true
if the agent supports values streaming. If false
or missing, values streaming is not supported. Values streaming consists of a stream of objects of type ValueRunResultUpdate
, where each one sent over the stream fully replace the previous one.
from_dict(obj)
classmethod
Create an instance of StreamingModes from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_modes.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
from_json(json_str)
classmethod
Create an instance of StreamingModes from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_modes.py
51 52 53 54 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_modes.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_modes.py
46 47 48 49 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/streaming_modes.py
42 43 44 |
|
Thread
Bases: BaseModel
Represents a collection of consecutive runs over a thread. Thread is associated with a state. Runs for a thread can potentially happen across different agents, if the state format is compatible.
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
}
},
"description": "Represents a collection of consecutive runs over a thread. Thread is associated with a state. Runs for a thread can potentially happen across different agents, if the state format is compatible.",
"properties": {
"thread_id": {
"description": "unique identifier of a thread",
"title": "Thread Id",
"type": "string"
},
"created_at": {
"description": "The time the thread was created.",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"updated_at": {
"description": "The last time the thread was updated.",
"format": "date-time",
"title": "Updated At",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Free form metadata for this thread",
"title": "Metadata",
"type": "object"
},
"status": {
"description": "The status of the thread.",
"title": "Status",
"type": "string"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.",
"title": "Values"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The current Messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages.",
"title": "Messages"
}
},
"required": [
"thread_id",
"created_at",
"updated_at",
"metadata",
"status"
],
"title": "Thread",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
thread_id
(StrictStr
) -
created_at
(datetime
) -
updated_at
(datetime
) -
metadata
(Dict[str, Any]
) -
status
(StrictStr
) -
values
(Optional[Dict[str, Any]]
) -
messages
(Optional[List[Message]]
)
Validators:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
created_at
pydantic-field
The time the thread was created.
messages = None
pydantic-field
The current Messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages.
metadata
pydantic-field
Free form metadata for this thread
status
pydantic-field
The status of the thread.
thread_id
pydantic-field
unique identifier of a thread
updated_at
pydantic-field
The last time the thread was updated.
values = None
pydantic-field
The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.
from_dict(obj)
classmethod
Create an instance of Thread from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
from_json(json_str)
classmethod
Create an instance of Thread from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
65 66 67 68 |
|
status_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
42 43 44 45 46 47 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
60 61 62 63 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread.py
56 57 58 |
|
ThreadCheckpoint
Bases: BaseModel
Structured identifier for a thread checkpoint, ie. an entry in the thread's history.
Show JSON schema:
{
"description": "Structured identifier for a thread checkpoint, ie. an entry in the thread's history.",
"properties": {
"checkpoint_id": {
"description": "The ID of the checkpoint.",
"title": "Checkpoint Id",
"type": "string"
}
},
"required": [
"checkpoint_id"
],
"title": "ThreadCheckpoint",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
checkpoint_id
(StrictStr
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_checkpoint.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
checkpoint_id
pydantic-field
The ID of the checkpoint.
from_dict(obj)
classmethod
Create an instance of ThreadCheckpoint from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_checkpoint.py
75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
from_json(json_str)
classmethod
Create an instance of ThreadCheckpoint from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_checkpoint.py
50 51 52 53 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_checkpoint.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_checkpoint.py
45 46 47 48 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_checkpoint.py
41 42 43 |
|
ThreadCreate
Bases: BaseModel
Detail of an empty thread to be created.
Show JSON schema:
{
"description": "Detail of an empty thread to be created.",
"properties": {
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the thread. If not provided, a random UUID will be generated.",
"title": "Thread Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Free form metadata for this thread",
"title": "Metadata"
},
"if_exists": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "raise",
"description": "How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing thread).",
"title": "If Exists"
}
},
"title": "ThreadCreate",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
Validators:
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
if_exists = 'raise'
pydantic-field
How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing thread).
metadata = None
pydantic-field
Free form metadata for this thread
thread_id = None
pydantic-field
The ID of the thread. If not provided, a random UUID will be generated.
from_dict(obj)
classmethod
Create an instance of ThreadCreate from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
from_json(json_str)
classmethod
Create an instance of ThreadCreate from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
62 63 64 65 |
|
if_exists_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
36 37 38 39 40 41 42 43 44 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
57 58 59 60 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_create.py
53 54 55 |
|
ThreadPatch
Bases: BaseModel
Payload for updating a thread.
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"ThreadCheckpoint": {
"description": "Structured identifier for a thread checkpoint, ie. an entry in the thread's history.",
"properties": {
"checkpoint_id": {
"description": "The ID of the checkpoint.",
"title": "Checkpoint Id",
"type": "string"
}
},
"required": [
"checkpoint_id"
],
"title": "ThreadCheckpoint",
"type": "object"
}
},
"description": "Payload for updating a thread.",
"properties": {
"checkpoint": {
"anyOf": [
{
"$ref": "#/$defs/ThreadCheckpoint"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the checkpoint to branch from. Ignored for metadata-only patches. If not provided, defaults to the latest checkpoint."
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Metadata to merge with existing thread metadata.",
"title": "Metadata"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.",
"title": "Values"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The current Messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages.",
"title": "Messages"
}
},
"title": "ThreadPatch",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
checkpoint
(Optional[ThreadCheckpoint]
) -
metadata
(Optional[Dict[str, Any]]
) -
values
(Optional[Dict[str, Any]]
) -
messages
(Optional[List[Message]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_patch.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
checkpoint = None
pydantic-field
The identifier of the checkpoint to branch from. Ignored for metadata-only patches. If not provided, defaults to the latest checkpoint.
messages = None
pydantic-field
The current Messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages.
metadata = None
pydantic-field
Metadata to merge with existing thread metadata.
values = None
pydantic-field
The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.
from_dict(obj)
classmethod
Create an instance of ThreadPatch from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_patch.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
from_json(json_str)
classmethod
Create an instance of ThreadPatch from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_patch.py
55 56 57 58 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_patch.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_patch.py
50 51 52 53 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_patch.py
46 47 48 |
|
ThreadSearchRequest
Bases: BaseModel
Payload for listing threads.
Show JSON schema:
{
"$defs": {
"ThreadStatus": {
"description": "ThreadStatus",
"enum": [
"idle",
"busy",
"interrupted",
"error"
],
"title": "ThreadStatus",
"type": "string"
}
},
"description": "Payload for listing threads.",
"properties": {
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Matches all threads for which metadata has keys and values equal to those specified in this object.",
"title": "Metadata"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "State values to filter on.",
"title": "Values"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/ThreadStatus"
},
{
"type": "null"
}
],
"default": null
},
"limit": {
"anyOf": [
{
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": 10,
"description": "Maximum number to return.",
"title": "Limit"
},
"offset": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": 0,
"description": "Offset to start from.",
"title": "Offset"
}
},
"title": "ThreadSearchRequest",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
metadata
(Optional[Dict[str, Any]]
) -
values
(Optional[Dict[str, Any]]
) -
status
(Optional[ThreadStatus]
) -
limit
(Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]]
) -
offset
(Optional[Annotated[int, Field(strict=True, ge=0)]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_search_request.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
limit = 10
pydantic-field
Maximum number to return.
metadata = None
pydantic-field
Matches all threads for which metadata has keys and values equal to those specified in this object.
offset = 0
pydantic-field
Offset to start from.
values = None
pydantic-field
State values to filter on.
from_dict(obj)
classmethod
Create an instance of ThreadSearchRequest from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_search_request.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
from_json(json_str)
classmethod
Create an instance of ThreadSearchRequest from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_search_request.py
56 57 58 59 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_search_request.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_search_request.py
51 52 53 54 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_search_request.py
47 48 49 |
|
ThreadState
Bases: BaseModel
ThreadState
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"ThreadCheckpoint": {
"description": "Structured identifier for a thread checkpoint, ie. an entry in the thread's history.",
"properties": {
"checkpoint_id": {
"description": "The ID of the checkpoint.",
"title": "Checkpoint Id",
"type": "string"
}
},
"required": [
"checkpoint_id"
],
"title": "ThreadCheckpoint",
"type": "object"
}
},
"description": "ThreadState",
"properties": {
"checkpoint": {
"$ref": "#/$defs/ThreadCheckpoint",
"description": "The identifier for this checkpoint."
},
"values": {
"additionalProperties": true,
"description": "The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.",
"title": "Values",
"type": "object"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The current messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages.",
"title": "Messages"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The checkpoint metadata.",
"title": "Metadata"
}
},
"required": [
"checkpoint",
"values"
],
"title": "ThreadState",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
checkpoint
(ThreadCheckpoint
) -
values
(Dict[str, Any]
) -
messages
(Optional[List[Message]]
) -
metadata
(Optional[Dict[str, Any]]
)
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_state.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
checkpoint
pydantic-field
The identifier for this checkpoint.
messages = None
pydantic-field
The current messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages.
metadata = None
pydantic-field
The checkpoint metadata.
values
pydantic-field
The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.
from_dict(obj)
classmethod
Create an instance of ThreadState from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_state.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
from_json(json_str)
classmethod
Create an instance of ThreadState from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_state.py
55 56 57 58 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_state.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_state.py
50 51 52 53 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_state.py
46 47 48 |
|
ThreadStatus
Bases: str
, Enum
ThreadStatus
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_status.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
from_json(json_str)
classmethod
Create an instance of ThreadStatus from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/thread_status.py
36 37 38 39 |
|
ValueRunResultUpdate
Bases: BaseModel
Partial result provided as value through streaming.
Show JSON schema:
{
"$defs": {
"Content": {
"description": "The content of the message.",
"properties": {
"oneof_schema_1_validator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 1 Validator"
},
"oneof_schema_2_validator": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Oneof Schema 2 Validator"
},
"actual_instance": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ContentOneOfInner"
},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual Instance"
},
"one_of_schemas": {
"default": [
"List[ContentOneOfInner]",
"str"
],
"items": {
"type": "string"
},
"title": "One Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "Content",
"type": "object"
},
"ContentOneOfInner": {
"description": "ContentOneOfInner",
"properties": {
"anyof_schema_1_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageTextBlock"
},
{
"type": "null"
}
],
"default": null
},
"anyof_schema_2_validator": {
"anyOf": [
{
"$ref": "#/$defs/MessageAnyBlock"
},
{
"type": "null"
}
],
"default": null
},
"actual_instance": {
"default": null,
"title": "Actual Instance"
},
"any_of_schemas": {
"default": [
"MessageTextBlock",
"MessageAnyBlock"
],
"items": {
"type": "string"
},
"title": "Any Of Schemas",
"type": "array",
"uniqueItems": true
}
},
"title": "ContentOneOfInner",
"type": "object"
},
"Message": {
"description": "Message",
"properties": {
"role": {
"description": "The role of the message.",
"title": "Role",
"type": "string"
},
"content": {
"$ref": "#/$defs/Content"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the message.",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The metadata of the message.",
"title": "Metadata"
}
},
"required": [
"role",
"content"
],
"title": "Message",
"type": "object"
},
"MessageAnyBlock": {
"description": "MessageAnyBlock",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"type"
],
"title": "MessageAnyBlock",
"type": "object"
},
"MessageTextBlock": {
"description": "MessageTextBlock",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "Type"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"text",
"type"
],
"title": "MessageTextBlock",
"type": "object"
},
"RunStatus": {
"description": "RunStatus",
"enum": [
"pending",
"error",
"success",
"timeout",
"interrupted"
],
"title": "RunStatus",
"type": "string"
}
},
"description": "Partial result provided as value through streaming.",
"properties": {
"type": {
"title": "Type",
"type": "string"
},
"run_id": {
"description": "The ID of the run.",
"title": "Run Id",
"type": "string"
},
"status": {
"$ref": "#/$defs/RunStatus",
"description": "Status of the Run when this result was generated. This is particurarly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result."
},
"values": {
"additionalProperties": true,
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
"title": "Values",
"type": "object"
},
"messages": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Message"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Stream of messages returned by the run.",
"title": "Messages"
}
},
"required": [
"type",
"run_id",
"status",
"values"
],
"title": "ValueRunResultUpdate",
"type": "object"
}
Config:
populate_by_name
:True
validate_assignment
:True
protected_namespaces
:()
Fields:
-
type
(StrictStr
) -
run_id
(StrictStr
) -
status
(RunStatus
) -
values
(Dict[str, Any]
) -
messages
(Optional[List[Message]]
)
Validators:
-
type_validate_enum
→type
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
messages = None
pydantic-field
Stream of messages returned by the run.
run_id
pydantic-field
The ID of the run.
status
pydantic-field
Status of the Run when this result was generated. This is particurarly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result.
values
pydantic-field
The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.
from_dict(obj)
classmethod
Create an instance of ValueRunResultUpdate from a dict
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
from_json(json_str)
classmethod
Create an instance of ValueRunResultUpdate from a JSON string
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
63 64 65 66 |
|
to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True)
:
None
is only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNone
are ignored.
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
to_json()
Returns the JSON representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
58 59 60 61 |
|
to_str()
Returns the string representation of the model using alias
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
54 55 56 |
|
type_validate_enum(value)
pydantic-validator
Validates the enum
Source code in .venv/lib/python3.13/site-packages/agntcy_acp/acp_v0/models/value_run_result_update.py
40 41 42 43 44 45 |
|