Your trading AI has amnesia. And regulators are starting to notice.
It makes the same mistakes every session. It can't explain why it traded. It forgets everything when the context window ends. Meanwhile, MiFID II is raising the bar for algorithmic decision documentation (Article 17). The EU AI Act demands systematic logging of AI actions (Article 14). Your competitors' agents are learning from every trade.
The AI trading stack is missing a layer. Every MCP server handles execution — placing orders, fetching prices, reading charts. None handle memory.
Your agent can buy 100 shares of AAPL but can't answer: "What happened last time I bought AAPL in this condition?"
TradeMemory is the memory layer. One pip install, and your AI agent remembers every trade, every outcome, every mistake — with a SHA-256 tamper-evident audit trail.
Used in production by traders running pre-flight checklists before every position, and by EA systems logging thousands of decisions daily.
What it does
Before trading: ask your memory — what happened last time in this market condition? How did it end?
After trading: one call records everything — five memory layers update automatically
Safety rails: confidence tracking, drawdown alerts, losing streak detection — the system tells you when to stop
Works with any market (stocks, forex, crypto, futures), any broker, any AI platform. TradeMemory doesn't execute trades or touch your money — it only records and recalls.
Quick Start
pip install tradememory-protocol
Add to Claude Desktop (claude_desktop_config.json):
Recall — Before trading, retrieve past trades weighted by outcome quality, context similarity, recency, confidence, and emotional state (OWM Framework)
Record — After trading, one call to remember_trade writes to five memory layers: episodic, semantic, procedural, affective, and trade records
We've helped traders build pre-flight checklists, connect MT5/Binance, and design custom guardrails for forex, equities, and crypto.
Enterprise & Compliance
Every trading decision your agent makes — including decisions not to trade — is recorded as a Trading Decision Record (TDR). Per-record SHA-256 content hashes are linked into a forward-chained audit ledger; every UTC day is summarised by a Merkle root which itself chains across days. Tampering with any historical record invalidates every subsequent link.
Regulation
Requirement
TradeMemory Coverage
MiFID II Article 17
Record every algorithmic trading decision factor
Full decision chain: conditions, filters, indicators, execution
EU AI Act Article 14
Human oversight of high-risk AI systems
Explainable reasoning + memory context for every decision
EU AI Act Article 12
Automatic, tamper-resistant logs over system lifetime
# Verify a single record hasn't been tampered with
verify_audit_hash(trade_id="MT5-7047640363")
# → {"verified": true, "chain_entry": {"sequence_num": 42, ...}}# Walk the entire chain (or a slice) end-to-end
verify_audit_chain(from_seq=1, to_seq=None)
# → {"verified": true, "checked_count": 1284, "first_break_at": null}# Daily Merkle root — single 32-byte anchor over every TDR for that day
get_daily_root(date="2026-05-14")
# → {"verified": true, "root_hash": "a05544...", "record_count": 18}# Bulk export for regulatory submission
GET /audit/export?strategy=VolBreakout&start=2026-03-01&format=jsonl
See LIMITATIONS.md for the full audit-chain maturity statement, including what's not in v0.5.2 yet (TSA timestamping, external anchoring, zkML proof of inference).
Need a custom deployment for your fund? → dev@mnemox.ai
Security
Never touches API keys. TradeMemory does not execute trades, move funds, or access wallets.
Read and record only. Your agent passes decision context to TradeMemory. It stores it. That's it.
Local-first. The only outbound call is RFC 3161 trusted timestamping of daily audit roots — a 32-byte hash, no trade data (on by default; disable with TRADEMEMORY_TSA=off). Nothing else leaves your machine.
SHA-256 chained audit ledger. Every record is hashed at creation and linked to the previous record. Daily Merkle roots anchor the chain. Verify integrity at the record, slice, or day level. Tampering is detectable at every level; external anchoring (TSA by default) is on the roadmap.
1,400+ tests passing. Full test suite with CI.
Research Status
TradeMemory's OWM framework is grounded in cognitive science (Tulving 1972)
and reinforcement learning (Schaul et al. 2015). Current status:
Decision audit trail + persistent memory for AI trading agents. SHA-256 tamper detection, outcome-weighted recall, strategy evolution via MCP.
We found that tradememory-protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.