Skip to content

Section A · Agent Design · Free

A1. Decision Loop Scaffold

What this does

The core decision contract an LLM-orchestrated agent uses each cycle. Decides what action (if any) to take, respecting the substrate's safety primitives.

What to expect back

JSON conforming to the Gryps Agentic decision schema.

Works with

No tools. This one is pure thinking, and works before you connect anything.

The prompt

Inputs

  • SUB_ACCOUNT_ID — the operating sub-account
  • RISK_ENVELOPE — JSON object: max notional, max leverage, allowed instruments
  • KILLSWITCH_STATE — current killswitch state from `client.getKillswitchState()`
  • POSITION_STATE — current open positions (if any)
  • MARKET_STATE — recent market data window (timeframe-appropriate)
  • STRATEGY_SIGNALS — output of the operator's strategy logic
  • LAST_ACTION_TIMESTAMP — when the agent last acted

A · Agent Design