prefactor_http.models.agent_span module
prefactor_http.models.agent_span module
Section titled “prefactor_http.models.agent_span module”AgentSpan data models.
class prefactor_http.models.agent_span.AgentSpan(*, type: ~typing.Literal[‘agent_span’], id: str, account_id: str | None = None, agent_id: str | None = None, agent_instance_id: str, parent_span_id: str | None = None, schema_name: str, schema_title: str | None = None, status: ~typing.Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’], payload: dict = , result_payload: dict | None = None, summary: str | None = None, started_at: ~datetime.datetime | None = None, inserted_at: ~datetime.datetime | None = None, updated_at: ~datetime.datetime | None = None, finished_at: ~datetime.datetime | None = None)
Section titled “class prefactor_http.models.agent_span.AgentSpan(*, type: ~typing.Literal[‘agent_span’], id: str, account_id: str | None = None, agent_id: str | None = None, agent_instance_id: str, parent_span_id: str | None = None, schema_name: str, schema_title: str | None = None, status: ~typing.Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’], payload: dict = , result_payload: dict | None = None, summary: str | None = None, started_at: ~datetime.datetime | None = None, inserted_at: ~datetime.datetime | None = None, updated_at: ~datetime.datetime | None = None, finished_at: ~datetime.datetime | None = None)”Bases: BaseModel
Agent span model.
Resource type (always “agent_span”)
- Type: Literal[‘agent_span’]
Span ID
- Type: str
account_id
Section titled “account_id”Account ID
- Type: str | None
agent_id
Section titled “agent_id”Agent ID
- Type: str | None
agent_instance_id
Section titled “agent_instance_id”Agent instance ID
- Type: str
parent_span_id
Section titled “parent_span_id”Parent span ID (None if root span)
- Type: str | None
schema_name
Section titled “schema_name”Name of the schema for this span
- Type: str
schema_title
Section titled “schema_title”Title of the schema for this span
- Type: str | None
status
Section titled “status”Span status
- Type: Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]
payload
Section titled “payload”Span payload data
- Type: dict
result_payload
Section titled “result_payload”Result payload data
- Type: dict | None
summary
Section titled “summary”Optional span summary
- Type: str | None
started_at
Section titled “started_at”When the span started
- Type: datetime.datetime | None
inserted_at
Section titled “inserted_at”When the span was created
- Type: datetime.datetime | None
updated_at
Section titled “updated_at”When the span was last updated
- Type: datetime.datetime | None
finished_at
Section titled “finished_at”When the span finished (None if in progress)
- Type: datetime.datetime | None
account_id : str | None
Section titled “account_id : str | None”agent_id : str | None
Section titled “agent_id : str | None”agent_instance_id : str
Section titled “agent_instance_id : str”finished_at : datetime | None
Section titled “finished_at : datetime | None”id : str
Section titled “id : str”inserted_at : datetime | None
Section titled “inserted_at : datetime | None”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
parent_span_id : str | None
Section titled “parent_span_id : str | None”payload : dict
Section titled “payload : dict”result_payload : dict | None
Section titled “result_payload : dict | None”schema_name : str
Section titled “schema_name : str”schema_title : str | None
Section titled “schema_title : str | None”started_at : datetime | None
Section titled “started_at : datetime | None”status : Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]
Section titled “status : Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]”summary : str | None
Section titled “summary : str | None”type : Literal[‘agent_span’]
Section titled “type : Literal[‘agent_span’]”updated_at : datetime | None
Section titled “updated_at : datetime | None”class prefactor_http.models.agent_span.CreateAgentSpanRequest(*, agent_instance_id: str, schema_name: str, status: ~typing.Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’], payload: dict = , result_payload: dict | None = None, id: str | None = None, parent_span_id: str | None = None, started_at: str | None = None, finished_at: str | None = None, idempotency_key: str | None = None)
Section titled “class prefactor_http.models.agent_span.CreateAgentSpanRequest(*, agent_instance_id: str, schema_name: str, status: ~typing.Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’], payload: dict = , result_payload: dict | None = None, id: str | None = None, parent_span_id: str | None = None, started_at: str | None = None, finished_at: str | None = None, idempotency_key: str | None = None)”Bases: BaseModel
Request to create a new agent span.
agent_instance_id
Section titled “agent_instance_id”ID of the agent instance this span belongs to
- Type: str
schema_name
Section titled “schema_name”Name of the schema for this span
- Type: str
status
Section titled “status”Status for the span
- Type: Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]
payload
Section titled “payload”Span payload data (arbitrary JSON object)
- Type: dict
result_payload
Section titled “result_payload”Optional result payload data
- Type: dict | None
Optional custom ID for the span
- Type: str | None
parent_span_id
Section titled “parent_span_id”Optional ID of the parent span
- Type: str | None
started_at
Section titled “started_at”Optional ISO 8601 start time (defaults to current time)
- Type: str | None
finished_at
Section titled “finished_at”Optional ISO 8601 finish time (null if in progress)
- Type: str | None
idempotency_key
Section titled “idempotency_key”Optional idempotency key
- Type: str | None
agent_instance_id : str
Section titled “agent_instance_id : str”finished_at : str | None
Section titled “finished_at : str | None”id : str | None
Section titled “id : str | None”idempotency_key : str | None
Section titled “idempotency_key : str | None”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
parent_span_id : str | None
Section titled “parent_span_id : str | None”payload : dict
Section titled “payload : dict”result_payload : dict | None
Section titled “result_payload : dict | None”schema_name : str
Section titled “schema_name : str”started_at : str | None
Section titled “started_at : str | None”status : Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]
Section titled “status : Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]”class prefactor_http.models.agent_span.FinishSpanRequest(, status: Literal[‘complete’, ‘failed’, ‘cancelled’] | None = None, result_payload: dict | None = None, timestamp: str | None = None, idempotency_key: str | None = None)
Section titled “class prefactor_http.models.agent_span.FinishSpanRequest(, status: Literal[‘complete’, ‘failed’, ‘cancelled’] | None = None, result_payload: dict | None = None, timestamp: str | None = None, idempotency_key: str | None = None)”Bases: BaseModel
Request to finish an agent span.
status
Section titled “status”Optional finish status (complete, failed, cancelled)
- Type: Literal[‘complete’, ‘failed’, ‘cancelled’] | None
result_payload
Section titled “result_payload”Optional result payload data
- Type: dict | None
timestamp
Section titled “timestamp”Optional ISO 8601 timestamp (defaults to current time)
- Type: str | None
idempotency_key
Section titled “idempotency_key”Optional idempotency key
- Type: str | None
idempotency_key : str | None
Section titled “idempotency_key : str | None”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].