Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/qrak/llm_trader/agents-mdgit clone --depth 1 https://github.com/qrak/LLM_traderWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.22821 | $0.22821 |
| Opus 5 | $0.11411 | $0.11411 |
| Sonnet 5 | $0.04564 | $0.04564 |
| Haiku 4.5 | $0.02282 | $0.02282 |
Grade A, and why
LLM_trader AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 1,803 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLM Trader — Master Architecture Blueprint
Repository: https://github.com/qrak/LLM_trader.git Python: 3.13,
.venv/,python start.pyStatus: BETA / Research Edition — paper-trading mode only Live Dashboard: https://semanticsignal.qrak.org
0. Instruction Authority
Root AGENTS.md is the single instruction source of truth in this repository across all IDEs, agents, and harnesses.
- Root
AGENTS.mdis canonical for system-wide rules, architecture, coding standards, testing, terminal behavior, and governance. - IDE-specific instruction files are non-authoritative and should not contain policy that is missing from
AGENTS.md. .github/workflows/*defines CI execution behavior, not instruction authority.
1. System Overview
SEMANTIC SIGNAL LLM (LLM Trader) is an autonomous, asyncio-first trading bot that converts market data, news (via RAG), and chart images into structured BUY / SELL / HOLD decisions via large language models. The system operates a distributed multi-agent intelligence architecture: specialized agents for technical analysis, pattern recognition, news retrieval, risk validation, outcome-aware learning, and reflection-based rule synthesis — all coordinated through a central trading loop.
flowchart TB
subgraph External["External Layer"]
EX["Exchanges<br/>(Binance, KuCoin, Gate.io,<br/>MEXC, Hyperliquid)<br/>‑ CCXT"]
CG["CoinGecko<br/>DeFiLlama"]
ALT["Alternative.me<br/>(Fear & Greed)"]
RSS["RSS Feeds<br/>(CoinDesk, CoinTelegraph,<br/>Decrypt, CryptoSlate)"]
AI_PROV["AI Providers<br/>Google Gemini (primary)<br/>LM Studio (local text fallback)<br/>OpenRouter (secondary configurable provider)"]
end
subgraph DataIngestion["Data Ingestion Layer"]
DF["DataFetcher<br/>OHLCV + Order Book + Trade Flow"]
RAG["RAG Engine Agent<br/>News + Fundamentals"]
end
subgraph AnalysisLayer["Analysis Layer"]
TA["Analysis Engine Agent<br/>Technical Calculator<br/>50+ Indicators"]
PE["Pattern Engine<br/>Deterministic Indicator<br/>Pattern Detection<br/>Numba JIT compiled"]
CGEN["Chart Generator<br/>4K PNG Candlestick<br/>SMA/RSI/Volume/CMF+OBV"]
end
subgraph BrainLayer["Learning & Memory Layer"]
BRAIN["🧠 Brain Agent<br/>TradingBrainService"]
VM["Vector Memory<br/>ChromaDB<br/>Trade Experiences<br/>Semantic Rules<br/>Confidence Stats"]
REFL["Reflection Engine<br/>Best‑practice Rules<br/>Anti‑patterns<br/>AI Mistake Rules"]
end
subgraph RiskLayer["Risk & Execution Layer"]
RP["Risk Manager<br/>Dynamic SL/TP<br/>Position Sizing"]
GP["Order Governance Pipeline<br/>Symbol Guard<br/>Max Size Guard<br/>Cooldown Guard"]
STRAT["Trading Strategy<br/>Exit Monitor<br/>Position Status Monitor"]
end
subgraph Output["Output Layer"]
DASH["📊 Dashboard<br/>FastAPI + WebSocket"]
LOGS["Audit Trail<br/>Position Logs<br/>SQLite Trade History"]
end
subgraph Providers["Provider Orchestration"]
PO["Provider Orchestrator<br/>Fallback Chain"]
end
%% Data Flow
EX --> DF
RSS --> RAG
CG --> RAG
ALT --> TA
DF --> TA
TA --> PE
TA --> CGEN
RAG --> TA
TA --> PO
PO --> AI_PROV
AI_PROV -->|"Structured Signal"| RP
RP --> GP
GP --> STRAT
STRAT -->|"Closed Trade"| BRAIN
BRAIN --> VM
VM -->|"Reflection Loop"| REFL
REFL -->|"Rules"| VM
VM -->|"Context Injection"| BRAIN
BRAIN -->|"Confidence + Rules"| TA
TA --> DASH
STRAT --> DASH
STRAT --> LOGS
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 1,803 lines · 22,821 tokens per session scan A 3a36c7826e67
LLM_trader AGENTS.md is an instructions file published in the GitHub repository qrak/LLM_trader (121 stars, last pushed 4d ago), licensed MIT. It adds 22,821 tokens to every session, about $0.1141 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
TradingAgents-astock CLAUDE.md
Claude Code instructions for simonlin1212/TradingAgents-astock, covering tradingagents-astock, 项目概述, 架构, 数据层(v0.2.5 全部直连 http,零第三方数据库依赖) and agent 角色(7 个).
Binance.Net copilot-instructions.md
Instructions for JKorf/Binance.Net, covering copilot instructions for binance.net, use binance.net, not raw http, client setup, result handling and api structure.
GitNexus AGENTS.md
AGENTS.md instructions for abhigyanpatwari/GitNexus, covering scope, model configuration, execution sequence (complex tasks), claude code hooks and context budget.
GitNexus CLAUDE.md
Claude Code instructions for abhigyanpatwari/GitNexus, covering scope, model configuration, execution sequence (complex tasks), claude code hooks and context budget.
kraken-net
Use Kraken.Net when generating C#/.NET code that interacts with the Kraken cryptocurrency exchange, including Spot REST, Spot WebSocket v2, Futures REST, Futures WebSocket, account data, market data, order placement, Kraken Earn, local order books, dependency injection, or CryptoExchange.Net SharedApis. Triggers on…
kucoin-net
Use Kucoin.Net when generating C#/.NET code that interacts with the Kucoin cryptocurrency exchange API, including Spot, Margin, High Frequency spot trading, Futures, Unified Account, REST endpoints, WebSocket subscriptions, account management, market data, or order placement. Triggers on any request mentioning Kucoin…