prefactor_http.models.agent_instance module
prefactor_http.models.agent_instance module
Section titled “prefactor_http.models.agent_instance module”AgentInstance data models.
class prefactor_http.models.agent_instance.AgentInstance(, type: Literal[‘agent_instance’], id: str, account_id: str, agent_id: str, agent_version_id: str, environment_id: str, status: Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’], inserted_at: datetime, updated_at: datetime, started_at: datetime | None = None, finished_at: datetime | None = None, span_counts: AgentInstanceSpanCounts | None = None)
Section titled “class prefactor_http.models.agent_instance.AgentInstance(, type: Literal[‘agent_instance’], id: str, account_id: str, agent_id: str, agent_version_id: str, environment_id: str, status: Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’], inserted_at: datetime, updated_at: datetime, started_at: datetime | None = None, finished_at: datetime | None = None, span_counts: AgentInstanceSpanCounts | None = None)”Bases: BaseModel
Agent instance model.
Resource type (always “agent_instance”)
- Type: Literal[‘agent_instance’]
Instance ID
- Type: str
account_id
Section titled “account_id”Account ID
- Type: str
agent_id
Section titled “agent_id”Agent ID
- Type: str
agent_version_id
Section titled “agent_version_id”Agent version ID
- Type: str
environment_id
Section titled “environment_id”Environment ID
- Type: str
status
Section titled “status”Instance status
- Type: Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]
inserted_at
Section titled “inserted_at”When the instance was created
- Type: datetime.datetime
updated_at
Section titled “updated_at”When the instance was last updated
- Type: datetime.datetime
started_at
Section titled “started_at”When the instance started (null if not started)
- Type: datetime.datetime | None
finished_at
Section titled “finished_at”When the instance finished (null if not finished)
- Type: datetime.datetime | None
span_counts
Section titled “span_counts”Span counts for this instance
account_id : str
Section titled “account_id : str”agent_id : str
Section titled “agent_id : str”agent_version_id : str
Section titled “agent_version_id : str”environment_id : str
Section titled “environment_id : str”finished_at : datetime | None
Section titled “finished_at : datetime | None”id : str
Section titled “id : str”inserted_at : datetime
Section titled “inserted_at : datetime”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
span_counts : AgentInstanceSpanCounts | None
Section titled “span_counts : AgentInstanceSpanCounts | 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’]”type : Literal[‘agent_instance’]
Section titled “type : Literal[‘agent_instance’]”updated_at : datetime
Section titled “updated_at : datetime”class prefactor_http.models.agent_instance.AgentInstanceSpanCounts(, total: int, pending: int, active: int, complete: int, failed: int, cancelled: int, finished: int)
Section titled “class prefactor_http.models.agent_instance.AgentInstanceSpanCounts(, total: int, pending: int, active: int, complete: int, failed: int, cancelled: int, finished: int)”Bases: BaseModel
Span counts for an agent instance.
Total number of spans
- Type: int
pending
Section titled “pending”Number of pending spans
- Type: int
active
Section titled “active”Number of active spans
- Type: int
complete
Section titled “complete”Number of completed spans
- Type: int
failed
Section titled “failed”Number of failed spans
- Type: int
cancelled
Section titled “cancelled”Number of cancelled spans
- Type: int
finished
Section titled “finished”Number of finished spans (complete + failed + cancelled)
- Type: int
active : int
Section titled “active : int”cancelled : int
Section titled “cancelled : int”complete : int
Section titled “complete : int”failed : int
Section titled “failed : int”finished : int
Section titled “finished : int”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
pending : int
Section titled “pending : int”total : int
Section titled “total : int”class prefactor_http.models.agent_instance.AgentSchemaVersionForRegister(, external_identifier: str | None = None, span_schemas: dict[str, dict] | None = None, span_result_schemas: dict[str, dict] | None = None, span_type_schemas: list[SpanTypeSchemaForCreate] | None = None)
Section titled “class prefactor_http.models.agent_instance.AgentSchemaVersionForRegister(, external_identifier: str | None = None, span_schemas: dict[str, dict] | None = None, span_result_schemas: dict[str, dict] | None = None, span_type_schemas: list[SpanTypeSchemaForCreate] | None = None)”Bases: BaseModel
Schema version information for registration.
external_identifier
Section titled “external_identifier”External identifier for the schema version
- Type: str | None
span_schemas
Section titled “span_schemas”Map of span type names to JSON schemas
- Type: dict[str, dict] | None
span_result_schemas
Section titled “span_result_schemas”Map of span type names to result JSON schemas
- Type: dict[str, dict] | None
span_type_schemas
Section titled “span_type_schemas”List of span type schema details
- Type: list[prefactor_http.models.agent_instance.SpanTypeSchemaForCreate] | None
external_identifier : str | None
Section titled “external_identifier : str | None”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
span_result_schemas : dict[str, dict] | None
Section titled “span_result_schemas : dict[str, dict] | None”span_schemas : dict[str, dict] | None
Section titled “span_schemas : dict[str, dict] | None”span_type_schemas : list[SpanTypeSchemaForCreate] | None
Section titled “span_type_schemas : list[SpanTypeSchemaForCreate] | None”class prefactor_http.models.agent_instance.AgentVersionForRegister(, name: str | None = None, external_identifier: str | None = None, description: str | None = None)
Section titled “class prefactor_http.models.agent_instance.AgentVersionForRegister(, name: str | None = None, external_identifier: str | None = None, description: str | None = None)”Bases: BaseModel
Agent version information for registration.
Name of the agent version
- Type: str | None
external_identifier
Section titled “external_identifier”External identifier for the version (e.g., “v1.0.0”)
- Type: str | None
description
Section titled “description”Optional description of the version
- Type: str | None
description : str | None
Section titled “description : str | None”external_identifier : str | None
Section titled “external_identifier : str | None”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
name : str | None
Section titled “name : str | None”class prefactor_http.models.agent_instance.FinishInstanceRequest(, status: Literal[‘complete’, ‘failed’, ‘cancelled’] | None = None, timestamp: str | None = None, idempotency_key: str | None = None)
Section titled “class prefactor_http.models.agent_instance.FinishInstanceRequest(, status: Literal[‘complete’, ‘failed’, ‘cancelled’] | None = None, timestamp: str | None = None, idempotency_key: str | None = None)”Bases: BaseModel
Request to finish an agent instance.
status
Section titled “status”Optional finish status (complete, failed, cancelled)
- Type: Literal[‘complete’, ‘failed’, ‘cancelled’] | 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].
status : Literal[‘complete’, ‘failed’, ‘cancelled’] | None
Section titled “status : Literal[‘complete’, ‘failed’, ‘cancelled’] | None”timestamp : str | None
Section titled “timestamp : str | None”class prefactor_http.models.agent_instance.RegisterAgentInstanceRequest(, agent_id: str, agent_version: AgentVersionForRegister, agent_schema_version: AgentSchemaVersionForRegister, id: str | None = None, idempotency_key: str | None = None, update_current_version: bool | None = None)
Section titled “class prefactor_http.models.agent_instance.RegisterAgentInstanceRequest(, agent_id: str, agent_version: AgentVersionForRegister, agent_schema_version: AgentSchemaVersionForRegister, id: str | None = None, idempotency_key: str | None = None, update_current_version: bool | None = None)”Bases: BaseModel
Request to register a new agent instance.
agent_id
Section titled “agent_id”ID of the agent to create an instance for
- Type: str
agent_version
Section titled “agent_version”Version information for the agent
agent_schema_version
Section titled “agent_schema_version”Schema version for the agent
Optional custom ID for the instance
- Type: str | None
idempotency_key
Section titled “idempotency_key”Optional idempotency key
- Type: str | None
update_current_version
Section titled “update_current_version”Whether to update the current version
- Type: bool | None
agent_id : str
Section titled “agent_id : str”agent_schema_version : AgentSchemaVersionForRegister
Section titled “agent_schema_version : AgentSchemaVersionForRegister”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].
update_current_version : bool | None
Section titled “update_current_version : bool | None”class prefactor_http.models.agent_instance.SpanTypeSchemaForCreate(, name: str, params_schema: dict, result_schema: dict | None = None, title: str | None = None, description: str | None = None, template: str | None = None)
Section titled “class prefactor_http.models.agent_instance.SpanTypeSchemaForCreate(, name: str, params_schema: dict, result_schema: dict | None = None, title: str | None = None, description: str | None = None, template: str | None = None)”Bases: BaseModel
Span type schema details for registration.
Name of the span type
- Type: str
params_schema
Section titled “params_schema”JSON schema for span parameters
- Type: dict
result_schema
Section titled “result_schema”Optional JSON schema for span results
- Type: dict | None
Optional human-readable title
- Type: str | None
description
Section titled “description”Optional description
- Type: str | None
template
Section titled “template”Optional template string
- Type: str | None
description : str | None
Section titled “description : str | None”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
name : str
Section titled “name : str”params_schema : dict
Section titled “params_schema : dict”result_schema : dict | None
Section titled “result_schema : dict | None”template : str | None
Section titled “template : str | None”title : str | None
Section titled “title : str | None”class prefactor_http.models.agent_instance.TimestampRequest(, timestamp: str | None = None, idempotency_key: str | None = None)
Section titled “class prefactor_http.models.agent_instance.TimestampRequest(, timestamp: str | None = None, idempotency_key: str | None = None)”Bases: BaseModel
Request with optional timestamp for start/finish operations.
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].