Skip to content
Prefactor Docs
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Quickstart
Prefactor platform
Introduction
The audit trail
Risk
Sensitive data
Quality and performance
Instrumentation strategy
Data model
Concepts
Account
Activity schema
Agent
Agent deployment
API token
Environment
Instance
Risk profile
Span
Admin UI
Introduction
Agents page
Agent page
About
Overview tab
Instances tab
Versions tab
Deployments tab
Activity schema tab
Quality tab
Agent instance page
About
Activity tab
Details tab
Risk tab
Quality tab
Risk page
Account page
About
Details tab
Team tab
Invites tab
API tokens tab
Environments tab
Admin CLI
Introduction
Getting started
Configuration
Agent skills
API
Introduction
OpenAPI Spec
Overview
AgentInstance
Terminate an agent instance
POST
Register a new agent instance with agent version
POST
Start an agent instance
POST
Record a quality payload on an agent instance
POST
Fetch agent instance
GET
Finish an agent instance
POST
List agent instances
GET
Export agent instance context JSON
GET
Alert
Raise an alert on an agent instance
POST
List alerts
GET
Clear a raised alert on an agent instance
POST
Count alerts
GET
Fetch alert
GET
PFID
Generate new PFIDs with a partition matching the account
POST
Agent
List agents
GET
Create a new agent
POST
Retire an agent
POST
Reinstate a retired agent
POST
Fetch agent
GET
Update an agent
PUT
Delete an agent
DELETE
Fetch agent by lookup
GET
AgentDeployment
List agent deployments
GET
Create an agent deployment
POST
Fetch agent deployment
GET
Update an agent deployment
PUT
Delete an agent deployment
DELETE
AdminUser
Fetch admin user details
GET
Update an admin user (own profile only)
PUT
List admin users for an account
GET
Playground
Register an OpenClaw demo agent instance with openclaw span schemas
POST
Register a Northstar support sensitive playground agent instance with demo span schemas
POST
Create an OpenClaw demo agent
POST
Register a customer support demo agent instance with support-copilot span schemas
POST
Record a canned OpenClaw conversation on an instance
POST
Create a customer support demo agent
POST
Create an article summary quality playground agent
POST
Record a canned multi-span support conversation on an instance
POST
Record Northstar support sensitive playground spans, quality payloads, and alerts on an instance
POST
Record loan application review playground spans on an instance
POST
Register an article summary quality playground agent instance with demo span and quality schemas
POST
Record article summary quality playground spans and set the instance quality payloads
POST
Register a loan application review playground agent instance with demo span schemas
POST
Create a Northstar support sensitive playground agent
POST
Create a loan application review playground agent
POST
AgentVersion
Fetch agent version
GET
List agent versions
GET
Create a new agent version
POST
AdminUserInvite
Revoke an admin user invite
POST
Fetch admin user invite details
GET
List admin user invites for an account
GET
Create a new admin user invite
POST
Ping
Return minimal details for the current token
GET
ApiToken
Revoke an API token
POST
Fetch API token
GET
Delete an API token
DELETE
Suspend an API token
POST
List API tokens
GET
Create a new API token
POST
Activate a suspended API token
POST
Account
Fetch account
GET
Update an account
PUT
List accounts (internal)
GET
Implode (delete) the account you are authenticated as
POST
AgentSchemaVersion
List agent schema versions
GET
Create a new agent schema version
POST
Fetch agent schema version
GET
RiskProfile
Get risk profile details
GET
Update a risk profile
PUT
Delete a risk profile
DELETE
List risk profiles
GET
Create a new risk profile
POST
Get risk profile template ruleset
GET
Person
Get person details
GET
Update a person
PUT
Delete a person
DELETE
List people
GET
Create a new person
POST
Bulk
Execute multiple queries/actions in a single request
POST
AgentSpan
Finish an agent span
POST
List agent spans
GET
Create a new agent span
POST
Fetch agent span
GET
Discard sensitive sidecar for an agent span
POST
Environment
Fetch environment
GET
Update an environment
PUT
Delete an environment
DELETE
List environments for an account
GET
Create a new environment
POST
Team
Get team details
GET
Update a team
PUT
Delete a team
DELETE
List teams
GET
Create a new team
POST
SDKs
Introduction
Schemas and Return Schemas
Quality evaluations
Configuration and Environment Variables
TypeScript SDK
Introduction
Getting started
API modules
Core
@prefactor/core
classes
Class: AgentInstanceClient
Class: AgentInstanceManager
Class: AgentSpanClient
Class: HttpClient
Class: HttpClientError
Class: HttpTransport
Class: PrefactorClient\<TMiddleware\>
Class: PrefactorFatalError
Class: PrefactorShutdownError
Class: SpanContext
Class: TerminationMonitor
Class: Tracer
enumerations
Enumeration: SpanStatus
functions
Function: configureLogging()
Function: createConfig()
Function: createCore()
Function: createSpanTypePrefixer()
Function: getClient()
Function: getLogger()
Function: init()
Function: normalizeAgentToolSchemas()
Function: registerShutdownHandler()
Function: resolveMappedSpanType()
Function: serializeValue()
Function: shutdown()
Function: truncateString()
Function: withSpan()
interfaces
Interface: ActionProfile
Interface: AgentSchemaVersion
Interface: DataCategories
Interface: DataRisk
Interface: EndSpanOptions
Interface: ErrorInfo
Interface: FailureHandlingConfig
Interface: HttpRequester
Interface: ManualSpanOptions
Interface: PrefactorOptions\<TMiddleware\>
Interface: PrefactorProvider\<TMiddleware\>
Interface: QualitySchema
Interface: Span
Interface: SpanTypeSchema
Interface: StartSpanOptions
Interface: TokenUsage
Interface: ToolSchemaConfig
Interface: Transport
type-aliases
Type Alias: ActionProfileValue
Type Alias: AgentInstanceFinishOptions
Type Alias: AgentInstanceOptions
Type Alias: AgentInstanceRecordQualityPayload
Type Alias: AgentInstanceRegisterPayload
Type Alias: AgentInstanceResponse
Type Alias: AgentInstanceStartOptions
Type Alias: AgentSpanCreatePayload
Type Alias: AgentSpanFinishOptions
Type Alias: AgentSpanResponse
Type Alias: AgentSpanStatus
Type Alias: Config
Type Alias: CoreRuntime
Type Alias: CreateCoreOptions
Type Alias: DataCategoryValue
Type Alias: DataClassification
Type Alias: HttpTransportConfig
Type Alias: JsonSchema
Type Alias: MiddlewareLike
Type Alias: PartialHttpConfig
Type Alias: PrefactorFatalErrorKind
Type Alias: PrefactorShutdownDetails
Type Alias: PrefactorShutdownErrorKind
Type Alias: PrefactorTransportHealthState
Type Alias: PrefactorTransportOperation
Type Alias: SpanType
Type Alias: TerminationCallback()
variables
Variable: ConfigSchema
Variable: HttpTransportConfigSchema
Variable: PartialHttpConfigSchema
Variable: SpanType
Packages
LangChain
@prefactor/langchain
classes
Class: PrefactorLangChain
interfaces
Interface: PrefactorLangChainOptions
variables
Variable: DEFAULT\_LANGCHAIN\_AGENT\_SCHEMA
AI
@prefactor/ai
classes
Class: PrefactorAISDK
functions
Function: getTracer()
Function: init()
Function: withSpan()
interfaces
Interface: MiddlewareConfig
Interface: PrefactorAISDKOptions
type-aliases
Type Alias: ManualSpanOptions
variables
Variable: DEFAULT\_AI\_AGENT\_SCHEMA
Claude
@prefactor/claude
classes
Class: PrefactorClaude
interfaces
Interface: ClaudeMiddleware
Interface: PrefactorClaudeOptions
type-aliases
Type Alias: ClaudeQuery
variables
Variable: DEFAULT\_CLAUDE\_AGENT\_SCHEMA
Python SDK
Introduction
Getting started
Core
Prefactor Core
reference
prefactor_core
prefactor_core package
prefactor_core.client module
prefactor_core.config module
prefactor_core.context_stack module
prefactor_core.exceptions module
prefactor_core.managers package
prefactor_core.managers.agent_instance module
prefactor_core.managers.span module
prefactor_core.models module
prefactor_core.monitoring package
prefactor_core.monitoring.termination_monitor module
prefactor_core.operations module
prefactor_core.queue package
prefactor_core.queue.base module
prefactor_core.queue.executor module
prefactor_core.queue.memory module
prefactor_core.schema_registry module
prefactor_core.span_context module
prefactor_core.utils module
HTTP
Prefactor HTTP Client
reference
prefactor_http
prefactor_http package
prefactor_http.client module
prefactor_http.config module
prefactor_http.endpoints package
prefactor_http.endpoints.agent module
prefactor_http.endpoints.agent_instance module
prefactor_http.endpoints.agent_span module
prefactor_http.endpoints.bulk module
prefactor_http.exceptions module
prefactor_http.models package
prefactor_http.models.agent module
prefactor_http.models.agent_instance module
prefactor_http.models.agent_span module
prefactor_http.models.base module
prefactor_http.models.bulk module
prefactor_http.models.types module
prefactor_http.retry module
LangChain
prefactor-langchain
reference
prefactor_langchain
prefactor_langchain package
prefactor_langchain.metadata_extractor module
prefactor_langchain.middleware module
prefactor_langchain.schemas module
prefactor_langchain.spans module
LiveKit
prefactor-livekit
reference
prefactor_livekit
prefactor_livekit package
prefactor_livekit.schemas module
prefactor_livekit.session module
GitHub
Select theme
Dark
Light
Auto
Overview
Prefactor
1.0
Section titled “Prefactor 1.0”
Information
OpenAPI version:
3.0.0
Operations
Section titled “Operations”
POST
/api/v1/agent_instance/{agent_instance_id}/terminate
POST
/api/v1/agent_instance/register
POST
/api/v1/agent_instance/{agent_instance_id}/start
POST
/api/v1/agent_instance/{agent_instance_id}/record_quality
GET
/api/v1/agent_instance/{agent_instance_id}
POST
/api/v1/agent_instance/{agent_instance_id}/finish
GET
/api/v1/agent_instance
GET
/api/v1/agent_instance/{agent_instance_id}/agent_context
POST
/api/v1/alerts/raise
GET
/api/v1/alerts
POST
/api/v1/alerts/clear
GET
/api/v1/alerts/count
GET
/api/v1/alerts/{alert_id}
POST
/api/v1/pfid/generate
GET
/api/v1/agent
POST
/api/v1/agent
POST
/api/v1/agent/{agent_id}/retire
POST
/api/v1/agent/{agent_id}/reinstate
GET
/api/v1/agent/{agent_id}
PUT
/api/v1/agent/{agent_id}
DELETE
/api/v1/agent/{agent_id}
GET
/api/v1/agent/show
GET
/api/v1/agent_deployment
POST
/api/v1/agent_deployment
GET
/api/v1/agent_deployment/{agent_deployment_id}
PUT
/api/v1/agent_deployment/{agent_deployment_id}
DELETE
/api/v1/agent_deployment/{agent_deployment_id}
GET
/api/v1/admin_user/{admin_user_id}
PUT
/api/v1/admin_user/{admin_user_id}
GET
/api/v1/admin_user
POST
/api/v1/playground/register_openclaw_agent_instance
POST
/api/v1/playground/register_northstar_support_agent_instance
POST
/api/v1/playground/create_openclaw_agent
POST
/api/v1/playground/register_customer_support_agent_instance
POST
/api/v1/playground/record_openclaw_spans
POST
/api/v1/playground/create_customer_support_agent
POST
/api/v1/playground/create_quality_review_agent
POST
/api/v1/playground/record_customer_support_spans
POST
/api/v1/playground/record_northstar_support_spans
POST
/api/v1/playground/record_loan_application_review_spans
POST
/api/v1/playground/register_quality_review_agent_instance
POST
/api/v1/playground/record_quality_review_spans
POST
/api/v1/playground/register_loan_application_review_agent_instance
POST
/api/v1/playground/create_northstar_support_agent
POST
/api/v1/playground/create_loan_application_review_agent
GET
/api/v1/agent_version/{agent_version_id}
GET
/api/v1/agent_version
POST
/api/v1/agent_version
POST
/api/v1/admin_user_invite/{admin_user_invite_id}/revoke
GET
/api/v1/admin_user_invite/{admin_user_invite_id}
GET
/api/v1/admin_user_invite
POST
/api/v1/admin_user_invite
GET
/api/v1/ping
POST
/api/v1/api_token/{api_token_id}/revoke
GET
/api/v1/api_token/{api_token_id}
DELETE
/api/v1/api_token/{api_token_id}
POST
/api/v1/api_token/{api_token_id}/suspend
GET
/api/v1/api_token
POST
/api/v1/api_token
POST
/api/v1/api_token/{api_token_id}/activate
GET
/api/v1/account/{account_id}
PUT
/api/v1/account/{account_id}
GET
/api/v1/account
POST
/api/v1/account/{account_id}/implode
GET
/api/v1/agent_schema_version
POST
/api/v1/agent_schema_version
GET
/api/v1/agent_schema_version/{agent_schema_version_id}
GET
/api/v1/risk_profile/{risk_profile_id}
PUT
/api/v1/risk_profile/{risk_profile_id}
DELETE
/api/v1/risk_profile/{risk_profile_id}
GET
/api/v1/risk_profile
POST
/api/v1/risk_profile
GET
/api/v1/risk_profile/template
GET
/api/v1/person/{person_id}
PUT
/api/v1/person/{person_id}
DELETE
/api/v1/person/{person_id}
GET
/api/v1/person
POST
/api/v1/person
POST
/api/v1/bulk
POST
/api/v1/agent_spans/{agent_span_id}/finish
GET
/api/v1/agent_spans
POST
/api/v1/agent_spans
GET
/api/v1/agent_spans/{agent_span_id}
POST
/api/v1/agent_spans/{agent_span_id}/discard_sensitive
GET
/api/v1/environment/{environment_id}
PUT
/api/v1/environment/{environment_id}
DELETE
/api/v1/environment/{environment_id}
GET
/api/v1/environment
POST
/api/v1/environment
GET
/api/v1/team/{team_id}
PUT
/api/v1/team/{team_id}
DELETE
/api/v1/team/{team_id}
GET
/api/v1/team
POST
/api/v1/team
Authentication
Section titled “Authentication”
authorization
Section titled “authorization”
Security scheme type:
http