Skip to content

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

  • Type: str

Agent ID

  • Type: str

Agent version ID

  • Type: str

Environment ID

  • Type: str

Instance status

  • Type: Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]

When the instance was created

  • Type: datetime.datetime

When the instance was last updated

  • Type: datetime.datetime

When the instance started (null if not started)

  • Type: datetime.datetime | None

When the instance finished (null if not finished)

  • Type: datetime.datetime | None

Span counts for this instance

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status : Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]

Section titled “status : Literal[‘pending’, ‘active’, ‘complete’, ‘failed’, ‘cancelled’]”

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

Number of pending spans

  • Type: int

Number of active spans

  • Type: int

Number of completed spans

  • Type: int

Number of failed spans

  • Type: int

Number of cancelled spans

  • Type: int

Number of finished spans (complete + failed + cancelled)

  • Type: int

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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 for the schema version

  • Type: str | None

Map of span type names to JSON schemas

  • Type: dict[str, dict] | None

Map of span type names to result JSON schemas

  • Type: dict[str, dict] | None

List of span type schema details

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”

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 for the version (e.g., “v1.0.0”)

  • Type: str | None

Optional description of the version

  • Type: str | None

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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.

Optional finish status (complete, failed, cancelled)

  • Type: Literal[‘complete’, ‘failed’, ‘cancelled’] | None

Optional ISO 8601 timestamp (defaults to current time)

  • Type: str | None

Optional idempotency key

  • Type: str | None

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”

Bases: BaseModel

Request to register a new agent instance.

ID of the agent to create an instance for

  • Type: str

Version information for the agent

Schema version for the agent

Optional custom ID for the instance

  • Type: str | None

Optional idempotency key

  • Type: str | None

Whether to update the current version

  • Type: bool | None

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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

JSON schema for span parameters

  • Type: dict

Optional JSON schema for span results

  • Type: dict | None

Optional human-readable title

  • Type: str | None

Optional description

  • Type: str | None

Optional template string

  • Type: str | None

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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.

Optional ISO 8601 timestamp (defaults to current time)

  • Type: str | None

Optional idempotency key

  • Type: str | None

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].