ant_ai.core.events
EventSource
EventSource = Literal['agent', 'action', 'workflow']
Sources where events are generated during a run.
EventOrigin
pydantic-model
Bases: BaseModel
Describes the origin of an event, used for tracing back to the source of an event in the system.
Show JSON schema:
{
"$defs": {
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
}
Fields:
-
layer(EventSource) -
node(str | None) -
run_step(int)
Source code in src/ant_ai/core/events.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
layer
pydantic-field
layer: EventSource = 'agent'
The layer that emitted the event: agent, action, or workflow.
node
pydantic-field
node: str | None = None
Name of the workflow node where the event originated.
run_step
pydantic-field
run_step: int = 0
Step index within the current run.
Event
pydantic-model
Bases: BaseModel
Represents an event emitted during the execution of a workflow, action, or agent.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Represents an event emitted during the execution of a workflow, action, or agent.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "event",
"default": "event",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "Event",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
kind(Literal['event']) -
task_id(str | None) -
session_id(str | None)
Source code in src/ant_ai/core/events.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 | |
origin
pydantic-field
origin: EventOrigin
Tracing information identifying where in the system the event was emitted.
content
pydantic-field
content: str = ''
Textual description of the event.
metadata
pydantic-field
metadata: dict[str, Any]
Additional information relevant to the event.
task_id
pydantic-field
task_id: str | None = None
A2A task ID populated from the raw transport event.
session_id
pydantic-field
session_id: str | None = None
A2A context/session ID populated from the raw transport event.
AgentEvent
pydantic-model
Bases: Event
Base class for events emitted by the agent layer.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Base class for events emitted by the agent layer.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "event",
"default": "event",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "AgentEvent",
"type": "object"
}
Fields:
-
content(str) -
metadata(dict[str, Any]) -
kind(Literal['event']) -
task_id(str | None) -
session_id(str | None) -
origin(EventOrigin)
Source code in src/ant_ai/core/events.py
56 57 58 59 60 61 62 | |
origin
pydantic-field
origin: EventOrigin
Tracing information identifying where in the system the event was emitted.
ActionEvent
pydantic-model
Bases: Event
Base class for events emitted by the action layer.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Base class for events emitted by the action layer.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "event",
"default": "event",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "ActionEvent",
"type": "object"
}
Fields:
-
content(str) -
metadata(dict[str, Any]) -
kind(Literal['event']) -
task_id(str | None) -
session_id(str | None) -
origin(EventOrigin)
Source code in src/ant_ai/core/events.py
65 66 67 68 69 70 71 | |
origin
pydantic-field
origin: EventOrigin
Tracing information identifying where in the system the event was emitted.
WorkflowEvent
pydantic-model
Bases: Event
Base class for events emitted by the workflow layer.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Base class for events emitted by the workflow layer.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "event",
"default": "event",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "WorkflowEvent",
"type": "object"
}
Fields:
-
content(str) -
metadata(dict[str, Any]) -
kind(Literal['event']) -
task_id(str | None) -
session_id(str | None) -
origin(EventOrigin)
Source code in src/ant_ai/core/events.py
74 75 76 77 78 79 80 | |
origin
pydantic-field
origin: EventOrigin
Tracing information identifying where in the system the event was emitted.
StartEvent
pydantic-model
Bases: WorkflowEvent
Emitted when a workflow begins execution.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when a workflow begins execution.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "start",
"default": "start",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "StartEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['start'])
Source code in src/ant_ai/core/events.py
83 84 85 86 | |
FinalAnswerEvent
pydantic-model
Bases: AgentEvent
Emitted when the agent produces its final answer.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when the agent produces its final answer.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "final_answer",
"default": "final_answer",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "FinalAnswerEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['final_answer'])
Source code in src/ant_ai/core/events.py
89 90 91 92 | |
MaxStepsReachedEvent
pydantic-model
Bases: AgentEvent
Emitted when the agent exhausts its maximum allowed steps.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when the agent exhausts its maximum allowed steps.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "max_steps_reached",
"default": "max_steps_reached",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "MaxStepsReachedEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['max_steps_reached'])
Source code in src/ant_ai/core/events.py
95 96 97 98 | |
ClarificationNeededEvent
pydantic-model
Bases: AgentEvent
Emitted when the agent requires human input to continue.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when the agent requires human input to continue.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "input_required",
"default": "input_required",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "ClarificationNeededEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['input_required'])
Source code in src/ant_ai/core/events.py
101 102 103 104 | |
UpdateEvent
pydantic-model
Bases: WorkflowEvent
Emitted for intermediate status updates during execution.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted for intermediate status updates during execution.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "update",
"default": "update",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "UpdateEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['update'])
Source code in src/ant_ai/core/events.py
107 108 109 110 | |
ToolCallingEvent
pydantic-model
Bases: AgentEvent
Emitted when the agent decides to call one or more tools.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
},
"ToolCall": {
"description": "Single tool call object inside assistant.tool_calls (OpenAI schema).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"type": {
"default": "function",
"title": "Type",
"type": "string"
},
"function": {
"$ref": "#/$defs/ToolFunction"
}
},
"required": [
"id",
"function"
],
"title": "ToolCall",
"type": "object"
},
"ToolFunction": {
"description": "Inner function payload for a tool call (OpenAI schema).",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"arguments": {
"title": "Arguments",
"type": "string"
}
},
"required": [
"name",
"arguments"
],
"title": "ToolFunction",
"type": "object"
}
},
"description": "Emitted when the agent decides to call one or more tools.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "tool_calling",
"default": "tool_calling",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
},
"tool_calls": {
"default": [],
"description": "The tool calls requested by the model.",
"items": {
"$ref": "#/$defs/ToolCall"
},
"title": "Tool Calls",
"type": "array"
}
},
"title": "ToolCallingEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['tool_calling']) -
tool_calls(tuple[ToolCall, ...])
Source code in src/ant_ai/core/events.py
113 114 115 116 117 118 119 120 | |
tool_calls
pydantic-field
tool_calls: tuple[ToolCall, ...] = ()
The tool calls requested by the model.
ToolResultEvent
pydantic-model
Bases: AgentEvent
Emitted when a tool call completes and its result is available.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when a tool call completes and its result is available.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "tool_result",
"default": "tool_result",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
},
"tool_call_id": {
"default": "",
"description": "ID of the tool call this result corresponds to.",
"title": "Tool Call Id",
"type": "string"
},
"name": {
"default": "",
"description": "Name of the tool that was called.",
"title": "Name",
"type": "string"
}
},
"title": "ToolResultEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['tool_result']) -
tool_call_id(str) -
name(str)
Source code in src/ant_ai/core/events.py
123 124 125 126 127 128 129 130 131 132 133 134 | |
tool_call_id
pydantic-field
tool_call_id: str = ''
ID of the tool call this result corresponds to.
name
pydantic-field
name: str = ''
Name of the tool that was called.
ReasoningEvent
pydantic-model
Bases: AgentEvent
Emitted when the model produces reasoning/thinking content before its answer.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when the model produces reasoning/thinking content before its answer.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "reasoning",
"default": "reasoning",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "ReasoningEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['reasoning'])
Source code in src/ant_ai/core/events.py
137 138 139 140 | |
CompletedEvent
pydantic-model
Bases: WorkflowEvent
Emitted when a workflow completes successfully.
Show JSON schema:
{
"$defs": {
"EventOrigin": {
"description": "Describes the origin of an event, used for tracing back to the source of an event in the system.",
"properties": {
"layer": {
"$ref": "#/$defs/EventSource",
"default": "agent",
"description": "The layer that emitted the event: agent, action, or workflow."
},
"node": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the workflow node where the event originated.",
"title": "Node"
},
"run_step": {
"default": 0,
"description": "Step index within the current run.",
"title": "Run Step",
"type": "integer"
}
},
"title": "EventOrigin",
"type": "object"
},
"EventSource": {
"enum": [
"agent",
"action",
"workflow"
],
"type": "string"
}
},
"description": "Emitted when a workflow completes successfully.",
"properties": {
"origin": {
"$ref": "#/$defs/EventOrigin",
"description": "Tracing information identifying where in the system the event was emitted."
},
"content": {
"default": "",
"description": "Textual description of the event.",
"title": "Content",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Additional information relevant to the event.",
"title": "Metadata",
"type": "object"
},
"kind": {
"const": "completed",
"default": "completed",
"title": "Kind",
"type": "string"
},
"task_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A task ID populated from the raw transport event.",
"title": "Task Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A2A context/session ID populated from the raw transport event.",
"title": "Session Id"
}
},
"title": "CompletedEvent",
"type": "object"
}
Fields:
-
origin(EventOrigin) -
content(str) -
metadata(dict[str, Any]) -
task_id(str | None) -
session_id(str | None) -
kind(Literal['completed'])
Source code in src/ant_ai/core/events.py
143 144 145 146 | |