# Memoria

> Memory infrastructure for AI agents. Bi-temporal knowledge graph + HippoRAG 2 hybrid retrieval, accessible via REST, MCP (Model Context Protocol), and a web dashboard. Hosted in the EU.

Memoria turns raw text into a structured, time-aware knowledge graph. Calling `remember()` runs a seven-stage LLM cascade — entity extraction, resolution, fact extraction, dedup, temporal stamping, contradiction detection, atomic commit. Calling `recall()` fans out dense vectors + BM25 + Personalized PageRank in parallel, fuses by reciprocal rank, and re-ranks with a cross-encoder. Sub-second p50.

Connect via OAuth 2.1 (recommended for human-driven agents) or with `mem_live_*` API keys (recommended for CI and unattended workloads). Every key is scoped to one *brain* — an isolated memory workspace inside your account.

## Docs

- [Quickstart](https://memoria.premex.se/docs/quickstart.md): Get an API key, send your first memory, and recall it — under five minutes.
- [MCP server](https://memoria.premex.se/docs/mcp.md): Connect Memoria to Claude Code and other MCP clients. Twelve tools, OAuth 2.1 authentication, one install line.
- [CLI](https://memoria.premex.se/docs/cli.md): Install the memoria CLI to wire up Claude Code in one line — including Claude Code on the web. Handles install, auth, and MCP config, and teaches the agent the mental model.
- [REST API](https://memoria.premex.se/docs/rest-api.md): All Memoria REST endpoints, request/response shapes, and conventions. OpenAPI 3 spec available.
- [Brains](https://memoria.premex.se/docs/brains.md): Brains are isolated memory workspaces. One per project, one per environment, or one per agent — your call.
- [Recall pipeline](https://memoria.premex.se/docs/recall.md): How Memoria retrieves memories — dense vectors, BM25 keyword search, and graph traversal, fused and re-ranked.
- [Write pipeline](https://memoria.premex.se/docs/write-pipeline.md): Seven LLM stages turn raw text into a bi-temporal knowledge graph — entities resolved, facts deduped, contradictions detected.

## Reference

- [Pricing](https://memoria.premex.se/pricing): Free tier (1,000 calls/day) and upcoming paid tiers.
- [Status](https://memoria.premex.se/status): Live operational status of the API and web app.
- [Changelog](https://memoria.premex.se/changelog.md): Release notes from GitHub, also available as markdown.
- [OpenAPI spec](https://api.memoria.premex.se/openapi.yaml): Full REST API schema.

## Legal

- [Privacy Policy](https://memoria.premex.se/legal/privacy.md): GDPR-compliant. EU data residency. No selling of personal data.
- [Terms of Service](https://memoria.premex.se/legal/terms.md): Governed by Swedish law. EU consumer rights honoured.

## Optional

- [GitHub repo](https://github.com/premex-ab/memoria): Source code, issues, and discussions.
- [MCP server](https://memoria.premex.se/docs/mcp.md): One-line install in Claude Code via OAuth 2.1.
