Skip to main content

Client

Constructors

Runtime methods

Budget transport helpers

BudgetGuard

client.budget_guard(...) returns actguard.BudgetGuard. Readable properties include:
  • run_id
  • tokens_used
  • usd_used
  • local_tokens_used
  • local_usd_used
  • root_tokens_used
  • root_usd_used
Supports with and async with.

Event reporting APIs

emit_event is a no-op without an active client.run(...) context.

Tool guard decorators

See Tool guards for parameter-level behavior.

Session API

Creates a GuardSession context manager used by prove and enforce.

Exceptions

Core

  • ActGuardError
  • ActGuardToolError
  • ActGuardPaymentRequired
  • MonitoringDegradedError
  • ActGuardViolation

Runtime and budget

  • MissingRuntimeContextError
  • NestedRuntimeContextError (alias: NestedRunContextError)
  • NestedBudgetGuardError (legacy export; current budget scopes support nesting)
  • BudgetExceededError
  • BudgetTransportError
  • BudgetConfigurationError
  • BudgetClientMismatchError

Tool guard failures

  • RateLimitExceeded
  • CircuitOpenError
  • MaxAttemptsExceeded
  • ToolTimeoutError
  • MissingIdempotencyKeyError
  • IdempotencyInProgress
  • DuplicateIdempotencyKey
  • IdempotencyOutcomeUnknown
  • InvalidIdempotentToolError
  • GuardError
  • ToolGuardError
  • ToolExecutionError