Export agent instance context JSON
GET
/api/v1/agent_instance/{agent_instance_id}/agent_context
const url = 'https://app.prefactorai.com/api/v1/agent_instance/013xrzp12g3nqk8ns6jadrqmpgrjkeny/agent_context?include_risk_level=false';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.prefactorai.com/api/v1/agent_instance/013xrzp12g3nqk8ns6jadrqmpgrjkeny/agent_context?include_risk_level=false' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”agent_instance_id
required
AgentInstance_Id
A valid agent instance ID
string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyQuery Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Success
Media typeapplication/json
object
agent_context
AgentInstance_AgentContext
object
body
Minimal JSON context with agent_instance, agent, and spans
object
key
additional properties
any
generated_at
When this context was generated
string format: date-time
span_count
Number of spans on the main agent instance
integer
status
string
Example
{ "status": "success"}default
Section titled “default”Error