Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ameo.agiwithai.com/llms.txt

Use this file to discover all available pages before exploring further.

The policy engine is a deterministic authorization layer. The LLM (or local_rules fallback) proposes plans; predicates decide whether execution may proceed.

Core predicates

PredicateQuestion it answers
drawdown_okIs 24h PnL above the max drawdown floor?
whitelist_okAre all assets in ALLOWED_TOKENS?
trade_size_okIs each leg below MAX_TRADE_SIZE_USD?
slippage_okIs expected slippage within MAX_SLIPPAGE_BPS?
daily_volume_okWill this trade exceed the daily notional cap?
All five must pass:
plan_approved ⇔ drawdown_ok ∧ whitelist_ok ∧ trade_size_ok ∧ slippage_ok ∧ daily_volume_ok

Where code lives

LayerPath
Predicate definitionsapps/worker/ameo_worker/policy.py
Extended checks (gas, balance, protocol)apps/worker/ameo_worker/services/guardrail_service.py
Graph integrationapps/worker/ameo_worker/graph.pyguardrail node
Failed checks emit guardrail_evaluated with a violations[] array. The replay UI surfaces each rule as pass/fail in the Policy validation node.

Formal spec

See the full predicate table and failure semantics in Policy specification. To extend predicates, follow Write a policy.