Skip to content

prefactor_http.models.agent module

Agent data models.

class prefactor_http.models.agent.Agent(, type: Literal[‘agent’], id: str, name: str, description: str | None = None, external_identifier: str | None = None, status: Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’], owner_person_id: str | None = None, risk_profile_id: str | None = None, team_id: str | None = None, instance_counts: AgentInstanceCounts | None = None, available_actions: AgentAvailableActions | None = None, inserted_at: datetime | None = None, updated_at: datetime | None = None)

Section titled “class prefactor_http.models.agent.Agent(, type: Literal[‘agent’], id: str, name: str, description: str | None = None, external_identifier: str | None = None, status: Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’], owner_person_id: str | None = None, risk_profile_id: str | None = None, team_id: str | None = None, instance_counts: AgentInstanceCounts | None = None, available_actions: AgentAvailableActions | None = None, inserted_at: datetime | None = None, updated_at: datetime | None = None)”

Bases: BaseModel

Full agent details.

Resource type (always “agent”).

  • Type: Literal[‘agent’]

Agent ID.

  • Type: str

Agent name.

  • Type: str

Optional agent description.

  • Type: str | None

Optional external identifier (unique per account).

  • Type: str | None

Agent status (pending, active, dormant, retired).

  • Type: Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’]

Optional owner person ID.

  • Type: str | None

Optional risk profile ID.

  • Type: str | None

Optional team ID.

  • Type: str | None

Instance counts for this agent.

Available actions based on current status.

When the agent was created.

  • Type: datetime | None

When the agent was last updated.

  • Type: datetime | None

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

status : Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’]

Section titled “status : Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’]”

class prefactor_http.models.agent.AgentAvailableActions(, update: bool = False, retire: bool = False, reinstate: bool = False, delete: bool = False)

Section titled “class prefactor_http.models.agent.AgentAvailableActions(, update: bool = False, retire: bool = False, reinstate: bool = False, delete: bool = False)”

Bases: BaseModel

Available actions for an agent based on its status.

Whether the agent can be updated.

  • Type: bool

Whether the agent can be retired.

  • Type: bool

Whether the agent can be reinstated from retired.

  • Type: bool

Whether the agent can be deleted.

  • Type: bool

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

class prefactor_http.models.agent.AgentForCreate(, name: str, description: str | None = None, external_identifier: str | None = None, id: str | None = None, owner_person_id: str | None = None, risk_profile_id: str | None = None, team_id: str | None = None)

Section titled “class prefactor_http.models.agent.AgentForCreate(, name: str, description: str | None = None, external_identifier: str | None = None, id: str | None = None, owner_person_id: str | None = None, risk_profile_id: str | None = None, team_id: str | None = None)”

Bases: BaseModel

Parameters for creating a new agent.

Agent name (required).

  • Type: str

Optional agent description.

  • Type: str | None

Optional external identifier (unique per account).

  • Type: str | None

Optional custom ID (PFID with matching partition).

  • Type: str | None

Optional owner person ID.

  • Type: str | None

Optional risk profile ID.

  • Type: str | None

Optional team ID.

  • Type: str | None

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

class prefactor_http.models.agent.AgentForUpdate(, name: str | None = None, description: str | None = None, owner_person_id: str | None = None, risk_profile_id: str | None = None, team_id: str | None = None)

Section titled “class prefactor_http.models.agent.AgentForUpdate(, name: str | None = None, description: str | None = None, owner_person_id: str | None = None, risk_profile_id: str | None = None, team_id: str | None = None)”

Bases: BaseModel

Parameters for updating an agent.

Note: external_identifier cannot be updated via the API — it is only settable at create time.

Agent name (omit to keep current).

  • Type: str | None

Agent description (omit to keep current).

  • Type: str | None

Owner person ID (omit to keep current; null to clear).

  • Type: str | None

Risk profile ID (omit to keep current; null to clear).

  • Type: str | None

Team ID (omit to keep current; null to clear).

  • Type: str | None

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

class prefactor_http.models.agent.AgentInstanceCounts(, total: int = 0, pending: int = 0, active: int = 0, complete: int = 0, failed: int = 0, cancelled: int = 0, terminated: int = 0, finished: int = 0)

Section titled “class prefactor_http.models.agent.AgentInstanceCounts(, total: int = 0, pending: int = 0, active: int = 0, complete: int = 0, failed: int = 0, cancelled: int = 0, terminated: int = 0, finished: int = 0)”

Bases: BaseModel

Instance counts for an agent.

Total number of agent instances.

  • Type: int

Number of instances with status pending.

  • Type: int

Number of instances with status active (running).

  • Type: int

Number of instances with status complete.

  • Type: int

Number of instances with status failed.

  • Type: int

Number of instances with status cancelled.

  • Type: int

Number of instances with status terminated.

  • Type: int

Number of instances in a finished state.

  • Type: int

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

class prefactor_http.models.agent.AgentSummary(, type: Literal[‘agent’], id: str, name: str, description: str | None = None, external_identifier: str | None = None, status: Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’], owner_person_id: str | None = None, team_id: str | None = None, available_actions: AgentAvailableActions | None = None, inserted_at: datetime | None = None, updated_at: datetime | None = None)

Section titled “class prefactor_http.models.agent.AgentSummary(, type: Literal[‘agent’], id: str, name: str, description: str | None = None, external_identifier: str | None = None, status: Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’], owner_person_id: str | None = None, team_id: str | None = None, available_actions: AgentAvailableActions | None = None, inserted_at: datetime | None = None, updated_at: datetime | None = None)”

Bases: BaseModel

Agent summary for list responses.

Resource type (always “agent”).

  • Type: Literal[‘agent’]

Agent ID.

  • Type: str

Agent name.

  • Type: str

Optional agent description.

  • Type: str | None

Optional external identifier (unique per account).

  • Type: str | None

Agent status.

  • Type: Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’]

Optional owner person ID.

  • Type: str | None

Optional team ID.

  • Type: str | None

Available actions based on current status.

When the agent was created.

  • Type: datetime | None

When the agent was last updated.

  • Type: datetime | None

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

status : Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’]

Section titled “status : Literal[‘pending’, ‘active’, ‘dormant’, ‘retired’]”