How agents make a call
A model reads the market; fixed rules and your grant control execution.
An AI agent reads a Window and answers Up, Down or Hold with a confidence figure and a short reason. It cannot sign a transaction or choose an arbitrary amount. Fixed rules check the answer before the runner considers your spending permission.
Explore each part and its connections. Expand to use more of your screen.
Follow an arrow to explore a connected part.
Spec · caps · runner address
What this part does
The creator publishes Momentum or AI metadata and an immutable spending envelope to StrategyRegistry. Persona and playbook are public text.
Outgoing connections
- From Publish a strategypublishAction or record
The creator publishes Momentum or AI metadata and an immutable spending envelope to StrategyRegistry. Persona and playbook are public text.
Read the map as text
- Publish a strategy StrategyRegistry: publish.
- StrategyRegistry Momentum or AI read: scan active spec.
- Fresh market context Momentum or AI read: market facts.
- Momentum or AI read Fixed decision gate: AI: verify fixed rules.
- Momentum or AI read Per-subscriber checks: Momentum call.
- Fixed decision gate Per-subscriber checks: passed AI call.
- Subscriber’s grant Per-subscriber checks: live authority.
- Per-subscriber checks EventVault execution: capped order.
- EventVault execution Decision + fill record: actual fill record.
- Momentum or AI read Decision + fill record: decision.
What the agent sees
The prompt includes the opening print, current EMA and spot price, up to 12 samples of the price path, and separate executable quotes for both sides. It also includes a short record of recent decisions and settled outcomes.
The oracle opening print uses two decimals; the live price feed declares its own scale, currently eighteen decimals. The strategy adapter normalizes the opening print to that feed scale before comparing prices or formatting the prompt. An unreadable scale holds the read. It leaves the provider's original oracle units intact for settlement and market displays.
For each chosen cadence, the runner aims to read the Window once, starting a quarter of the way through. The decision slot closes before the final no-entry period. It reserves that decision in the database before calling the model. A failed, interrupted or missing model answer becomes Hold; a restart does not request a second answer for the same strategy and Window. Studio's optional Test read is a separate preview.
What the fixed gate checks
| Posture | Confidence floor | Side-price ceiling | Loss breaker |
|---|---|---|---|
| Guarded | 75% | 70 cents | 3 straight losses; 6-hour pause |
| Balanced | 65% | 85 cents | 4 straight losses; 4-hour pause |
| Active | 55% | 95 cents | 5 straight losses; 2-hour pause |
There is also a daily loss line: 25%, 40% or 60% of the strategy envelope's daily spend ceiling respectively. It is based on realized losses and pauses until the next UTC day. The loss-streak cooldown starts at the relevant settlement time, so restarting the process cannot shorten it. Unreadable or stale settlement history holds new entries; it is not treated as zero losses. Confidence is the model's self-report, not a measured guarantee of winning.
What your grant checks
After the gate permits a side, the runner reads each subscriber's current grant. It skips someone who already holds that Window. Stake is bounded by the per-trade cap, today's spend headroom and remaining budget. The contract enforces the grant again when the order executes.
Positions and their proceeds belong to the subscriber. Pause revokes future spending and releases unused budget. The runner can still settle positions from earlier grants, including after a strategy or subscription is paused. Their proceeds return to the owner's available Trading Balance.
The runner reserves an execution attempt before sending an order. Repeated cycles and restarts reconcile that attempt against exact chain evidence instead of resending it. An unresolved attempt holds all new submissions by that runner, including settlement sends, until its outcome is established. The pause does not transfer funds to the runner.
Settlement attribution comes from each held side's matching owner, market, historical grant and real fill. One owner can have positions from different strategies, so the discovering strategy is not automatically their origin. Missing or conflicting provenance holds automated settlement and new entries; the owner can inspect and settle from Portfolio.
What memory means here
Decision rows retain model identity, prompt hash, reason, gate decision and execution counts. The recent record is matched against chain settlement. This helps the prompt and loss checks use prior outcomes.
It does not retrain the model. The database is required for new runner trades: when execution or risk records cannot be read or saved, the runner holds. A blank page still does not prove inactivity because the page itself can have a read failure. Check health, recorded decisions and transactions separately.
Other strategies and Sensei
Momentum compares the Window's opening print with the fresh EMA. A move beyond the selected positive threshold can call Up; a move beyond its negative can call Down; a smaller move holds. The builder exposes that threshold and does not offer a historical lookback control. Legacy lookback metadata does not alter this live comparison. The current builder offers AI Agent and Momentum; mean-reversion code is not a selectable creation path.
Sensei is a separate chat companion. It reads the snapshot supplied by the app and offers a view. Its snapshot converts oracle cents into whole dollars for both the opening line and chart samples. Its route does not execute trades.
Use Launch an agent for the user flow, or Host your own agent for the runner setup.
Source notes
This guide follows the application code reviewed on 2026-09-07. Links point to that reviewed commit and require repository access. GitHub may show 404 if you are signed out or do not have access.
- packages/brain/src/agent-decide.ts
- packages/brain/src/agent-read.ts
- packages/core/src/strategies/agent.ts
- services/ops/src/actors/strategy-runner/index.ts
- services/ops/src/actors/strategy-runner/execute.ts
- services/ops/src/actors/strategy-runner/agent-record.ts
- services/ops/src/actors/strategy-runner/agent.ts
- services/ops/src/actors/strategy-runner/lifecycle.ts
- packages/db/src/strategy-decisions.ts
- packages/db/src/strategy-attempts.ts
- packages/markets/src/strategies/agent-context.ts
- packages/markets/src/strategies/price-basis.ts
- web/src/features/strategies/activity.ts
- web/src/features/sensei/useSenseiSnapshot.ts
- web/src/features/sensei/units.ts
- contracts/src/strategy/StrategyRegistry.sol