- Run-scoped execution context (
client.run(...)) - Budget reserve/settle scopes (
client.budget_guard(...)) - Tool guard decorators (
rate_limit,circuit_breaker,max_attempts,timeout,idempotent,prove,enforce,tool) - Optional event shipping to the ActGuard gateway
Install
Canonical runtime pattern
actguard/examples.
Initialization options
actguard.Client.from_env()readsACTGUARD_CONFIGwhen setactguard.Client.from_file("./actguard.json")reads JSON config from diskactguard.Client(...)accepts explicit constructor args
ACTGUARD_CONFIG may be either:
- A base64-encoded JSON object
- A filesystem path to a JSON file
Runtime scopes at a glance
client.run(...): required for runtime-scoped decorators likemax_attemptsandidempotentclient.budget_guard(...): budget tracking/enforcement scope bound to the active runactguard.session(...): chain-of-custody scope used byproveandenforce
