Introducing Smritea: Memory API for AI apps and agents

Introducing Smritea: Memory API for AI apps and agents

by Tushar Dwivedi
Ask AI about this page

Smritea is a Memory API for AI apps and agents. You send it text from a conversation, it stores the facts, and you search those facts later by meaning. Smritea ships SDKs for Python, TypeScript, Go, Java and C#.

The problem Smritea solves

A language model forgets everything between requests. Your app has to put the right facts back into the prompt every time. That means deciding what to keep, storing it, and finding it again.

A memory is one stored fact, such as Alice is vegetarian. Smritea reduces the work to two calls: add and search.

What you can do today

  • Store memories from text. A Deep Search app extracts separate facts and skips facts it already has. A Quick Search app stores the text as you sent it.
  • Search memories by meaning with three methods: quick_search, deep_search and context_aware_search.
  • Keep memories apart by user, agent or conversation, using a memory scope.
  • Ask what was true at one moment, or over a range of dates.
  • Filter by metadata whose values are strings, integers or floats.
  • Run the same calls from five SDKs, an MCP server, or a plugin for Claude Code and Cursor.
  • Keep data in the United States or India. You pick the region when you create the app.

Your first memory

This sample stores one sentence for a user named Alice. Then it asks a question and prints each match with its score. Set SMRITEA_APP_ID and SMRITEA_API_KEY first. The dashboard shows both when you create an app.

import os

from smritea import MemoryScope, SmriteaClient, SmriteaError

client = SmriteaClient(
    api_key=os.environ["SMRITEA_API_KEY"],
    app_id=os.environ["SMRITEA_APP_ID"],
)
alice = MemoryScope(actor_id="alice", actor_type="user")

try:
    client.add("Alice is vegetarian and loves hiking", scope=alice)
    for r in client.search("What does Alice eat?", scope=alice):
        print(f"{r.score:.2f}  {r.memory.content}")
except SmriteaError as e:
    print(e.http_status, e.code, e.request_id)

The scope on both calls keeps the search on Alice's memories. If a call fails, the exception carries the HTTP status, an error code and a request ID. The errors reference lists every code.

Install

Install the Python package with pip install smritea-sdk. The other four packages are on npm, the Go module proxy, Maven Central and NuGet. The quickstart shows this sample in all five languages.

What it costs

Each add costs one memory credit. A search costs one, three or five search credits, depending on the method. The limits page lists the plan quotas and rate limits.

Where to go next

  1. Create an app and an API key: Create an app and API key.
  2. Run the quickstart.
  3. Read how Smritea stores memory.

Related posts

Comments