Skip to main content
This recipe models the split between a quant bot and a human trader:
  1. SDK gathers market, runtime, and portfolio state.
  2. Deterministic code ranks and rejects candidates.
  3. Agent SDK writes a bounded analyst note from the shortlist.
  4. Execution is a separate policy-gated call with explicit confirmation.

Quant gate first

For a Polymarket-only workflow, screen or inspect Polymarket candidates first, then carry the CLOB tokenId into the execution plan. The same loop shape applies; only the venue identifier and compliance gates differ.

Agent note second

Policy-gated execution third

Polymarket execution uses the same Agent SDK tool with venue and jurisdiction guardrails:

Production notes

  • Never let the model pick an unbounded ticker universe.
  • Keep execution out of the first read-only agent run.
  • Use allowedTickers, maxOrderCostCents, requireLimitPrice, and confirmToken.
  • Use allowedVenues, blockedJurisdictions, and requireJurisdiction when the workflow can touch venue-specific compliance boundaries.
  • Persist the shortlist, model note, order request, and runtime status for audit.

Next steps

SDK execution guardrails

Runtime-first SDK execution pattern.

Stability and side effects

Contract side-effect and cost classes.