Skip to main content

Agent Policy Metadata

The Python @cascadeflow.agent() decorator and TypeScript harnessAgent() wrapper attach policy metadata directly to a function. They do not create a scoped run or enforce the metadata by themselves.
Use run() around agent execution when budget, compliance, or other controls must be enforced.

Basic Usage

Add Compliance

Add KPI Weights

Encode business priorities into how the agent makes model decisions:

Different Agents, Different Policies

Multiple functions can carry different policy metadata:

Combine with run()

Create a scoped run around the function invocation to enforce runtime controls:
TypeScript

All Decorator Parameters

TypeScript uses camelCase parameter names and exports the wrapper as harnessAgent.
Python API: @cascadeflow.agent() | TypeScript API: Harness

Next Step

Understand how the Harness works under the hood. Learn the Agent Harness →