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_IDthe operating sub-account
  • RISK_ENVELOPEJSON object: max notional, max leverage, allowed instruments
  • KILLSWITCH_STATEcurrent killswitch state from `client.getKillswitchState()`
  • POSITION_STATEcurrent open positions (if any)
  • MARKET_STATErecent market data window (timeframe-appropriate)
  • STRATEGY_SIGNALSoutput of the operator's strategy logic
  • LAST_ACTION_TIMESTAMPwhen the agent last acted

A · Agent Design