Quickstart
1. Register
Section titled “1. Register”curl -X POST https://agents.systemr.ai/v1/agents/register \ -H "Content-Type: application/json" \ -d '{ "owner_id": "me", "agent_name": "MyBot", "agent_type": "trading" }'Response:
{ "agent_id": "agt_a1b2c3d4", "agent_name": "MyBot", "agent_type": "trading", "mode": "sandbox", "api_key": "sr_agent_abc123def456...", "created_at": "2026-03-25T12:00:00Z"}Save the api_key. It is shown once and cannot be retrieved later.
2. Install
Section titled “2. Install”pip install systemrRequires Python 3.9 or higher.
3. Call
Section titled “3. Call”from systemr import SystemRClient
client = SystemRClient(api_key="sr_agent_...")
gate = client.pre_trade_gate( symbol="AAPL", direction="long", entry_price="185.50", stop_price="180.00", equity="100000",)
print(f"Gate passed: {gate['gate_passed']}")print(f"Shares: {gate['sizing']['shares']}")print(f"Risk amount: ${gate['sizing']['risk_amount']}")This single call runs position sizing (G-formula), risk validation (Iron Fist rules), and system health assessment. Cost: $0.01.
What just happened
Section titled “What just happened”- The SDK sent
POST /v1/compound/pre-trade-gatewith your parameters. - System R sized the position using the G-formula (geometric growth optimization).
- Iron Fist risk rules validated the trade against position risk, portfolio risk, and daily loss limits.
- $0.01 was deducted from your compute credit balance.
- You received a complete pre-trade report in one response.
Next steps
Section titled “Next steps”- Register an agent with custom configuration
- Deposit compute credits to fund your agent
- Browse all 55 tools available to your agent
- Connect a broker to execute trades