Advanced L3
Add optional coordination, policies, and execution review around an SJS strategy.
L3 is the advanced coordination layer around the main strategy. Keep signals, ordinary state, entries, and exits in SJS unless a concrete requirement calls for higher-level coordination.
L3 can observe frames, coordinate policy modules, review execution intents, and use supported providers. It can be entirely deterministic; enabling L3 does not require an AI call.
Two hooks, two jobs
| Hook | When it runs | Responsibility |
|---|---|---|
app(args) | Before SJS in the shared frame runner | Observe or coordinate frame-level work |
intent(args) | When an execution method requests an applicable L3 check | Return an explicit decision about that request |
The frame hook does not return a universal permission for all later orders. The intent hook checks the actual request. Provider output and policy results need explicit interpretation by your script.
Read in order
- Getting started: add a deterministic request guard.
- Lifecycle: loading, enabling, and invoking hooks.
- Context and modules: frame scope, tools, gates, and policies.
- Working with SJS: responsibilities and evidence timing.
- Using policies: reuse the policy framework.
- Handling intents: decisions and execution-source rules.
- State: ownership, timestamps, and decision history.
- Model calls: supported provider adapters and response validation.
- Failures and timeouts: actual runtime outcomes.
- Historical testing: deterministic checks and fake-provider fixtures.
- Examples: complete provider observation example and policy workflows.
- Debugging: trace hooks, decisions, and execution.
The Policies section remains the detailed framework guide. Agent Lab's AI authoring assistant is a separate capability from an L3 provider called during strategy execution.