Skip to main content

Quickstart

This example shows the shortest end-to-end Arclasp flow:
  1. initialize the SDK;
  2. open a Chain;
  3. propose one governed action;
  4. resolve human approval in the dashboard;
  5. let your application execute its own action;
  6. complete the Chain;
  7. fetch the resulting Chain Record / receipt.

1. Install

2. Create an API key

Create an API key in the Arclasp dashboard and store it in your environment:

3. Run one governed action

Create first_governed_action.py:
Run it:
A fresh organization currently uses a default single-action financial approval threshold of $5,000. The example proposes $6,000, so the backend can return require_approval.

4. Resolve the approval

Leave the process running and open: https://app.arclasp.com/dashboard/approvals When the approval is resolved:
  • approval returns an allow-style decision and the SDK continues;
  • denial raises ActionDeniedError;
  • a local approval wait timeout can raise ChainTimeoutError.
The customer action in the example runs only after the governance call has returned successfully.

5. Completion and receipt

Exiting the Chain context asks the backend to complete the Chain. A valid completed Chain can produce a Chain Record / receipt. Completion is itself a backend operation. If completion cannot be confirmed, the SDK can raise ChainCompletionError; do not assume a receipt exists when completion failed.

What this example proves

The important boundary is:
Arclasp governs the instrumented action. It does not perform the transfer, email, database write, or other customer-side tool call itself.