Skip to content

System-R-AI/demo-trading-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Demo Trading Agent with System R AI Finance Tools

Reference agent workflow using System R AI finance tools for decision-support examples.

System R AI is a decision intelligence system for trading and investing. This repository shows how an agent, script, or notebook can call the System R AI API Toolkit to structure risk checks, position sizing, performance review, and journal workflows.

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.

What this demo shows

The examples demonstrate a safe builder pattern:

Market idea -> supplied inputs -> System R tool call -> structured output -> user review

The workflow is intentionally framed around decision support. It does not require broker connection or order routing, and it should not be presented as unattended trading automation.

Quick start

1. Register an API key

Use the current System R AI developer docs and agents surface for API access.

2. Setup

git clone https://github.com/System-R-AI/demo-trading-agent.git
cd demo-trading-agent
pip install -r requirements.txt
cp .env.example .env

Add your System R API key to .env.

3. Run examples

# Plain Python examples
python examples/plain_python/workflow_examples.py

# Momentum workflow example
python examples/plain_python/momentum_agent.py

# Backtest comparison example
python examples/plain_python/backtest_comparison.py

# CrewAI example, if dependencies and model keys are configured
pip install -r examples/crewai/requirements.txt
python examples/crewai/trading_crew.py

# LangChain example, if dependencies and model keys are configured
pip install -r examples/langchain/requirements.txt
python examples/langchain/trading_agent.py

Example tool call

import httpx

gate = httpx.post(
    "https://agents.systemr.ai/v1/compound/pre-trade-gate",
    headers={"X-API-Key": SYSTEMR_API_KEY},
    json={
        "symbol": "AAPL",
        "direction": "long",
        "entry_price": "185.00",
        "stop_price": "179.50",
        "equity": "100000",
    },
).json()

print(gate)

pre_trade_gate returns structured sizing, risk, and health fields from supplied inputs. The user remains responsible for interpreting the output and deciding what to do next.

Workflow areas

The API Toolkit can support examples across:

  • Risk and sizing
  • Performance diagnostics
  • Market structure analytics
  • Scenario planning
  • Journal and memory workflows
  • Asset or research context where supported or supplied

Use the live tool catalog for current tool names, schemas, and availability.

Pricing and usage

System R AI uses usage-based credits for paid workflows. Current rates and billing rules should be checked through live pricing endpoints and the System R billing page.

Do not assume every tool, data path, or LLM-backed workflow has the same pricing behavior. Live discovery and billing responses are the source of truth.

Links

License

MIT

About

Reference agent workflow using System R AI finance tools for decision-support examples.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages