Skip to content

Fetch agent by lookup

GET
/api/v1/agent/show
curl --request GET \
--url 'https://app.prefactorai.com/api/v1/agent/show?agent_id=013xrzp12g3nqk8ns6jadrqmpgrjkeny&include_counts=false&include_risk_rollup=false' \
--header 'Authorization: Bearer <token>'
agent_id
Agent_Id

A valid agent ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny

Agent id. Provide exactly one of agent_id or external_identifier.

external_identifier

External identifier for this agent (exact match). Provide exactly one of agent_id or external_identifier.

string
idempotency_key
One of:

Optional idempotency key for ensuring request idempotency

string
environment_id
One of:
Environment_Id

A valid environment ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
include_counts

Include instance counts in the response

boolean
include_risk_rollup

Include risk rollup (theoretical and observed risk) in the response

boolean

Success

Media typeapplication/json
Agent_GetDetailsOutput
object
details
Agent_Details
object
available_actions
Agent_AvailableActions

Available actions for this agent based on its status and instance counts

object
delete

Whether the agent can be deleted

boolean
reinstate

Whether the agent can be reinstated from retired

boolean
retire

Whether the agent can be retired

boolean
update

Whether the agent can be updated

boolean
description
One of:

Agent description

string
external_identifier
One of:

External identifier for this agent in an external system (unique per account)

string
id
Agent_Id

A valid agent ID

string
inserted_at

When the agent was created

string format: date-time
instance_counts
Agent_InstanceCounts
object
active

Number of instances with status active (running)

integer
cancelled

Number of instances with status cancelled

integer
complete

Number of instances with status complete

integer
failed

Number of instances with status failed

integer
finished

Number of instances in a finished state (complete + failed + cancelled + terminated)

integer
pending

Number of instances with status pending

integer
terminated

Number of instances with status terminated

integer
total

Total number of agent instances

integer
last_activity_span_at
One of:
string format: date-time
name

Agent name

string
owner_person_id
One of:
Person_Id

A valid person ID

string
risk_profile_id
One of:
RiskProfile_Id

A valid risk profile ID

string
status

Agent status

string
Allowed values: pending active dormant retired
team_id
One of:
Team_Id

A valid team ID

string
type

Type of resource (always ‘agent’)

string
Allowed values: agent
updated_at

When the agent was last updated

string format: date-time
risk_rollup
One of:
Agent_RiskRollup
object
observed_risk
One of:
Agent_RiskSummary
object
all_data_categories

List of all data categories included across span types

Array<string>
<= 18 items
assessed_span_types

Number of span types with risk data

integer
classification_counts

Count of span types at each classification level

object
confidential
integer
internal
integer
public
integer
restricted
integer
secret
integer
unknown
integer
external_communication_count

Number of span types with external communication allowed

integer
highest_classification

Highest classification level across all span types

string
Allowed values: unknown public internal confidential restricted secret
total_span_types

Total number of span types

integer
unassessed_span_types

Number of span types without risk data

integer
theoretical_risk
One of:
Agent_RiskSummary
object
all_data_categories

List of all data categories included across span types

Array<string>
<= 18 items
assessed_span_types

Number of span types with risk data

integer
classification_counts

Count of span types at each classification level

object
confidential
integer
internal
integer
public
integer
restricted
integer
secret
integer
unknown
integer
external_communication_count

Number of span types with external communication allowed

integer
highest_classification

Highest classification level across all span types

string
Allowed values: unknown public internal confidential restricted secret
total_span_types

Total number of span types

integer
unassessed_span_types

Number of span types without risk data

integer
status
string
Allowed values: success
Example
{
"details": {
"description": "Agent description",
"external_identifier": "workflow-abc123",
"id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"inserted_at": "2024-01-01T00:00:00Z",
"instance_counts": {
"active": 2,
"cancelled": 0,
"complete": 5,
"failed": 0,
"finished": 5,
"pending": 0,
"terminated": 0,
"total": 10
},
"last_activity_span_at": "2024-01-01T00:00:00Z",
"name": "My Agent",
"owner_person_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"risk_profile_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"status": "pending",
"team_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"type": "agent",
"updated_at": "2024-01-01T00:00:00Z"
},
"risk_rollup": null,
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used
message
string
status
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}