The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Tradememory Protocol
Decision audit trail + persistent memory for AI trading agents. Outcome-weighted recall, tamper-evident SHA-256 chain with RFC 3161 anchoring, 20 MCP tools.
Install
claude mcp add tradememory -- uvx tradememory-protocolInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Getting Started | Use Cases | API Reference | OWM Framework | Limitations | 中文版
TradeMemory remembers what it cost. It is an open-source, local-first memory and brake for AI trading agents: it pulls in your fills, finds where your own history loses money, puts those losing trades in front of your agent before the next order, and can refuse an order that breaks rules you set, before it reaches the broker.
Brokers now let AI agents trade over MCP, with different guardrails: Webull and tastytrade set size or buying-power limits, Interactive Brokers only lets the agent draft an order for you to submit, and Robinhood and Public set no cap you can impose on an external agent (StockBrokers, 2026-09-30). The caps are fixed numbers. None of them looks at how your own past trades went.
Start with your own history
pip install 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
Each closed trade is stored in memory once; running it again stores only new trades. Then it prints where your history loses money. The format, with illustrative numbers:
After 2 losses in a row (20 trades):
5 of them (25%) were 1.5x your usual size or more.
All 20 won 60% and made -$1,500.
The 5 sized-up trades won 20% and made -$1,700.
Median hold: winners 1.5h, losers 9.0h.
These are descriptive statistics of your own past trades, not advice about the next one. Hyperliquid's API serves only an address's recent fills, not its whole history, so the sooner it is synced, the more history is kept. Other venues: MT5 and Binance spot sync scripts are in scripts/, and any agent can record a trade with remember_trade.
Before the next order
recall_memories(order="losses_first") puts every losing trade ahead of the rest, the bigger losses in similar conditions first, with their size and P&L. Besides the symbol's most recent trades, it searches the symbol's recent losing trades, so an older loss is not crowded out. The server tells connected agents to call it before proposing a trade. The default order ranks better outcomes higher (by R multiple, where one was recorded) and keeps at least 20% losses in the list.
Connect your agent
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 / Cursor / Docker
# 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)
Put a brake in front of your broker (preview)
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface