Skip to main content

SDK API

Arclasp deliberately exposes a small supported top-level API. The current arclasp.__all__ contains exactly 14 symbols.

Top-level supported API

The package contains additional adapter methods, models, and compatibility helpers. Do not describe the package’s larger callable inventory as the supported top-level public API.

arclasp.init()

Current call signature:

Active runtime configuration

Compatibility parameters

These accepted arguments should not be presented as the current backend-authoritative control surface: The current public SDK configuration model rejects unknown init() keywords.

arclasp.Chain

A Chain is the workflow-level governance context.
Use it as an async context manager:
or as a synchronous context manager in synchronous code.

Supported customer-usable Chain surface

record_agent_action()

The SDK sanitizes the payload and sends the governed event to the backend. Typical outcomes:
  • allow-style decision object returned;
  • approval required — SDK waits, then returns or raises;
  • deny — ActionDeniedError;
  • active kill switch — ArclaspKillSwitchError;
  • auto-pause — ChainAutoPausedError;
  • backend unavailable — BackendUnavailableError.
The returned decision object can include fields such as policy_decision, decision_reason, decision_source, policy_name, evaluation_mode, shadow_decision, estimated_cost_usd, and remediation context. The decision model itself should not be advertised as an extra top-level public symbol unless it is actually exported by arclasp.__all__.

Completion

Exiting the Chain context requests backend completion. If completion cannot be confirmed, the SDK can raise:
Do not assume a receipt exists when completion failed.

Verification helpers

Verification errors surface through:

Framework adapters

Framework-specific integration APIs live in their modules rather than the 14-symbol top-level list:
  • arclasp.langchain
  • arclasp.langgraph
  • arclasp.crewai
  • arclasp.mcp
See the framework pages for their supported integration patterns.