LLM_trader: Instructions file for Codex

AGENTS.md

LLM_trader AGENTS.md is an instructions file for Codex, OpenCode from qrak/LLM_trader. It costs 9,206 tokens per session, scanned A, original, MIT.

A repository instruction file that gives coding agents the rules, architecture, and working procedures for an experimental, paper-trading bot. The bot uses market data, news, chart images, and language models to produce buy, sell, or hold decisions.

In plain words
What is it for?
Following the project's coding standards, testing rules, lifecycle, and governance while working on its multi-agent trading system.
Why use it?
It gives agents one authoritative source of guidance, reducing conflicting instructions and uncertainty about how the project should be changed or run.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is qrak/LLM_trader's own configuration. It tells Codex and OpenCode how to work on LLM_trader itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything LLM_trader configures →

Reuse

Borrowing it

Nothing to install: this file belongs to qrak/LLM_trader. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/qrak/LLM_trader/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/qrak/LLM_trader

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for LLM_trader AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/qrak/llm_trader/agents-md/github.svg)](https://agentmods.dev/instructions/qrak/llm_trader/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/qrak/llm_trader/agents-md"><img src="https://agentmods.dev/badge/instructions/qrak/llm_trader/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for LLM_trader AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/qrak/llm_trader/agents-md"><img src="https://agentmods.dev/badge/instructions/qrak/llm_trader/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,206 This file is loaded in full into every session.
When invoked 9,206 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.09206 $0.09206
Opus 5.5 $0.03682 $0.03682
Sonnet 5.5 $0.01841 $0.01841
Haiku 4.5 $0.00921 $0.00921

Measured 4d ago against content hash 840e6b592178, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

LLM_trader AGENTS.md scanned grade A with 1 finding 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 4d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Any `eval` / `exec` / `subprocess(shell=True)` / `os.system` / `pickle.loads` / `yaml.load` hit in `src/` is CRITICAL until proven otherwise.
AGENTS.md · 442 lines

How it starts

The opening of the file, as written. The whole thing — 442 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.py Execution: with [executor_api] enabled = true decisions are forwarded to a separate executor service (not in this repository); with enabled = false the book is simulated 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.md is 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

Asyncio-first trading bot: market data, news (RAG) and chart images become structured BUY / SELL / HOLD decisions from an LLM. A central trading loop coordinates data ingestion, technical analysis (Numba indicator kernels), RAG retrieval, risk validation, an outcome-aware brain (vector memory + reflection), and an order-governance chain. Filled orders are executed by a separate service; the bot keeps the decision loop and books what the venue actually did.

DataFetcher ─▶ AnalysisEngine ─▶ ProviderOrchestrator ─▶ UnifiedParser
   (CCXT)       TechCalc+Pattern+Chart+RAG+Brain        (fallback chain)
                                                              │
   BrainContextProvider ◀── vector memory ◀── closed trade     ▼
        (confidence + rules into next prompt)          GuardPipeline ─▶ RiskManager
                                                              │            (SL/TP, size)
                                                              ▼                │
                                                     TradingStrategy ◀─────────┘
                                                     (R:R gate, OrderLifecycle, ExitMonitor)
                                                              │
                                                        executor_api ─▶ venue, verdict journal ─▶ booking

Read the full file on GitHub · 442 lines

Changes

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.

  1. 4d ago Changed · +46 tokens per session 840e6b592178
  2. 6d ago Changed · +1 lines · +37 tokens per session 6d6a093c5d27
  3. 8d ago Changed · +15 lines · +910 tokens per session 34737663a04b
  4. 10d ago Changed · +38 lines · +1,171 tokens per session 41c2501ea491
  5. 11d ago Changed · +7 lines · +463 tokens per session 08e756139e2d
  6. 12d ago Changed · +19 lines · +283 tokens per session 012695eb3df1
  7. 13d ago Changed · +10 lines · +308 tokens per session a9f48714c2d3
  8. 15d ago Changed · +1 lines · +40 tokens per session 6b98f6e58f38
  9. 18d ago Changed · -132 lines · -1,167 tokens per session 87ed24d77230
  10. 23d ago First seen · 483 lines · 7,115 tokens per session scan A 289f406daadc

Subscribe to this mod's changes

LLM_trader AGENTS.md is an instructions file published in the GitHub repository qrak/LLM_trader (141 stars, last pushed 4d ago), licensed MIT. It adds 9,206 tokens to every session, about $0.0368 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

LLM_trader AGENTS.md compared with instructions from other repositories

LLM_trader AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
LLM_trader AGENTS.mdqrak/LLM_traderInstructions file1414d agoMITA9,206Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot