Decision audit trail + persistent memory for AI trading agents. Outcome-weighted recall, tamper-evident SHA-256 chain with RFC 3161 anchoring, 20 MCP tools.
$ npx -y skills add mnemox-ai/tradememory-protocol --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
What's inside
Getting Started | Use Cases | API Reference | OWM Framework | Limitations | δΈζη
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.
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-evident 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 Β· compute_dqs |
| Evolution | evolution_fetch_market_data Β· evolution_discover_patterns Β· evolution_run_backtest Β· evolution_evolve_strategy Β· evolution_get_log |
| Audit | export_audit_trail Β· verify_audit_hash Β· verify_audit_chain Β· get_daily_root |
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 | 20 tools | 20 tools | 20 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 | dev@mnemox.ai |
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.
dev@mnemox.ai | 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). 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 | Linked SHA-256 chain + daily Merkle roots (RFC 3161 TSA in Phase 1.5) |
# 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
TRADEMEMORY_TSA=off). Nothing else leaves your machine.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.
.devcontainer/
devcontainer.json
.dockerignore
.env.example
.github/
CONTRIBUTING.md
DISCUSSION_TEMPLATE/
ideas.yml
q-and-a.yml
show-and-tell.yml
ISSUE_TEMPLATE/
bug_report.yml
config.yml
feature_request.yml
question.yml
PULL_REQUEST_TEMPLATE.md
SECURITY.md
workflows/
ci.yml
live-executor.yml
publish.yml
registry-publish.yml
.gitignore
.pre-commit-config.yaml
.skills/
strategy-validator/
SKILL.md
tradememory/
scripts/
install.sh
setup_mt5.sh
SKILL.md
AGENTS.md
alembic/
alembic.ini
env.py
README
script.py.mako
versions/
001_initial_schema.py
002_add_vector.py
003_recall_events.py
assets/
before-after-dark.png
before-after-light.png
before-after-zh-dark.png
before-after-zh-light.png
evolution-zh.png
evolution.png
fb_post_whale_fingerprint.md
generate_evolution_zh.html
generate_evolution.html
generate_header_zh.html
generate_header.html
generate_l1l2l3.html
generate_memory-pipeline_zh.html
generate_owm-factors_zh.html
generate_owm.html
generate_schema_zh.html
generate_schema.html
generate_whale_compare.html
header-zh.png
header.png
hero-dark.png
hero-light.png
hero-zh-dark.png
hero-zh-light.png
memory-pipeline-zh.png
memory-pipeline.png
owm-architecture-dark.png
owm-architecture-light.png
owm-architecture-zh-dark.png
owm-architecture-zh-light.png
owm-factors-zh.png
owm-factors.png
schema-zh.png
schema.png
screenshots/
demo-full.txt
demo-l1.txt
demo-l2.txt
demo-l3.txt
whale_compare.png
CHANGELOG.md
CLAUDE.md
dashboard/
.env.production
.gitignore
eslint.config.js
index.html
package-lock.json
package.json
public/
vite.svg
README.md
requirements.txt
src/
api/
.gitkeep
client.ts
hooks.ts
types.ts
App.tsx
assets/
react.svg
components/
cards/
.gitkeep
BayesianBeliefs.module.css
BayesianBeliefs.tsx
MetricCard.module.css
MetricCard.tsx
ReflectionCard.module.css
ReflectionCard.tsx
charts/
.gitkeep
AdjustmentTimeline.module.css
AdjustmentTimeline.tsx
ConfidenceCalibration.tsx
ConfidenceCalibration.web.tsx
DreamComparison.tsx
DreamComparison.web.tsx
EquityCurveChart.tsx
EquityCurveChart.web.tsx
MemoryGrowth.tsx
MemoryGrowth.web.tsx
OWMScoreTrend.module.css
OWMScoreTrend.tsx
OWMScoreTrend.web.tsx
ResonanceGauge.module.css
ResonanceGauge.tsx
ResonanceGauge.web.tsx
RollingMetricsChart.tsx
RollingMetricsChart.web.tsx
StrategyHeatmap.module.css
StrategyHeatmap.tsx
StrategyHeatmap.web.tsx
layout/
.gitkeep
Nav.module.css
Nav.tsx
PageShell.module.css
PageShell.tsx
Sidebar.module.css
Sidebar.tsx
ui/
.gitkeep
ChartTooltip.module.css
ChartTooltip.tsx
EmptyState.module.css
EmptyState.tsx
ErrorState.module.css
ErrorState.tsx
Skeleton.module.css
Skeleton.tsx
hooks/
useScrollReveal.ts
i18n/
en.ts
index.ts
zh-TW.ts
main.tsx
mock/
.gitkeep
adjustments.json
beliefs.json
confidence-cal.json
dream-results.json
equity-curve.json
evolution.json
memory-growth.json
overview.json
owm-score-trend.json
reflections.json
rolling-metrics.json
strategy-im.json
strategy-pb.json
strategy-vb.json
pages/
.gitkeep
DreamsPage.module.css
DreamsPage.tsx
EvolutionPage.module.css
EvolutionPage.tsx
IntelligencePage.module.css
IntelligencePage.tsx
OverviewPage.module.css
OverviewPage.tsx
ReflectionsPage.module.css
ReflectionsPage.tsx
StrategiesPage.module.css
StrategiesPage.tsx
theme/
.gitkeep
components.css
global.css
variables.css
utils/
csvExport.ts
formatRelativeTime.ts
tsconfig.app.json
tsconfig.json
tsconfig.node.json
vite.config.ts
data/
sample_xauusd_m15.csv
whale_0x7a16fF_trades.csv
deploy/
Caddyfile
docker-compose.hosted.yml
docker-compose.yml
Dockerfile
docs/
adr/
001-owm-multiplicative-scoring.md
002-sqlite-over-postgres.md
003-mcp-protocol-choice.md
004-evolution-statistical-gates.md
anti-resonance-package.md
API.md
ARCHITECTURE.md
article-adding-memory-to-ea.md
AWESOME_LISTS.md
BEFORE_AFTER.md
blog-cover.png
blog-evolution-experiment-zh.md
blog-evolution-experiment.md
blueprint.docx
DAILY_REFLECTION_SETUP.md
deployment.md
example_strategy_prompt.md
EXECUTION_LOG.md
generate_cover.py
GETTING_STARTED.md
hosted-api-spec.md
MT5_SYNC_SETUP.md
MT5_SYNC_V3.md
OWM_FRAMEWORK.md
QUICK_START.md
README_ZH.md
REFLECTION_ENGINE_GUIDE.md
REFLECTION_FORMAT.md
research/
RESEARCH_LOG.md
arxiv-paper-behavioral-drift.html
arxiv-paper-behavioral-drift.md
arxiv-paper-behavioral-drift.pdf
build_arxiv_pdf.py
owm-technical-article.md
self-calibrating-agent-research-report.md
validation_step1_results.json
validation_step2_results.json
validation_step3_results.json
validation_step4_results.json
ROADMAP.md
SCHEMA.md
social-preview.png
specs/
2026-03-25-mcp-onboarding-design.md
ssrt-phase2-spec.md
ssrt-spec.md
superpowers/
plans/
2026-04-05-readme-rewrite.md
2026-07-14-policy-evolution-plane-implementation.md
specs/
2026-04-05-readme-rewrite-design.md
2026-07-14-policy-evolution-plane-design.md
TDR_SPEC_v1.md
trading-ai-failure-taxonomy.md
TUTORIAL_ZH.md
TUTORIAL.md
USE_CASES.md
validation/
VALIDATION_RESULTS.md
ablation_comparison.png
baseline_distribution.png
time_bias_hourly.png
walk_forward_windows.png
glama.json
hosted/
__init__.py
server.py
LICENSE
LIMITATIONS.md
llms.txt
pyproject.toml
README.md
render.yaml
requirements.txt
research/
level2/
analyze.py
baselines_clean.py
compare_maxdd.json
compare_maxdd.py
cusum_agent.py
h_sensitivity_sync.py
h_sensitivity.json
h_sensitivity.py
maxdd_baseline.py
results.json
RESULTS.md
robustness_no_btc1h.json
robustness_without_btc1h.py
run_matrix.py
README.md
requirements.txt
scripts/
analyze_trader.py
backfill_audit_chain.py
daily_reflection.py
demo.py
export_mt5_csv.py
generate_index.py
live_executor.py
mt5_sync_v3.py
mt5_sync.py
platform/
IndexGenerator_AutoStart.xml
install_autostart.bat
install.sh
MT5SyncV3_AutoStart.xml
run_index_generator.bat
start_daily_reflection.bat
start_mt5_sync_v3.bat
start_services.bat
start_trade_adapter.bat
start_tradememory.pyw
stop_services.bat
TradeMemory_AutoStart.xml
watchdog_mt5_sync.bat
requirements-live.txt
research/
analyze_defi_behavior.py
binance_sync.py
check_mt5.py
compare_defi_fingerprints.py
daily_monitor.py
daily_review.py
dashboard.py
evolution_binance_test.py
evolution_demo.py
evolution_live_test.py
experiment_memory_injection.py
experiment_memory_oos.py
experiment_permutation_test.py
export_backtest_trades.py
fb_screenshot.py
fetch_whale_trades.py
generate_backtest_mock.py
generate_readme_assets_zh.py
generate_readme_assets.py
generate_screenshots.py
generate_validation_charts.py
migrate_sqlite_to_pg.py
migrate_strategy_names.py
output/
defi_fingerprint.json
fingerprint_comparison.json
parse_batch_results.py
phase4_results.json
phase4_results.md
phase5_results.json
phase5_results.md
program.md
random_baseline_demo.py
record_demo.py
replay_monitor.py
run_b1_stability.py
run_b2_transfer.py
run_extended_oos.py
run_grid_wfo.py
run_llm_step0.py
run_llm_wfo.py
run_phase4.py
run_phase5.py
run_real_baseline.py
run_time_bias_test.py
run_walk_forward.py
seed_backtest_trades.py
ssrt_experiments.py
trade_advisor.py
validate_l2_patterns.py
weekly_report.py
strategy_definitions.py
trade_adapter.py
server.json
skills/
binance-skills-hub/
trade-memory/
SKILL.md
tradememory-bridge/
SKILL.md
smithery.yaml
src/
tradememory/
__init__.py
adaptive_risk.py
audit/
... 229 moreFAQ
tradememory-protocol is a Claude Code plugin with 5 hand-picked skills for data work, indexed on Flowy. Install it with the command on its page. It includes trade-memory, tradememory-bridge, evolution-engine. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.