XAUUSD LONG 2024-01-15 entry=2038.50 sl=2032.00 tp=2055.00 session=london result=WIN +164pips XAUUSD SHORT 2024-01-16 entry=2052.30 sl=2058.00 tp=2040.00 session=ny result=LOSS -57pips reflection: london_breakout win_rate=0.73 n=41 confidence=high → promote to L3 XAUUSD LONG 2024-01-17 entry=2041.20 sl=2036.00 tp=2052.00 session=asia result=LOSS -52pips pattern: asia_session_entries win_rate=0.52 n=28 → reduce_size 0.8x XAUUSD LONG 2024-01-18 entry=2045.80 sl=2040.00 tp=2060.00 session=london result=WIN +142pips reflection: pullback_after_trend win_rate=0.81 rsi_below_40=true confidence=high XAUUSD SHORT 2024-01-19 entry=2058.90 sl=2065.00 tp=2045.00 session=ny result=WIN +139pips strategy_adjustment: nfp_counter_trend → avoid confidence=0.23 n=15 XAUUSD LONG 2024-01-22 entry=2029.40 sl=2024.00 tp=2042.00 session=london result=WIN +126pips L1→L2 promotion: 3 new patterns discovered from 47 trades L2→L3 promotion: london_breakout_strategy activated weight=0.85 XAUUSD SHORT 2024-01-23 entry=2043.60 sl=2050.00 tp=2030.00 session=asia result=LOSS -64pips memory_query: session=asia → historical_win_rate=0.52 recommendation=reduce_exposure XAUUSD LONG 2024-01-24 entry=2035.70 sl=2030.00 tp=2050.00 session=london result=WIN +143pips reflection: vol_breakout_setup detected=true confidence=0.89 action=full_position XAUUSD LONG 2024-01-25 entry=2048.20 sl=2042.00 tp=2062.00 session=ny result=WIN +138pips pattern: trend_continuation_after_breakout win_rate=0.77 n=33 → monitor XAUUSD SHORT 2024-01-26 entry=2061.50 sl=2068.00 tp=2048.00 session=london result=WIN +135pips L1→L2 promotion: 2 new patterns discovered from 53 trades strategy_adjustment: london_session_bias=long confidence=0.73 active=true XAUUSD LONG 2024-01-29 entry=2033.10 sl=2028.00 tp=2048.00 session=london result=WIN +149pips
Memory Infrastructure for AI

AI has no memory.
We're fixing that.

TradeMemory Protocol gives AI trading agents persistent, structured memory. Record every decision. Discover patterns. Evolve strategy. Open source.


Your AI forgets everything.
Every conversation starts from zero. No memory of past trades, no learned patterns, no accumulated judgment.
SESSIONSTATUS
Jan 15 — XAUUSD breakout analysis✓ done
Jan 16 — Same setup, no memory of Jan 15✗ lost
Jan 17 — Same mistake repeated✗ lost
Jan 18 — Pattern forgotten again✗ lost
Jan 19 — Still starting from zero...✗ lost

No learning loop

AI analyzes, then forgets. It can't say "this setup failed 4 times last month."

Journals are for humans

Trading journals exist, but AI agents can't query them in real-time decisions.

No pattern evolution

Without memory, AI can't discover that London breakouts work but Asian session entries don't.


Three layers of memory.
Inspired by how veteran traders develop expertise — from raw experience to pattern recognition to intuitive judgment.
L1 · Raw Trades

Record Everything

Every trade auto-recorded with full context — entry, exit, SL, TP, session, outcome, and AI reasoning.

record_trade(XAUUSD, LONG,
entry=2038.50, sl=2032.00,
session="london", result=WIN)
L2 · Patterns

Discover What Works

Reflection engine analyzes history, extracts patterns: which strategies win, which sessions to avoid.

london_breakout: 73% win rate
asia_entries: 52% win rate
nfp_counter: 23% → avoid
L3 · Strategy

Evolve Judgment

Patterns become real-time adjustments. Memory becomes the AI equivalent of "feel for the market."

asia_session → size × 0.8
london_breakout → full position
high_volatility → widen stops

7 tools. Any AI agent.
Built on Anthropic's Model Context Protocol. Works with Claude, GPT, open-source models. Supports MT5, Binance, Alpaca.
record_trade — Log trades with full context
get_trade_history — Query past trades
reflect_on_trades — Trigger pattern discovery
get_patterns — Retrieve discovered patterns
get_strategy_adjustments — Real-time modifications
get_memory_stats — Memory dashboard
search_memory — Semantic search across layers
MIT Licensed — Open source, forever

Give your AI agent
a memory.
36 tests passing. MIT licensed. 5-minute setup.