loading…
Search for a command to run...
loading…
Structured 3-layer memory system (trades → patterns → strategy) for AI trading agents. Supports MT5, Binance, and Alpaca.
Structured 3-layer memory system (trades → patterns → strategy) for AI trading agents. Supports MT5, Binance, and Alpaca.
PyPI Tests MCP Tools Smithery License: MIT
Getting Started | Use Cases | API Reference | OWM Framework | 中文版
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 SHA-256 tamper-proof audit trail.
Used in production by traders running pre-flight checklists before every position, and by EA systems logging thousands of decisions daily.
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.
pip install tradememory-protocol
Add to Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"tradememory": {
"command": "uvx",
"args": ["tradememory-protocol"]
}
}
}
Then tell Claude: "Record my AAPL long at $195 — earnings beat, institutional buying, high confidence."
# Claude Code
claude mcp add tradememory -- uvx tradememory-protocol
# From source
git clone https://github.com/mnemox-ai/tradememory-protocol.git
cd tradememory-protocol && pip install -e . && python -m tradememory
# Docker
docker compose up -d
Full walkthrough: Getting Started (Trader Track + Developer Track)
| US Equity Trader | Forex EA System | Compliance Team | |
|---|---|---|---|
| Market | Stocks (AAPL, TSLA, ...) | XAUUSD (Gold) | Multi-asset |
| How | Pre-flight checklist before every trade | Automated sync from MT5 | Full decision audit trail |
| Key value | Discipline system — memory before every decision | Record why signals were blocked, not just executed | SHA-256 tamper-proof records for regulators |
| Details | Read more → | Read more → | Read more → |
remember_trade writes to five memory layers: episodic, semantic, procedural, affective, and trade records| Category | Tools | Description |
|---|---|---|
| Memory | remember_trade · recall_memories |
Record and recall trades with outcome-weighted scoring |
| State | get_agent_state · get_behavioral_analysis |
Confidence, drawdown, streaks, behavioral patterns |
| Planning | create_trading_plan · check_active_plans |
Prospective plans with conditional triggers |
| Risk | check_trade_legitimacy |
5-factor pre-trade gate (full / reduced / skip) |
| Audit | export_audit_trail · verify_audit_hash |
SHA-256 tamper detection + bulk export |
| Category | Tools |
|---|---|
| Core Memory | get_strategy_performance · get_trade_reflection |
| OWM Cognitive | remember_trade · recall_memories · get_behavioral_analysis · get_agent_state · create_trading_plan · check_active_plans |
| Risk & Governance | check_trade_legitimacy · validate_strategy |
| Evolution | evolution_fetch_market_data · evolution_discover_patterns · evolution_run_backtest · evolution_evolve_strategy · evolution_get_log |
| Audit | export_audit_trail · verify_audit_hash |
REST API: 35+ endpoints for trade recording, reflections, risk, MT5 sync, OWM, evolution, and audit. Full reference →
| Community | Pro | Enterprise | |
|---|---|---|---|
| Price | Free | $29/mo (Coming Soon) | Contact Us |
| MCP tools | 17 tools | 17 tools | 17 tools |
| Storage | SQLite, self-hosted | Hosted API | Private deployment |
| Dashboard | — | Web dashboard | Custom dashboard |
| Compliance | Audit trail included | Audit trail included | Compliance reports + SLA |
| Support | GitHub Issues | Priority support | Dedicated support |
| Get Started → | Coming soon | [email protected] |
Building a trading AI agent and want battle-tested memory architecture?
Free 30-min strategy call — we'll map your agent's memory needs and design guardrails for your specific workflow.
[email protected] | Book a call
We've helped traders build pre-flight checklists, connect MT5/Binance, and design custom guardrails for forex, equities, and crypto.
Every trading decision your agent makes — including decisions not to trade — is recorded as a Trading Decision Record (TDR), SHA-256 hashed at creation for tamper detection.
| 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 Logging | Systematic logging of every AI action | Automatic per-decision TDR with structured JSON |
# Verify any record hasn't been tampered with
GET /audit/verify/{trade_id}
# → {"verified": true, "stored_hash": "a3f8c9...", "computed_hash": "a3f8c9..."}
# Bulk export for regulatory submission
GET /audit/export?strategy=VolBreakout&start=2026-03-01&format=jsonl
Need a custom deployment for your fund? → [email protected]
TradeMemory's OWM framework is grounded in cognitive science (Tulving 1972) and reinforcement learning (Schaul et al. 2015). Current status:
| Doc | Description |
|---|---|
| Getting Started | Install → first trade → pre-flight checklist |
| Use Cases | 3 real-world production scenarios |
| API Reference | All REST endpoints |
| OWM Framework | Outcome-Weighted Memory theory |
| Architecture | System design & layer separation |
| Tutorial | Detailed walkthrough |
| MT5 Setup | MetaTrader 5 integration |
| Research Log | Evolution experiments & data |
| Failure Taxonomy | 11 trading AI failure modes |
| 中文版 | Traditional Chinese |
See Contributing Guide · Security Policy
MIT — see LICENSE. For educational/research purposes only. Not financial advice.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mnemox-ai-tradememory-protocol": {
"command": "npx",
"args": []
}
}
}