Skip to main content
Glama
System-R-AI

System R Risk Intelligence

Official
by System-R-AI
README.md
# systemr

Python SDK for the System R AI public API Toolkit.

System R AI is a decision intelligence system for trading and investing. The public API Toolkit gives developers access to free finance compute tools for agents, Python workflows, notebooks, and backend services.

The SDK is designed for structured decision-support workflows using user-supplied inputs: position sizing, risk checks, performance diagnostics, market structure analysis, scenario planning, derivatives sizing, P&L, equity curves, compliance checks, scanner evaluation, and signal scoring.

System R is software for decision support. It is not financial advice, not a broker, not a signal service, and not a guarantee of profits.

[![PyPI](https://img.shields.io/pypi/v/systemr)](https://pypi.org/project/systemr/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue)](https://pypi.org/project/systemr/)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/System-R-AI/systemr-python/blob/main/LICENSE)

## Install

```bash
pip install systemr
```

Requires Python 3.9 or higher.

## Quick Example

```python
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(gate)
```

`pre_trade_gate` combines position sizing, risk validation, and supplied system-health context into a single decision-support response. System R does not place orders or execute trades.

## Public Tool Access

Discover current public tools from the live catalog before use:

```python
tools = client.list_tools()
```

Generic tool calls use the public endpoint `POST /api/v1/tools/call`:

```python
result = client.call_tool(
    "calculate_position_size",
    equity="100000",
    entry_price="185.50",
    stop_price="180.00",
    direction="long",
)
```

Common public tool areas include:

- Risk and sizing
- Performance diagnostics
- Market structure analytics from supplied data
- Scenario planning
- Derivatives sizing and plan structure
- P&L, equity curves, compliance checks, scanner evaluation, and signal scoring

## Public Toolkit Boundary

The public API Toolkit is free compute for user-supplied data. It does not provide LLM access, premium market data, research enrichment, internal data, Python execution, broker or account state, trade execution, or paid workflows.

Use the System R Workspace for eligible LLM, premium data, research-backed, memory, journal, profile, and account workflows where enabled.

## MCP and REST

The same public API Toolkit can be used through MCP-compatible clients and REST integrations.

- Docs: https://docs.systemr.ai/
- Agents: https://agents.systemr.ai/
- OpenAPI: https://agents.systemr.ai/v1/openapi.json
- Public tool catalog: https://agents.systemr.ai/api/v1/tools/list
- Public tool call: https://agents.systemr.ai/api/v1/tools/call
- MCP overview: https://docs.systemr.ai/mcp/overview

## Trust Boundary

System R is software for decision support. Users remain responsible for their own trading and investing decisions. AI outputs can be wrong.

System R is not:

- Financial advice
- A broker
- A signal service
- A guarantee of profit
- A substitute for trader judgment

## Links

- Website: https://systemr.ai/
- Workspace: https://systemr.ai/product/agentic-trading-workspace/
- API Toolkit: https://systemr.ai/product/developer-tools/
- Docs: https://docs.systemr.ai/
- Agents: https://agents.systemr.ai/
- FAQ: https://systemr.ai/resources/faq/