Signature
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
budget | float | None | None | Max USD for this agent |
compliance | str | None | None | Compliance mode |
kpi_weights | dict | None | None | KPI dimension weights |
kpi_targets | dict | None | None | KPI dimension targets |
max_tool_calls | int | None | None | Max tool/function calls |
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.