TradeMemory is a memory and audit layer for AI trading agents that records trading decisions, outcomes, and context in a tamper-evident history. It is for traders and automated trading systems that need agents to recall past decisions and document their reasoning. Catalogue add-ons provide skills, commands, MCP tools, and related workflow components for using it.
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 commands/mnemox-ai/tradememory-protocol/evolvegit clone --depth 1 https://github.com/mnemox-ai/tradememory-protocolWrote 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.
[](https://agentmods.dev/commands/mnemox-ai/tradememory-protocol/evolve)<a href="https://agentmods.dev/commands/mnemox-ai/tradememory-protocol/evolve"><img src="https://agentmods.dev/badge/commands/mnemox-ai/tradememory-protocol/evolve.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.00670 |
| Opus 5 | $0.00005 | $0.00335 |
| Sonnet 5 | $0.00002 | $0.00134 |
| Haiku 4.5 | $0.00001 | $0.00067 |
Grade A, and why
evolve 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 5d 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 — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Evolve Strategy
Trigger the Evolution Engine to autonomously discover trading patterns from raw OHLCV data. The engine generates candidate strategies via LLM, backtests them vectorized, validates out-of-sample, and graduates survivors.
Workflow
Step 1: Configure Evolution
If parameters are provided, use them. Otherwise ask:
- Symbol: e.g., BTCUSDT, ETHUSDT (Binance pairs)
- Timeframe: 1h, 4h, 1d
- Generations: How many evolution cycles (default: 3)
- Candidates per generation: How many strategies to test (default: 10)
- Data period: How many days of historical data (default: 90)
Step 2: Fetch Market Data
Use the evolution_fetch_market_data MCP tool:
evolution_fetch_market_data({
symbol: "BTCUSDT",
timeframe: "1h",
days: 90
})
Step 3: Discover Patterns
Use the evolution_discover_patterns MCP tool:
evolution_discover_patterns({
symbol: "BTCUSDT",
timeframe: "1h",
num_patterns: 10
})
The LLM analyzes price data and generates candidate trading rules (entry/exit conditions, position sizing, stop loss).
Step 4: Run Evolution Loop
Use the evolution_evolve_strategy MCP tool:
evolution_evolve_strategy({
symbol: "BTCUSDT",
timeframe: "1h",
generations: 3,
candidates_per_gen: 10
})
Each generation:
- Generate — LLM creates N candidate strategies
- Backtest — Vectorized backtesting with Sharpe, win rate, max drawdown
- Select — Top performers survive, bottom eliminated
- Mutate — LLM evolves survivors with variations
- Validate — Out-of-sample test on held-out data
Step 5: Report Results
For each graduated strategy:
| Metric | In-Sample | Out-of-Sample |
|---|---|---|
| Sharpe Ratio | X.XX | X.XX |
| Win Rate | X% | X% |
| Max Drawdown | X% | X% |
| Total Return | X% | X% |
| # Trades | N | N |
Plus:
- Strategy description (entry/exit rules in plain language)
- Graveyard summary (why eliminated strategies failed)
- Confidence assessment (how robust is the OOS performance?)
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.
- 5d ago First seen · 96 lines · 10 tokens per session scan A 5ef4e188ffe3
evolve is a command published in the GitHub repository mnemox-ai/tradememory-protocol (1,412 stars, last pushed 24d ago), licensed MIT. It adds 10 tokens to every session and 670 once invoked, about $0.0001 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 commands, from other repositories
portfolio
View TastyTrade portfolio summary (positions and balances).
scan
Universal scan — auto-detects asset class (stock / crypto / index / FX / commodity) and runs the matching protocol. With no args, regenerates scanned/INDEX.md.
scan-flow
Partial scan — refresh ONLY the asset-class flow & positioning section of an existing current.md (Flow & Squeeze for stocks, Crypto/Index/FX/Commodity Flow for non-stocks). Does not re-run charts, 6-pillar, or earnings.
discover
Run a Finviz screener aligned with the framework + current macro regime. Saves a dated candidate list to scanned/SCREENS/.
alpha
Scan for alpha opportunities and spawn parallel research agents.
positions
Review all open positions with parallel subagents. Decides HOLD or SELL for each position.