DEV Community

Sean  |   Mnemox
Sean | Mnemox

Posted on

Your agent placed the trade. Can you prove why it did?

TradeMemory Protocol

Robinhood opened agentic trading to the public in May. Over 70,000 accounts are already in the beta: you connect Claude, ChatGPT, Codex, or Cursor to their MCP endpoint, and your agent can place real equity and crypto orders on your behalf.

Here is the part of the terms nobody quotes: "You are responsible for reviewing account activity, monitoring positions, and ensuring the agent is operating as intended."

You are responsible. But look at what the platform actually records: orders. get_equity_orders, get_pnl_trade_history — fills, timestamps, prices. Nowhere in the trading API is there a record of why the agent did anything. The reasoning that produced the order evaporates when the context window closes.

That gap stops being academic on July 31. Seven members of the House Financial Services Committee sent the SEC a letter asking exactly this question about agentic trading — investor protection, broker-dealer responsibility, who answers when an autonomous agent loses someone's money — and the SEC's response deadline is this week.

Everyone is already hand-rolling the fix

Read the build logs of people actually running agent traders and a pattern jumps out:

  • One paper-portfolio experimenter: "The MCP server has no memory tool, so the local journal is what gives the experiment continuity. On its own, each run starts fresh."
  • A multi-agent builder put it better: "A committee with no memory is just four strangers meeting for the first time every hour."
  • My favorite: one builder reported that Claude, unprompted, created a markdown trade log on its own and started recording every decision. The model knows it needs a memory even when the stack doesn't provide one.

And the performance data says the stakes are real. Bloomberg's reporting on AI trading bots with real money: mostly losing. An Arcada Labs / Harvard experiment gave frontier models $10k each to trade autonomously for 57 days: every single one lost money. An agent with no memory of its last mistake repeats it on schedule.

Markdown files are a start. But a hand-rolled journal has two problems: the agent can quietly rewrite its own history, and nothing about "notes.md" survives a compliance question.

The missing layer, not a replacement platform

I maintain TradeMemory, an open-source (MIT) MCP server that adds the layer the execution platforms skip. Design constraints, in order:

  1. It never touches your orders, your funds, or your keys. It records and recalls. Your execution MCP (Robinhood's, TradeStation's, your broker's) stays exactly as it is. If you have read the HN threads about agent-trading setups, you know credential handling is the thing people rightly fear — a memory layer has no business being anywhere near your login.
  2. Recall is weighted by outcome, not recency. Before a trade, the agent asks "what happened the last times I was in this spot?" and the losses it took in similar conditions come back first. That is the difference between a journal and a memory.

How outcome-weighted recall scores a memory

  1. The record is tamper-evident, and by default externally anchored. Every decision is SHA-256 hash-chained; each UTC day gets a Merkle root; and since v0.5.3 that root is timestamped by an independent RFC 3161 authority automatically. What leaves your machine is a 32-byte hash — never trade data. You do not have to trust my clock, or yours, or the agent's.

Wiring it up next to Robinhood's MCP (two minutes)

Both connectors side by side in Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "robinhood-trading": {
      "url": "https://agent.robinhood.com/mcp/trading"
    },
    "tradememory": {
      "command": "uvx",
      "args": ["tradememory-protocol"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Or Claude Code:

claude mcp add robinhood-trading --transport http https://agent.robinhood.com/mcp/trading
claude mcp add tradememory -- uvx tradememory-protocol
Enter fullscreen mode Exit fullscreen mode

Then the loop you actually want, stated once in your agent's instructions:

Before any order: call recall_memories for this symbol and current conditions, and check_trade_legitimacy for the strategy. After any fill: call remember_trade with the full reasoning, and record the outcome when the position closes.

From then on, every gate check, every warning (losing streak, drawdown, overconfidence), and every decision lands in an append-only local store you can audit:

verify_audit_chain()      → walks the whole hash chain, reports the first break
get_daily_root("2026-07-28") → one 32-byte root proving that day's records,
                                RFC 3161 token attached
export_audit_trail()      → JSONL of every decision record, ready for review
Enter fullscreen mode Exit fullscreen mode

If anything — you, the agent, a bug — edits a historical record, the chain breaks loudly at that exact sequence number.

What this is not

Honesty section, because trading tools attract inflated claims:

  • This does not make an agent profitable. Our own published experiments show a plain drawdown stop beats our behavioral-monitoring algorithm at pure drawdown control. The value is the memory loop and the evidence trail, not alpha.
  • Local-first means the audit trail is as durable as your disk. Anchoring proves when records existed; backups are still your job.
  • The full list of what is and is not validated lives in LIMITATIONS.md — read it before you rely on anything.

The SEC will answer the committee this week, and whatever it says, the direction is set: autonomous trading is going to need decision records the same way broker-dealers need order records. The execution platforms store the what. Somebody has to store the why — and it should be a layer you control, on your machine, that nobody (including its author) can quietly rewrite.


Disclosure: I built TradeMemory. It is MIT-licensed, local-first, and free; a hosted tier is planned. Nothing here is investment advice — my own research says the honest version of that sentence is "agents lose money without a memory, and mine only fixes the memory part."

Top comments (0)