# Infinimemory > Long-term memory for AI agents. Save what an agent learns, find it in milliseconds, > and let newer facts supersede older ones. Hosted API, MCP server, CLI and TypeScript SDK. > Infinimemory is proprietary software, developed and maintained by the Infinimemory team. Base URL: https://infinimemory.nidonic.online Auth: send `Authorization: Bearer rc_...` (or `X-API-Key: rc_...`) on every request. Get a key: a human signs up at https://infinimemory.nidonic.online/console (email code or Google), then creates one under Settings → API keys, or runs `npx @tryrecallai/cli login` (opens the browser; the machine gets its own key). TypeScript: npm install @tryrecallai/sdk ## Concepts - realm: a hard isolation boundary in the URL path (one per user, tenant or project). Pattern ^[a-zA-Z0-9_:-]+$, max 100 chars, case-sensitive. There is no create call: the first save creates it, so a typo makes a new, empty realm (reads of a realm never saved to return 404). Every organization has a realm named "default" that can't be deleted. Use ":" for hierarchy (org:acme:user:42); Infinimemory doesn't parse it. - file: text you save. It is split into pieces, embedded and findable within seconds. - note: a fact taken from a file. When a newer note contradicts an older one, it supersedes it: the newer note becomes the latest version and the older one is kept as history. - about: a realm's core facts (stable) and changing facts (recent), ready to put in a prompt. - sync: a background step that decides which notes supersede or repeat others, and adds at most two inferred notes (isInference, "derives" connections) that several notes imply together. "continuous" (default) batches it per realm; "instant" (paid plans) runs it right away for one file. - expiry: a note that states its end ("in Tokyo until Friday", "valid until 2026-12-01") is forgotten after it (reason "expired"); metadata.expiresAt on a file sets it for every note of that file. ## Endpoints POST /v1/realms/{realm}/file {"content": "...", "metadata": {...}, "externalId": "...", "sync": "continuous"|"instant"} -> 202 {id, status} POST /v1/realms/{realm}/files {"documents": ["...", {...}]} (up to 100; per-item errors) GET /v1/realms/{realm}/files ?page=1&limit=20 GET /v1/realms/{realm}/files/{id} ?include=chunks,memories -> status: queued|extracting|chunking|embedding|done|failed DELETE /v1/realms/{realm}/files/{id} POST /v1/realms/{realm}/find {"q": "...", "limit": 10, "mode": "hybrid"|"notes"|"pieces"} optional: "asOf", "from", "to", "referenceDate" (dates), "order": "chronological", "temporal": false (the original Find only); see Time below GET /v1/realms/{realm}/timeline events oldest first ?from=&to=&q=&event=&limit= with their connections GET /v1/realms/{realm}/about POST /v1/realms/{realm}/notes/remove {"ids": [...]} or {"query": "...", "dryRun": true} POST /v1/realms/{realm}/sync run sync for the realm now GET /v1/realms/{realm}/explorer File Explorer: the realm as Markdown files GET /v1/realms/{realm}/explorer/{path} INFINIMEMORY.md, index.md, notes/.md, files/.md GET /v1/realms your realms ?page=1&limit=20&q= (all of them without page/limit) GET /v1/realms/{realm} one realm: counts, context, system -> 404 before its first save PATCH /v1/realms/{realm} {"context": "what this realm is about" (≤ 1500) | null} guides Sync DELETE /v1/realms/{realm} console session, owner only: delete it and everything in it DELETE /v1/realms/{realm}?moveTo={other} merge: move everything into {other} (made if needed), then remove {realm} (kept, empty, if it is "default" or a key/integration uses it) -> 202 {operationId, kept} GET /v1/operations/{operationId} a move's status: queued|running|done|failed GET /v1/usage usage and limits for the key's organization GET /v1/plans public plan limits GET /v1/organization your organization (PATCH {"name"} with a session) Find results: {"results": [{"id", "type": "memory" (a note) | "chunk" (a piece), "text", "score", "document_id", ...}]} Field names in responses are stable: "namespace" is the realm, "memories" are notes, "documents" are files, "chunks" are pieces, "static"/"dynamic" are core/changing facts. ## Time Save reads dates without a model: explicit ("on November 10", "March 2025", "2025-11-10"), ranges ("from March to June 2024"), and relative ("yesterday", "three months ago", "last Friday"), which count from when it was said: the file's documentDate (send it for imported conversations; metadata.timezone sets the calendar), else the time of the save. What it can't pin down ("on 03/04", a yearless date with nothing to anchor it) stays unresolved; nothing is guessed. Each note can carry occurredAt (when it happened), validFrom/validUntil (when it was true; a superseded note keeps its history), saidAt, a precision (exact/day/month/year/approximate) and a source. Habits ("every Monday") get no single date. Notes are connected as supersedes, before (explicit wording or "two weeks after the launch"), during, same_event, caused_by (explicit wording only) and conflicts (a once-only event given two dates). A Find question about time also returns "temporal": {intent, computed: {status: answered|missing|ambiguous|conflict, answer, value, unit, days, exact, min, max, convention, evidence}, timeline, evidence (each with score parts), conflicts, unresolved}. Intents: current, historical, when, elapsed ("how long ago"), between, span ("how long did it last"), order, change, range. Durations are elapsed days between the dates (inclusive when the question says so); months and years are calendar months; an imprecise date gives an estimate with min/max. Find still never calls a model. Compatibility: earlier paths still work and behave the same: /v1/namespaces/{ns}/document(s), /search, /profile, /memories/forget, /tree, /file/{path}; and the fields customId, dreaming ("dynamic"), searchMode. ## Errors Every error is JSON: {"error": "message", "code": "machine_code"}. - 401 unauthorized: missing or invalid key. - 402 plan_limit: monthly plan limit reached; body has "plan_limit" and a Retry-After header. - 429 rate_limited: too many requests this minute; respect Retry-After. - 400 invalid_request: the body failed validation. ## MCP Endpoint: https://infinimemory.nidonic.online/mcp (Streamable HTTP, protocol 2025-06-18), same Bearer key. Tools: ifm_save {content, realm?, metadata?, externalId?, type?}, ifm_find {query, realm?, limit?, mode? = hybrid|notes|pieces, threshold?}, ifm_about {realm?}, ifm_remove {ids? | query? | fileIds?, realm?, dryRun? = true}, ifm_notes {realm?, limit?}, ifm_graph {query?, realm?, limit?} (notes, their versions and what supersedes what). Local MCP server signed in with the CLI login: npx @tryrecallai/cli mcp (or: npx @tryrecallai/cli setup , see Plugins). ## CLI Install: npm install -g @tryrecallai/cli Sign in: ifm login (opens the browser; the machine gets its own key). ifm login --key rc_... works without a browser. Every command except login, doctor and pause is refused until you are signed in, or INFINIMEMORY_API_KEY is set. The realm is, in order: --realm, a .infinimemory.json (written by ifm connect) in the folder or a parent up to the repository root, INFINIMEMORY_REALM, then repo___: the id is the first 16 hex of sha256 of the git remote (of "path:" without one). Every command takes --json for scripts. ifm login | logout sign in or out on this machine ifm status the key, server, plan and realm in use, and this month's usage ifm connect [realm] link this folder to a realm; without a realm, show the link ifm realms your realms with note and file counts ifm save save text; or --file , --url , or pipe text in; --wait until findable ifm find find notes and file pieces (--limit) ifm about the realm's core facts and changing facts ifm remove shows matching notes, asks, then removes them (--yes skips the question) ifm files [id] list files, or show one with its notes ifm files rm delete a file ifm sync run Sync now ifm setup connect an agent: claude, codex, gemini, qwen, factory, opencode, cline, amp, cursor, copilot, devin (Windsurf) or kiro (MCP server + capture hooks or plugin) ifm setup --all every agent found on this machine ifm doctor login, realm, repo id, capture on/paused, each agent's hooks and last capture ifm pause [hours] | pause off stop capture on this machine for a while (default 1 hour); Find keeps working ifm mcp Infinimemory's MCP server over stdio, using your login ifm explore [path] File Explorer: the realm as files, or one file (e.g. INFINIMEMORY.md) ## Plugins Source: https://github.com/infinimemory/infinimemory-plugins/tree/main/plugins. Sign in first: npx @tryrecallai/cli login. The plugins use that login (or INFINIMEMORY_API_KEY) and do nothing without it. INFINIMEMORY_BASE_URL=https://infinimemory.nidonic.online. Every agent shares the realm "repo___" (a worktree uses its main repository's, unless INFINIMEMORY_ISOLATE_WORKTREES=true); INFINIMEMORY_REALM overrides it. Notes in the older "project-" realm are still found. Each one brings in About at session start and saves the conversation turn by turn (only new turns, appended to one file per session, named ":"); most also add the notes relevant to each prompt. - Claude Code: /plugin marketplace add infinimemory/infinimemory-plugins, then /plugin install ifm@infinimemory. Also /ifm:pause. - Codex, Gemini CLI, Qwen Code, Factory: npx @tryrecallai/cli setup codex|gemini|qwen|factory (Codex: approve the hooks once with /hooks). - OpenCode, Cline, Amp: npx @tryrecallai/cli setup opencode|cline|amp installs their plugin. - Cursor, Copilot: npx @tryrecallai/cli setup cursor|copilot. Their prompt hooks cannot add context, so the agent finds notes with the ifm_find tool; optional rule for Cursor: plugins/cursor/ifm.mdc → .cursor/rules/. - Windsurf / Devin, Kiro: npx @tryrecallai/cli setup devin|kiro. Their hooks carry no reply, so only the user's prompts are saved. - Or all at once: npx @tryrecallai/cli setup --all; then npx @tryrecallai/cli doctor. - Chrome: load plugins/browser unpacked, then Settings → Sign in with Infinimemory; saves pages and selections, finds from the toolbar. Saving never sends tool calls or tool output. … becomes [private], and likely secrets (provider tokens, rc_ keys, *_KEY=, Bearer tokens, JWTs, private keys, URL passwords) are masked on the machine; the server masks tokens in captured turns again. Stop saving with ifm pause [hours], "save": false in a repository's .infinimemory.json, or INFINIMEMORY_SAVE=off. ## Integration recipe for a coding agent 1. Ask the human for an rc_ key (from https://infinimemory.nidonic.online/console). Read it from an env var, e.g. INFINIMEMORY_API_KEY. Never commit it. 2. Pick a realm per end user (e.g. "user_"). 3. After useful turns, save the text (POST /file). Do not wait for it; it becomes findable in seconds. 4. Before answering, find with the user's message and put the top results in the prompt. 5. Handle 402 and 429 by backing off; they are not bugs. ## Facts - Find never calls a language model; it is Postgres full-text plus vector search. - Sync uses a language model in the background to decide which notes supersede which and what they imply. - Save splits compound sentences, versions explicit corrections and sets expiry without a model. - Data is stored in Postgres (Supabase). Hosted only; no self-hosted edition. - Terms of Service: https://infinimemory.nidonic.online/terms. Privacy Policy: https://infinimemory.nidonic.online/privacy. Copyright © 2026 Infinimemory. All rights reserved.