Drop-in recall layer for AI agents. Store what happened, retrieve only what the next step needs — no re-stuffing the whole history into context.
from inra import Memory mem = Memory(api_key="inra_...") # remember an interaction mem.add( agent="support-bot", user="u_123", text="prefers email over phone", ) # recall only what this step needs ctx = mem.recall( agent="support-bot", user="u_123", query="how should I reach them?", ) print(ctx) # → ["prefers email over phone"]
Install, add a memory, recall it. That's the whole surface.
A model only knows what's in its prompt right now. Conversations run long, sessions restart, and useful detail scrolls out of the window. Stuffing the whole history back in is expensive and dilutes what matters — and generic RAG over a document store rarely returns the one fact the current step needs.
inra is the layer in between: a place to write what happened and pull back only what's relevant, keyed to the agent and user it belongs to.
One write path, one read path. Recall happens at query time, so the model sees only what the current step needs.
Hand inra a string plus the agent + user it belongs to. It embeds and stores the memory — you don't manage vectors or an index.
Memories live inside a scope, so one user's context never leaks into another's, and each agent keeps its own knowledge.
Pass the current query. inra returns only the matching memories, ranked by relevance — drop them straight into the prompt.
Memories are scoped by agent and user, so recall never mixes one end-user's context with another's.
Retrieval ranks by meaning against the current query — you get the relevant fact, not a keyword match or the whole log.
Add one memory at a time as the conversation happens. No batch reindex, no pipeline to babysit.
Two calls behind whatever agent loop you run — a tool-calling agent, a graph, or a plain request handler.
The pattern repeats wherever agents run long enough to forget. These are the shapes the tool is reached for — described by the job, not a logo.
A team running a dozen support agents stops re-stuffing whole transcripts into every prompt. The agent pulls back the two or three facts a reply actually needs — a customer's plan, their last issue, that they prefer email over phone — and leaves the rest in the store.
A copilot that spans sessions keeps a project's conventions between them: the test runner, the naming style, the one directory it's told never to touch. Recall makes those survive a restart, so the assistant isn't relearning the codebase every morning.
// illustrative usage patterns — inra is early; these describe the job, not named customers.
Developers building AI agents that need to remember across turns and sessions — support bots, copilots, assistants — without hand-rolling a vector store and a recall pipeline.
Get started →