Docs

Connect an agent to Memoria.

Everything you need to give an agent long-term memory: getting a key, connecting over MCP or Python, the eight memory tools, and the rules for sharing, signatures and limits.

Try it now

Connect any MCP app with these public demo keys to see Memoria working before you have your own.

# Endpoint
https://www.memoriaagent.site/mcp
# Demo agent A
mem_7bc3decac803_k497dv56o8MU3H8HRIstwfXHlvK9Fwd_WnZM_uvLB74
# Demo agent B
mem_aeab1c37b20d_YS_FoHyUoSrtGNijAXITarN-NFOHM7Z6z9_2i3T1eQ8

Agent A shared one memory with agent B and kept one private. Search with each key to see that B finds the shared one but never A's private one.

Both demo keys are read-only: they can only use find_memory, and each returns 2 of the 3 signed sample memories.

Getting access

Sign up with your email and an account name. We email you a link, and when you open it you get two things:

  • An API key that starts with mem_, for an agent in your account called main. It's shown once, so keep it somewhere safe. We only store a hash of it and can't show it again.
  • The MCP endpoint your agents connect to: https://www.memoriaagent.site/mcp.

An account can have up to 10 agents, each with its own key: the key decides which agent a memory is saved as. Sign-up gives you the key for main. To get keys for more agents, use Get a key for another agent: we email a link to your account's address, and the new key appears when you open it.

Connect an agent

Every request sends the key as a header: Authorization: Bearer mem_.... The examples below read the address and key from the environment variables MEMORIA_URL and MEMORIA_API_KEY.

Claude Code

claude mcp add --transport http \
  memoria "$MEMORIA_URL/mcp" \
  --header \
  "Authorization: Bearer $MEMORIA_API_KEY"

Then ask in any session, for example "Check Memoria for what we know about Acme" or "Save this decision to Memoria".

Other MCP apps

Apps that connect to remote MCP servers over HTTP, such as Cursor and VS Code, take a few lines in their MCP settings. Put your real address and key in place of the values in capitals.

{
  "mcpServers": {
    "memoria": {
      "url": "https://YOUR_MEMORIA_ADDRESS/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Some apps use a slightly different settings shape; check your app's guide for remote MCP servers with custom headers.

Your own Python agent

Any MCP client works. With the official mcp Python package, version 2.3 or later:

# pip install "mcp>=2.3"
import asyncio, os
import httpx2
from mcp import ClientSession
from mcp.client.streamable_http import streamable_http_client

async def main():
    url = os.environ["MEMORIA_URL"] + "/mcp"
    auth = {"Authorization": "Bearer " + os.environ["MEMORIA_API_KEY"]}
    async with httpx2.AsyncClient(headers=auth, timeout=httpx2.Timeout(30, read=300)) as http:
        async with streamable_http_client(url, http_client=http) as (read, write):
            async with ClientSession(read, write) as memoria:
                await memoria.initialize()
                await memoria.call_tool("save_memory", {
                    "note": "Acme's contract renews on March 1.",
                    "reason": "From the signed renewal email.",
                    "topic": "customers/acme",
                    "confidence": "high",
                })
                found = await memoria.call_tool("find_memory", {"query": "When does Acme renew?"})
                print(found.content)

asyncio.run(main())

Trading agents on Rushr

If your agent trades on Rushr, it can save every trade, call and outcome to Memoria and check them before its next trade. See Give your Rushr agent a memory.

The memory tools

Memoria gives every connected agent eight tools. Agents only ever see memories they are allowed to read.

ToolWhat it doesArguments
save_memorySaves a note or decision with the reason behind it.note, reason, topic, optional confidence (low, medium, high; default medium), visibility (private or shared; default private), shared_with, source
find_memorySearches by question or keywords. Best matches first.query, optional topic, saved_by, limit (1 to 20; default 5), outcome
list_memoriesLists the memories you can read (your own and ones shared with you), newest first, without a search question. A topic includes everything under it: customers also lists customers/acme.optional topic, saved_by, limit (1 to 100; default 20), outcome
update_memoryReplaces a memory's note. The old version is kept in its history. Only the writer can do this.memory_id, new_note, reason, optional confidence, topic
share_memoryChanges who can read a memory. Only the writer can do this.memory_id, visibility, shared_with (the full new list), optional expires_in_days
delete_memoryDeletes a memory and its history for good. Only the writer can do this.memory_id
record_outcomeRecords whether a memory helped. Any agent that can read the memory can record one; recording again replaces your earlier one. Signed, and free.memory_id, result (success, failure or mixed), optional note (up to 500 characters)
get_outcomesEvery outcome recorded for a memory, newest first, each with its signature check.memory_id

Memory IDs look like mem-1a2b3c4d and come back from save_memory and find_memory. If a memory is only out of date, update it rather than deleting it, so its history is kept.

Outcomes

Outcomes record whether a memory actually helped. Every memory returned by find_memory and list_memories shows a summary: how many successes, failures and mixed results it has, the latest one, and whether their signatures checked out. Memories that helped rank a little higher and ones that failed a little lower (at most 2 places); relevance still matters most, and memories without outcomes aren't penalised. Add outcome (success, failure, mixed or none) to only get memories whose latest outcome is that.

# one agent saves, and shares with another
save_memory(note="Token X looked safe.", reason="Contract checked.",
            topic="crypto/token-x", visibility="shared", shared_with=["trader"])
# later, the other agent records what happened
record_outcome(memory_id="mem-...", result="failure", note="rugged")
# anyone who finds it now sees: failure 1, latest "rugged" (verified)

Each agent has one outcome per memory, signed with its key. Deleting a memory deletes its outcomes. The public demo keys can't record or read outcomes.

Sources

A signature shows who made a claim. A source lets readers check the claim itself. When an agent saves a memory it can add where the information came from: a URL, a transaction hash, a file name or a short note, up to 500 characters. The source is signed with the memory, so changing it breaks the signature, and it comes back with the memory every time it's found.

# saving, with a source
"note":   "Acme's contract renews on March 1.",
"reason": "From the signed renewal email.",
"topic":  "customers/acme",
"source": "acme-renewal-2026.pdf"

# what find_memory returns for it, and for a memory saved without one
"source": "acme-renewal-2026.pdf", "verification": "verified"
"source": "no source",            "verification": "verified"

A memory saved without a source is shown as "no source": you know which agent said it, but not where it came from, so the claim can't be checked. Memories saved before sources existed show "no source" too, and their signatures still verify.

Sharing

Every memory is one of two kinds:

  • Private (the default): only the agent that wrote it can find or update it.
  • Shared: the writer plus the agent IDs in shared_with, for example ["sales"]. Agents it's shared with can only read it: they can't update or delete it, or change who sees it.

Sharing only reaches agents in your own account. Each account's memories are kept apart, and your searches never look at anyone else's.

Expiring shares

To share a memory for a limited time, add expires_in_days (a whole number from 1 to 365) to share_memory, for example expires_in_days=7. After that, the agents in shared_with can no longer find, read or list it. The writer keeps full access, and the memory and its signature don't change. The end date is shown in UTC as share_expires_at in the share result and wherever the memory is shown. Leave it out and the share never expires. Sharing again without it, or making the memory private, removes the end date.

Signatures

Every saved or updated memory is signed with an Ed25519 key that belongs to the agent that wrote that version. The signature covers the memory's content and labels: its ID, account, topic, confidence, note, reason, source, writer and time. It doesn't cover sharing, so changing who can read a memory doesn't break it.

find_memory checks every signature again and reports it, for example verified: signed by researcher or NOT verified: the memory was changed after it was signed.

What a signature proves: that an agent holding that key saved the memory and that it hasn't changed since. Memoria signs on the agent's behalf after the agent proves who it is with its API key.

Search and indexing

Saving, updating and deleting answer straight away. Indexing for search by meaning happens afterwards in the background, and can take a few minutes when it's busy. While a memory waits it shows processing: true, and find_memory still finds it by the words in your question.

Indexing uses Google Gemini to read each memory. See the Privacy Policy for what that means for your data.

Limits

Early access accounts start with these limits. Going over a per-minute limit returns 429 Too Many Requests with a Retry-After time; other limits return a clear message.

WhatLimit
Requests per minute, per agent60
Requests per minute, per account120
Saves and updates per day, per account200
Memories kept, per account2,000
Agents per account10
Size of one request64 KB
Note / reason / topic / question length4,000 / 2,000 / 100 / 1,000 characters
Wrong API keys from one address10, then a 10 minute lock-out

Paying with $MEMORIA

Memoria can be paid for with the $MEMORIA token on Robinhood Chain. 1 credit = 10,000 $MEMORIA = 2 actions. These each use 1 action: save_memory, update_memory, find_memory, list_memories and get_outcomes. These are free: record_outcome, share_memory, delete_memory, get_balance, wallet_challenge, link_wallet and claim_payment. When an account has 4 actions or fewer left, every tool's result includes a short note saying so, with a link to the pay page. The account's owner is also emailed at the address used to sign up: once when the balance drops to 4 actions or fewer, and once more when it reaches 0. Adding credits resets this, so you're only emailed again after the next drop. Every account gets 10 starter credits (20 actions) once. If an action fails, its action is given back. Billing is on. Payment tools are offered, and accounts are charged as described above.

People pay on the pay page: connect a browser wallet such as MetaMask, enter your API key, choose how many credits, then approve the wallet link (a free signature) and the $MEMORIA transfer. After 20 confirmations the credits are added and the new balance is shown.

Agents pay with four tools:

ToolWhat it doesArguments
wallet_challengeReturns a one-time message (valid 10 minutes) for your wallet to sign.none
link_walletLinks the wallet that signed the message (EIP-191 personal_sign) to your account. A wallet can belong to only one account.address, signature
claim_paymentAdds credits for a $MEMORIA transfer from a linked wallet to the treasury, once it has 20 confirmations. Each payment can be claimed only once.tx_hash
get_balanceShows actions left (and as credits), linked wallets and how to pay. Free.none
  1. Call wallet_challenge and sign its exact message with your wallet.
  2. Call link_wallet with the wallet address and the signature. You only need to do this once per wallet.
  3. From that wallet, send $MEMORIA (contract 0xc84b411cae3b86eec20e9699256be7c43b17bd35) to the treasury 0x7d61Bd6D005B464C9022e1b2FAdD0F16C93E935C on Robinhood Chain (chain 4663).
  4. After 20 confirmations, call claim_payment with the transaction hash. Credits are whole: every 10,000 $MEMORIA is 1 credit, and any leftover $MEMORIA is kept on your account and added to your next payment, so nothing is lost. The minimum for a credit is 10,000 $MEMORIA.

If your agent's wallet can't sign messages (for example some smart-contract or custodial wallets), ask Memoria to link it by hand: send a direct message to @memoriaagent on X with your account name and the wallet address. To prove the wallet is yours, we'll give you a small, exact test amount of $MEMORIA (between 1 and 2) to send from it to the treasury; once that payment is on chain, the wallet is linked and the test amount counts toward your next credit. Then pay and claim as usual.

If you paid on the pay page but the credits didn't arrive (for example, the page was closed), use Claim a past payment on the pay page with the transaction hash, or have your agent call claim_payment. Only transfers made after billing started can be claimed.

When an account runs out of actions, Memoria says so and explains how to pay. Memoria only reads the chain: it never asks for a seed phrase or private key. An account can choose to show its purchases publicly at /purchases/<account>; this is off unless the account asks for it. Nothing here is an offer to sell or a promise of any return.

Good practice

  • Write notes that make sense on their own, and say why in reason. Future agents won't have today's context.
  • Use short, consistent topics such as customers/acme or project/website, so searches can filter by them.
  • Never save passwords, API keys or other secrets in a memory.
  • Keep each agent's key in that agent's environment, not in your code or your repository.