TradeMemory Protocol
Persistent trading-agent memory with risk checks and a tamper-evident decision trail.
- Source repo
- mnemox-ai/tradememory-protocol
- Stars
- ★ 1.5k
- Last updated
- 1mo ago v0.5.6
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 74/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformClaude Code · Claude.ai
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A US-equity trader runs recall and a pre-flight checklist before each AAPL or TSLA position to surface outcomes from similar prior setups.
- Not a fit if
- Teams wanting a vendor-hosted service instead of self-hosting
- Users expecting active feature development; the project is in maintenance mode
- Compliance teams needing external anchoring or zkML proof, absent in v0.5.2
- Website
- mnemox.ai/tradememory ↗ set on GitHub
- Maintenance
- Commits in the last 6 monthslast commit 2026-10-09latest release v0.5.6 (2026-10-02)
- Source review
- 74/100 · Some gaps
What does this agent do, and when should you use it?
TradeMemory Protocol is a self-hosted memory and audit layer for agents trading stocks, forex, crypto, or futures; it does not execute orders, access wallets, or move funds. Its 20 MCP tools and 35-plus REST endpoints record both trades and decisions not to trade across episodic, semantic, procedural, affective, and trade-record memory layers. Before a position is opened, an agent can recall prior cases using outcome quality, contextual similarity, recency, confidence, and emotional state, then inspect drawdown, streaks, behavior, and active plans. The audit subsystem assigns SHA-256 content hashes, maintains a forward-linked ledger and daily Merkle roots, and supports record, chain-slice, full-chain, and export workflows. It can be installed from PyPI, source, or Docker and has documented Claude Desktop and Claude Code setup, but the project entered maintenance mode in August 2026 with no new features or hosted service planned.
Before a trade, recall_memories retrieves outcome-weighted historical cases, while get_agent_state and get_behavioral_analysis return confidence, drawdown, streak, and behavioral information. check_trade_legitimacy applies a five-factor pre-trade gate that can return full, reduced, or skip, and create_trading_plan plus check_active_plans manage conditional prospective plans. After a trade, remember_trade updates episodic, semantic, procedural, affective, and trade-record storage in one operation; get_strategy_performance, get_trade_reflection, validate_strategy, and compute_dqs expose performance, reflection, and statistical-validation workflows. The evolution group—evolution_fetch_market_data, evolution_discover_patterns, evolution_run_backtest, evolution_evolve_strategy, and evolution_get_log—fetches data, discovers patterns, backtests, evolves strategies, and reports its log, although this component remains research-stage. export_audit_trail, verify_audit_hash, verify_audit_chain, and get_daily_root produce audit exports and verify individual hashes, linked sequences, or daily Merkle roots. The service reads and stores decision context supplied by another agent; broker execution remains outside its boundary.
- A US-equity trader runs recall and a pre-flight checklist before each AAPL or TSLA position to surface outcomes from similar prior setups.
- A team operating a MetaTrader 5 forex EA synchronizes thousands of decisions and records why signals were blocked as well as which orders were executed.
- A multi-asset compliance team retains Trading Decision Records for actions and no-trade decisions, then exports a verifiable decision history for review.
- A strategy researcher uses reflections, DSR, MBL, pattern discovery, and backtesting to investigate strategy decay while treating the evolution engine as research-stage.
- A trading-agent developer adds durable memory, behavioral monitoring, and a risk gate to an existing execution stack through MCP or REST without granting this service order permissions.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install tradememory-protocoldocker compose up -d
- Config files
claude_desktop_config.json- Install notes cover
- Docker
How do you install or deploy this agent?
A working Python command environment is required, although the supplied material does not state a minimum Python version. No broker, exchange, wallet, or trading API credentials are required. Install from PyPI with:
pip install tradememory-protocolFor Claude Desktop, add this to claude_desktop_config.json:
{"mcpServers":{"tradememory":{"command":"uvx","args":["tradememory-protocol"]}}}
For Claude Code, run:
claude mcp add tradememory -- uvx tradememory-protocolTo install from source:
git clone https://github.com/mnemox-ai/tradememory-protocol.git
cd tradememory-protocol && pip install -e . && python -m tradememoryThe documented container startup command is:
docker compose up -dHow do you use this agent?
After configuring the MCP server, a first supported interaction in Claude is: “Record my AAPL long at $195 — earnings beat, institutional buying, high confidence.” This supplies context for remember_trade. Before the next decision, call recall_memories for comparable market conditions and combine it with get_agent_state, check_active_plans, and check_trade_legitimacy for state, plan, and risk checks. After closing or resolving a trade, call remember_trade again with its outcome, then use get_trade_reflection or get_behavioral_analysis during scheduled reviews. For integrity checks, verify_audit_hash(trade_id="MT5-7047640363") checks one record, verify_audit_chain(from_seq=1, to_seq=None) walks the complete chain, and get_daily_root(date="2026-05-14") checks a day's root. A bulk regulatory export is documented as GET /audit/export?strategy=VolBreakout&start=2026-03-01&format=jsonl.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
FARS trust-control audit
- data-flow disclosure
What are this agent's strengths and limitations?
- One interface combines pre-trade recall, post-trade recording, behavioral analysis, risk gating, and audit operations across 20 MCP tools and a REST API.
- The audit model covers no-trade decisions as well as executed trades and supports integrity checks at individual-record, chain-range, and daily-root levels.
- Its local-first boundary excludes broker credentials, wallet access, order execution, and fund movement, limiting the privileges entrusted to the memory service.
- The documented deployment and integration paths include PyPI, source installation, Docker, MT5, Claude Desktop, and Claude Code.
- Recall considers outcome quality, context similarity, recency, confidence, and emotional state instead of relying solely on keywords or chronological retrieval.
- As of August 2026, the repository is in maintenance mode: bug and security reports are reviewed, but new features and a hosted service are not planned.
- Empirical validation is still limited; the supplied evidence reports 40 trades against a target of at least 100 for statistical significance.
- The evolution engine remains research-stage, with strategy generation working but statistical-gate pass rates still under optimization.
- Audit maturity has important limits: the material identifies TSA timestamping, external anchoring, and zkML proof of inference as absent from v0.5.2, so linked hashes should not be treated as a complete external proof system.
- Adopters must operate the service themselves, and the supplied documentation does not specify a minimum Python version, storage sizing guidance, or a disaster-recovery procedure.
How does this agent compare with similar options?
Compared with trading MCP servers centered on order placement, price retrieval, or chart access, TradeMemory is a companion memory and audit layer. It records decision context, recalls prior outcomes, and verifies record integrity, but it does not replace a broker adapter, execution engine, or fund-management system.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| TradeMemory Protocol This agent | 74 · Some gaps | MCP serverFree | ★ 1.5k | 1mo ago | Python | Claude Code · Claude.ai |
| Vibe-Trading | 68 · Some gaps | CLIFree + model costs | ★ 40k | 1d ago | Python | OpenAI API · Claude API |
| QuantDinger AI Trading OS | 64 · Some gaps | Self-hosted serviceFree + model costs | ★ 14k | 2d ago | Python | Codex · Claude Code · OpenAI API |
| Nocturne Memory: Long-Term Memory Server for MCP Agents | 63 · Some gaps | MCP serverFree | ★ 1.4k | 29d ago | Python | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The README and SKILL describe local SQLite storage, credential handling, TSA hash requests, and other outbound calls. The proxy defaults to refusing orders it cannot evaluate and requires approval of exact terms for orders above its threshold, supporting concrete credit for least privilege, confirmation, and data-flow transparency. Deductions: memory and sync actions lack a general confirmation or rollback path, and dependency versions are not locked. The MIT license and author information are visible, but publisher identity is unverified and maintenance responsibility is only partly specified.
The code and documentation specify Python and optional-dependency boundaries, while the CLI provides readable errors for missing data, approval state, and corrupt state; the README also discloses research and validation limits. Deductions: dependencies are expressed mostly as broad version ranges, the packet cannot establish their availability or consistency across all documentation, and static evidence cannot confirm complete runtime failure handling.
The README and getting-started guide address traders and developers, with multiple markets, integrations, and scenarios. The proxy documents refusal conditions, supported scope, and unsupported order types. Deductions: some capability descriptions are distributed across the README, SKILL, and integration documents; trigger behavior is described concretely, but the packet cannot show that every invocation context is recognized precisely.
The documentation is well organized and includes installation, configuration, API, tutorials, use cases, limitations, and contribution guidance. It provides install commands, platform examples, an MIT license, and research limitations. Deductions: examples describe different server modes and ports, leaving some naming and capability details dispersed; version information and recent changes appear, but release history is incomplete, and maintenance responsibility is described mainly through the security-reporting channel and maintenance-mode statement.
Examples show recall results, behavioral state, audit verification, and exportable records that can guide follow-up actions. Local memory, outcome-weighted recall, and the policy brake offer a distinct stated value. Deductions: empirical evidence for that value is limited; the README reports only 14 trades and says this is insufficient to draw conclusions. Deployment, maintenance, and external-service costs are not fully quantified.
The README links claims to API, architecture, limitations, and research documentation; test configuration explicitly disables TSA network requests during tests. The product distinguishes descriptive statistics, research-stage features, and non-compliance claims. Deductions: referenced documents are not all included in this packet, and some performance or live-use claims are supported only by the README, without independent corroboration in the supplied material; they are not treated as independently verified.
- This project handles trading memory and an optional order proxy. The documentation labels the evolution engine and DQS as research-stage, and says the empirical sample is too small to support conclusions. Do not treat memory rankings, statistical analysis, or audit logs as investment advice, compliance certification, or a guarantee of returns.
- Before using the proxy, check the policy, account, order limits, credential file, and actual upstream MCP server. The documentation says unevaluable orders are refused, but the supplied material cannot establish proxy behavior in every runtime environment.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
v0.5.6 v0.5.6 — sync your own history, losses first
Release notes excerpt
TradeMemory now pulls in your own fills, shows where your history loses money, and puts those losing trades in front of your agent before the next order. ```bash pip install -U tradememory-protocol Hyperliquid: public fills, no key needed tradememory sync hyperliquid --address 0xYourAddress Alpaca: read-only calls with your own keys, kept in a local file tradememory sync alpaca --env-file ~/.secrets/alpaca.env ``` Added …View on GitHub ↗ -
v0.5.5 v0.5.5 — SPA path containment security hotfix
Release notes excerpt
Security hotfix for the dashboard SPA catch-all route (GitHub issue #13). - SPA static path is now bounded to dashboard/dist — the catch-all in server.py checked containment with a plain string startswith, which has no path-component boundary: a sibling directory whose name merely shares the prefix (dist-x/) passed the check. Containment is now Path.is_relative_to in a dedicated _resolve_static_file helper. Paths that escape the dist root return 404 as before; client-side routes still fall back to index.html. …View on GitHub ↗ -
v0.5.4 v0.5.4 — anchoring integrity hotfix
Release notes excerpt
Same-day hotfix for three critical gaps an adversarial review found in the v0.5.3 anchoring path: - Rebuilds no longer destroy existing anchors — tsa_token is preserved when the recomputed root is identical, dropped only when the underlying data actually changed. - TSA rejections can no longer masquerade as anchors — PKIStatus is now verified; explicit rejections raise instead of being stored as proof. …View on GitHub ↗
FAQ
Does it receive access to my trading account or funds?
Is it paid, and is there a hosted edition?
Does the hash trail prove that a model actually performed the claimed inference?
Can recall work without an embeddings provider?
Should this be adopted as a complete strategy-generation and execution platform?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.