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.ActionProfile(, create_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, read_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, update_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, destroy_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, financial_transactions: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, external_communication: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’)

Section titled “class prefactor_http.models.agent_instance.ActionProfile(, create_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, read_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, update_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, destroy_data: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, financial_transactions: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’, external_communication: Literal[‘unknown’, ‘allowed’, ‘disallowed’] = ‘unknown’)”

Bases: BaseModel

Action profile defining what actions a span type performs.

Whether this span creates data

  • Type: Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Whether this span reads data

  • Type: Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Whether this span updates data

  • Type: Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Whether this span destroys data

  • Type: Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Whether this span performs financial transactions

  • Type: Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Whether this span sends external communications

  • Type: Literal[‘unknown’, ‘allowed’, ‘disallowed’]

create_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Section titled “create_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]”

destroy_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Section titled “destroy_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]”

external_communication : Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Section titled “external_communication : Literal[‘unknown’, ‘allowed’, ‘disallowed’]”

financial_transactions : Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Section titled “financial_transactions : Literal[‘unknown’, ‘allowed’, ‘disallowed’]”

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

read_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Section titled “read_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]”

update_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]

Section titled “update_data : Literal[‘unknown’, ‘allowed’, ‘disallowed’]”

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: AgentStatus

When the instance was created

  • Type: datetime

When the instance was last updated

  • Type: datetime

When the instance started (null if not started)

  • Type: datetime | None

When the instance finished (null if not finished)

  • Type: datetime | None

Span counts for this instance

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

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.DataCategories(, personal_identifiers: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, contact_information: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, financial_information: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, health_and_medical: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, criminal_justice: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, authentication_and_secrets: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, organisational_confidential: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, minors_data: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, location_and_tracking: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, behavioural_and_inferred: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_racial_or_ethnic_origin: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_political_opinions: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_religious_or_philosophical_beliefs: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_trade_union_membership: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_genetic_data: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_biometric_for_identification: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_sex_life_or_sexual_orientation: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, classification: Literal[‘unknown’, ‘public’, ‘internal’, ‘confidential’, ‘restricted’, ‘secret’] = ‘unknown’)

Section titled “class prefactor_http.models.agent_instance.DataCategories(, personal_identifiers: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, contact_information: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, financial_information: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, health_and_medical: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, criminal_justice: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, authentication_and_secrets: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, organisational_confidential: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, minors_data: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, location_and_tracking: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, behavioural_and_inferred: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_racial_or_ethnic_origin: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_political_opinions: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_religious_or_philosophical_beliefs: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_trade_union_membership: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_genetic_data: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_biometric_for_identification: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, gdpr_sex_life_or_sexual_orientation: Literal[‘unknown’, ‘included’, ‘excluded’] = ‘unknown’, classification: Literal[‘unknown’, ‘public’, ‘internal’, ‘confidential’, ‘restricted’, ‘secret’] = ‘unknown’)”

Bases: BaseModel

Data categories present in span data.

Personal identifiers present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Contact information present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Financial information present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Health and medical data present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Criminal justice data present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Authentication and secrets present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Organisational confidential data present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Minors data present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Location and tracking data present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Behavioural and inferred data present

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: racial or ethnic origin

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: political opinions

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: religious or philosophical beliefs

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: trade union membership

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: genetic data

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: biometric data for identification

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

GDPR: sex life or sexual orientation

  • Type: Literal[‘unknown’, ‘included’, ‘excluded’]

Classification level (unknown, public, internal, confidential, restricted, secret)

  • Type: Literal[‘unknown’, ‘public’, ‘internal’, ‘confidential’, ‘restricted’, ‘secret’]

authentication_and_secrets : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “authentication_and_secrets : Literal[‘unknown’, ‘included’, ‘excluded’]”

behavioural_and_inferred : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “behavioural_and_inferred : Literal[‘unknown’, ‘included’, ‘excluded’]”

classification : Literal[‘unknown’, ‘public’, ‘internal’, ‘confidential’, ‘restricted’, ‘secret’]

Section titled “classification : Literal[‘unknown’, ‘public’, ‘internal’, ‘confidential’, ‘restricted’, ‘secret’]”

contact_information : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “contact_information : Literal[‘unknown’, ‘included’, ‘excluded’]”

criminal_justice : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “criminal_justice : Literal[‘unknown’, ‘included’, ‘excluded’]”

financial_information : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “financial_information : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_biometric_for_identification : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_biometric_for_identification : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_genetic_data : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_genetic_data : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_political_opinions : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_political_opinions : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_racial_or_ethnic_origin : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_racial_or_ethnic_origin : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_religious_or_philosophical_beliefs : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_religious_or_philosophical_beliefs : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_sex_life_or_sexual_orientation : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_sex_life_or_sexual_orientation : Literal[‘unknown’, ‘included’, ‘excluded’]”

gdpr_trade_union_membership : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “gdpr_trade_union_membership : Literal[‘unknown’, ‘included’, ‘excluded’]”

health_and_medical : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “health_and_medical : Literal[‘unknown’, ‘included’, ‘excluded’]”

location_and_tracking : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “location_and_tracking : Literal[‘unknown’, ‘included’, ‘excluded’]”

minors_data : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “minors_data : Literal[‘unknown’, ‘included’, ‘excluded’]”

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

organisational_confidential : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “organisational_confidential : Literal[‘unknown’, ‘included’, ‘excluded’]”

personal_identifiers : Literal[‘unknown’, ‘included’, ‘excluded’]

Section titled “personal_identifiers : Literal[‘unknown’, ‘included’, ‘excluded’]”

Bases: BaseModel

Data risk specification for a span type.

Actions this span performs

Data categories present in params

Data categories present in result

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: FinishStatus | 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].

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, data_risk: DataRisk | 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, data_risk: DataRisk | 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

Optional data risk classification

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].