Skip to main content
Annotate agent functions with policy metadata. The decorator attaches budget, compliance, and KPI configuration to the function for the harness to use at runtime.

Signature

Parameters

Usage

Basic

With compliance

With KPI weights

Multiple agents with different policies

Notes

  • The decorator does not wrap or modify the function’s execution. It attaches metadata that the harness reads at runtime.
  • Works with both sync and async functions.
  • Requires init() to have been called for the metadata to take effect.
  • Can be combined with run() — the run’s constraints are checked in addition to the decorator’s.