evolve

evolve is a command for coding agents from mnemox-ai/tradememory-protocol. It costs 10 tokens per session (670 once invoked), scanned A, original, MIT.

A workflow for generating and testing trading strategies from historical market price and volume data. It uses repeated rounds of pattern discovery, backtesting, and out-of-sample validation.

In plain words
What is it for?
Use it to explore Binance trading pairs, generate candidate entry and exit rules, and compare their historical results. You can configure the market, timeframe, number of cycles, candidates, and data period.
Why use it?
It reduces the manual work of inventing strategies and checking whether they might have worked on past data. Testing on separate data helps expose strategies that only fit the history used to create them.

Command

Part of the tradememory-plugin plugin — 3 skills, 5 commands, 1 MCP server shipped together

About the project

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.

mnemox-ai/tradememory-protocol · 1,412 stars · on GitHub

Install

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.

agentmods
npx agentmods add commands/mnemox-ai/tradememory-protocol/evolve
Clone the repo
git clone --depth 1 https://github.com/mnemox-ai/tradememory-protocol

Or install tradememory-plugin, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 1 MCP server.

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 evolve

README.md
[![agentmods](https://agentmods.dev/badge/commands/mnemox-ai/tradememory-protocol/evolve.svg)](https://agentmods.dev/commands/mnemox-ai/tradememory-protocol/evolve)
Your own site
<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>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 670 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.00670
Opus 5 $0.00005 $0.00335
Sonnet 5 $0.00002 $0.00134
Haiku 4.5 $0.00001 $0.00067

Measured 5d ago against content hash 5ef4e188ffe3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

tradememory-plugin/commands/evolve.md · 96 lines

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:

  1. Generate — LLM creates N candidate strategies
  2. Backtest — Vectorized backtesting with Sharpe, win rate, max drawdown
  3. Select — Top performers survive, bottom eliminated
  4. Mutate — LLM evolves survivors with variations
  5. 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?)

Read the full file on GitHub · 96 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. 5d ago First seen · 96 lines · 10 tokens per session scan A 5ef4e188ffe3

Subscribe to this mod's changes

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.