Skip to main content

Basic usage

Calling search_web(...) will:
  • Measure duration
  • Record inputs/outputs
  • Append a ledger entry

Async functions

Exceptions

Agent Sentinel does not swallow your exceptions. If your function raises, the exception propagates normally — the SDK records the action as outcome="error" and logs the error string.

Fail-open vs fail-closed

  • Fail-open: ledger writes and remote sync should never crash your agent.
  • Fail-closed: policy violations intentionally raise before execution (see Policies).

Decorator arguments

@guarded_action accepts the following keyword-only arguments. Anything beyond name, cost_usd, and tags is optional — sensible defaults apply.

Replay mode integration

If replay mode is active, decorated actions return recorded outputs instead of executing (and are logged with outcome="replayed"). See Replay.