Skip to content

Agent Capabilities

The exact operations an agent uses against PacSpace — with endpoints, SDK equivalents, and deeper-reference links.

This page is the operations map for agentic systems. It groups every operation an agent is likely to call, points at the authoritative reference page for each, and flags the common failure modes that are easy to miss.

Use When

Use this page when an agent needs the right endpoint or SDK method quickly, or when reviewing an integration to confirm it is using the canonical entrypoint instead of stitching together private calls.

Inputs

  • A valid API key and the intended environment.
  • A customer record strategy — one record per counterparty, one per cost center, or one per service.
  • A deterministic referenceId strategy the agent can reproduce from its own state.

Core Writes

These four operations cover the full write surface most agents need.

OperationEndpointSDKReference
Emit one deltaPOST /api/v1/balance/deltapac.balance.emit(...)Emit
Emit a group of deltasPOST /api/v1/balance/delta/batchpac.balance.emitBatch(...)Emit
Wait for verificationPOST /api/v1/balance/delta + pollpac.balance.emitAndWait(...)SDK Reference
Lock a period or windowPOST /api/v1/balance/checkpointpac.balance.checkpoint(...)Checkpoint

Emit with a deterministic referenceId and an Idempotency-Key header. Use emitBatch when grouping deltas reduces call volume — for example, when collecting interval usage. Use emitAndWait only when the agent's next step depends on the delta being verified before moving on.

Core Reads

These are the reads an agent uses to confirm state, answer user questions, or build a dashboard.

OperationEndpointSDKReference
Derive a running balanceGET /api/v1/balance/derive/:customerIdpac.balance.derive(...)Query
Compare two balance viewsPOST /api/v1/balance/comparepac.balance.compare(...)Verify
Check delta statusGET /api/v1/balance/delta/:recordIdpac.balance.deltaStatus(...)Emit
Detect sequence gapsGET /api/v1/balance/gaps/:customerIdpac.balance.gaps(...)Emit
List checkpointsGET /api/v1/balance/checkpointspac.balance.listCheckpoints(...)Checkpoint

Derive is the default way to answer "what is this customer's balance right now." Compare is the default way to surface a mismatch between two ledgers before month-end.

Receipts and Proofs

These are the operations an agent uses when it needs something safe to share with a counterparty or auditor.

OperationEndpointSDKReference
Generate a receiptGET /api/v1/balance/receipt/:customerIdpac.balance.receipt(...)Receipt
Verify a proof root publiclyGET /api/v1/verify/:proofRootpac.verify(...)Verifying Proofs
Verify a spot-check packagePOST /api/v1/verify/packageVerifying Proofs

Receipts are the agent's hand-off format. Public verification works without an API key, which is the whole point — a counterparty can audit the proof root without needing PacSpace credentials of their own.

Customer Records

Customer records are the agent's view of "who has balance with us." Use these reads when building an interface that lists customers or drills into one record.

OperationEndpointSDKReference
List customer recordsGET /api/v1/balance/customerspac.balance.customers(...)How Customer Records Work
Read one customer recordGET /api/v1/balance/customers/:customerIdpac.balance.customer(...)Querying Records

Webhooks

Inbound events are how PacSpace tells the agent that a delta is verified or a checkpoint is committed.

EventWhen it firesReference
delta.verifiedA delta is verified end-to-end.Event Types
delta.storedA delta has been permanently committed on the verification layer.Event Types
delta.failedA delta has reached a terminal failed state.Event Types
checkpoint.verifiedA period-end checkpoint has been committed.Event Types

The Autonomous Agent Pattern is the reference design for handling these events.

SDK Entry Points

The TypeScript SDK is the fastest path to a correct integration. The SDK:

  • Routes automatically based on the API key prefix.
  • Handles retries with bounded exponential backoff on transient errors.
  • Forwards idempotency keys through the Idempotency-Key header.
  • Exposes typed errors for common failure modes.

See SDK Reference for every method, return shape, and error.

Idempotency

Every write call in this section supports idempotency. Set an Idempotency-Key header (or the idempotencyKey option in the SDK) and reuse the same deterministic referenceId on retry. Full rules live on Safety and Idempotency.

Retry

Retry only transient failures — 408, 429, 5xx — with bounded exponential backoff. Do not retry 4xx validation errors without changing the inputs.

Failure Modes

  • Using emit for high-frequency telemetry where emitBatch would be correct, inflating call volume.
  • Using emitAndWait on a critical user-request path and timing out before verification completes.
  • Treating receiptId and proofRoot as interchangeable — receiptId is per submission, proofRoot covers a group or checkpoint.
  • Calling compare without a consistent startingBalance or startingCheckpoint between the two sides.