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
HTTP API
WebSocket API
Rate limits
Summary templates
Sensitive encoding
Stream agent instance updates
OpenAPI Spec
Overview
AgentSpan
Fetch agent span
GET
List agent spans
GET
Create a new agent span
POST
Finish an agent span
POST
Discard sensitive sidecar for an agent span
POST
Account
Implode (delete) the account you are authenticated as
POST
List accounts (internal)
GET
Fetch account
GET
Update an account
PUT
Playground
Create the first-account sample Support Chatbot agent
POST
Register a Northstar support sensitive playground agent instance with demo span schemas
POST
Register a customer support demo agent instance with support-copilot span schemas
POST
Register an OpenClaw demo agent instance with openclaw span schemas
POST
Record loan application review playground spans on an instance
POST
Record a canned OpenClaw conversation on an instance
POST
Create a customer support demo agent
POST
Create an OpenClaw demo agent
POST
Register a loan application review playground agent instance with demo span schemas
POST
Register an article summary quality playground agent instance with demo span and quality schemas
POST
Record a canned multi-span support conversation on an instance
POST
Create a loan application review playground agent
POST
Record article summary quality playground spans and set the instance quality payloads
POST
Record first-account sample spans for a playground scenario
POST
Create a Northstar support sensitive playground agent
POST
Create an article summary quality playground agent
POST
Register a first-account sample agent instance for a playground scenario
POST
Record Northstar support sensitive playground spans, quality payloads, and alerts on an instance
POST
Team
Get team details
GET
Update a team
PUT
Delete a team
DELETE
List teams
GET
Create a new team
POST
Person
List people
GET
Create a new person
POST
Get person details
GET
Update a person
PUT
Delete a person
DELETE
PFID
Generate new PFIDs with a partition matching the account
POST
AdminUserInvite
Revoke an admin user invite
POST
List admin user invites for an account
GET
Create a new admin user invite
POST
Fetch admin user invite details
GET
AgentInstance
Terminate an agent instance
POST
Start an agent instance
POST
Record a quality payload on an agent instance
POST
Finish an agent instance
POST
List agent instances
GET
Fetch agent instance
GET
Register a new agent instance with agent version
POST
Export agent instance context JSON
GET
Fetch agent instance 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
Alert
Count alerts
GET
List alerts
GET
Clear a raised alert on an agent instance
POST
Raise an alert on an agent instance
POST
Fetch alert
GET
Agent
Fetch agent
GET
Update an agent
PUT
Delete an agent
DELETE
Retire an agent
POST
Fetch agent by lookup
GET
Reinstate a retired agent
POST
List agents
GET
Create a new agent
POST
AgentVersion
List agent versions
GET
Create a new agent version
POST
Fetch agent version
GET
AgentSchemaVersion
Fetch agent schema version
GET
List agent schema versions
GET
Create a new agent schema version
POST
ApiToken
Suspend an API token
POST
Fetch API token
GET
Delete an API token
DELETE
List API tokens
GET
Create a new API token
POST
Activate a suspended API token
POST
Revoke an API token
POST
RiskProfile
List risk profiles
GET
Create a new risk profile
POST
Get risk profile template ruleset
GET
Get risk profile details
GET
Update a risk profile
PUT
Delete a risk profile
DELETE
Ping
Return minimal details for the current token
GET
Environment
Fetch environment by lookup
GET
Fetch environment
GET
Update an environment
PUT
Delete an environment
DELETE
List environments for an account
GET
Create a new environment
POST
Bulk
Execute multiple queries/actions in a single request
POST
AdminUser
Fetch admin user details
GET
Update an admin user (own profile only)
PUT
List admin users for an account
GET
SDKs
Introduction
Schemas and Return Schemas
Quality evaluations
Configuration and Environment Variables
Handle instance termination
Handle rate limiting
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: buildRuntimeEnvironment()
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: RuntimeEnvironment
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.runtime 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”
GET
/api/v1/agent_spans/{agent_span_id}
GET
/api/v1/agent_spans
POST
/api/v1/agent_spans
POST
/api/v1/agent_spans/{agent_span_id}/finish
POST
/api/v1/agent_spans/{agent_span_id}/discard_sensitive
POST
/api/v1/account/{account_id}/implode
GET
/api/v1/account
GET
/api/v1/account/{account_id}
PUT
/api/v1/account/{account_id}
POST
/api/v1/playground/create_first_account_agent
POST
/api/v1/playground/register_northstar_support_agent_instance
POST
/api/v1/playground/register_customer_support_agent_instance
POST
/api/v1/playground/register_openclaw_agent_instance
POST
/api/v1/playground/record_loan_application_review_spans
POST
/api/v1/playground/record_openclaw_spans
POST
/api/v1/playground/create_customer_support_agent
POST
/api/v1/playground/create_openclaw_agent
POST
/api/v1/playground/register_loan_application_review_agent_instance
POST
/api/v1/playground/register_quality_review_agent_instance
POST
/api/v1/playground/record_customer_support_spans
POST
/api/v1/playground/create_loan_application_review_agent
POST
/api/v1/playground/record_quality_review_spans
POST
/api/v1/playground/record_first_account_spans
POST
/api/v1/playground/create_northstar_support_agent
POST
/api/v1/playground/create_quality_review_agent
POST
/api/v1/playground/register_first_account_agent_instance
POST
/api/v1/playground/record_northstar_support_spans
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
GET
/api/v1/person
POST
/api/v1/person
GET
/api/v1/person/{person_id}
PUT
/api/v1/person/{person_id}
DELETE
/api/v1/person/{person_id}
POST
/api/v1/pfid/generate
POST
/api/v1/admin_user_invite/{admin_user_invite_id}/revoke
GET
/api/v1/admin_user_invite
POST
/api/v1/admin_user_invite
GET
/api/v1/admin_user_invite/{admin_user_invite_id}
POST
/api/v1/agent_instance/{agent_instance_id}/terminate
POST
/api/v1/agent_instance/{agent_instance_id}/start
POST
/api/v1/agent_instance/{agent_instance_id}/record_quality
POST
/api/v1/agent_instance/{agent_instance_id}/finish
GET
/api/v1/agent_instance
GET
/api/v1/agent_instance/{agent_instance_id}
POST
/api/v1/agent_instance/register
GET
/api/v1/agent_instance/{agent_instance_id}/agent_context
GET
/api/v1/agent_instance/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/alerts/count
GET
/api/v1/alerts
POST
/api/v1/alerts/clear
POST
/api/v1/alerts/raise
GET
/api/v1/alerts/{alert_id}
GET
/api/v1/agent/{agent_id}
PUT
/api/v1/agent/{agent_id}
DELETE
/api/v1/agent/{agent_id}
POST
/api/v1/agent/{agent_id}/retire
GET
/api/v1/agent/show
POST
/api/v1/agent/{agent_id}/reinstate
GET
/api/v1/agent
POST
/api/v1/agent
GET
/api/v1/agent_version
POST
/api/v1/agent_version
GET
/api/v1/agent_version/{agent_version_id}
GET
/api/v1/agent_schema_version/{agent_schema_version_id}
GET
/api/v1/agent_schema_version
POST
/api/v1/agent_schema_version
POST
/api/v1/api_token/{api_token_id}/suspend
GET
/api/v1/api_token/{api_token_id}
DELETE
/api/v1/api_token/{api_token_id}
GET
/api/v1/api_token
POST
/api/v1/api_token
POST
/api/v1/api_token/{api_token_id}/activate
POST
/api/v1/api_token/{api_token_id}/revoke
GET
/api/v1/risk_profile
POST
/api/v1/risk_profile
GET
/api/v1/risk_profile/template
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/ping
GET
/api/v1/environment/show
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
POST
/api/v1/bulk
GET
/api/v1/admin_user/{admin_user_id}
PUT
/api/v1/admin_user/{admin_user_id}
GET
/api/v1/admin_user
Authentication
Section titled “Authentication”
authorization
Section titled “authorization”
Security scheme type:
http