内容
# Memora Core
[](https://opensource.org/licenses/Apache-2.0)
[](https://go.dev/)
[]()
Memora is the **Memory-as-a-Service API for AI apps** — durable, multi-tenant,
versioned memory with vector + graph recall, callable from any MCP-aware agent.


## What's inside
- **memora-core** — single-binary HTTP server with bundled MCP transport.
- **memora-cli** — first-class command-line tool, built from the same Go module.
- **Pluggable adapters** behind three Go interfaces — `PrimaryStore`,
`VectorStore`, `LedgerStore`. OSS ships SQLite + sqlite-vec + sqlite-ledger
as zero-dependency defaults; Postgres + pgvector ship as scale-up adapters.
- **Context Graph** — typed, directed edges between Memories (`parent_of`,
`derived_from`, `supersedes`, `references`, `session_of`, `mentions`) plus
graph-augmented Recall.
- **Agent identity** — every Memory / Cell / Edge / Ledger entry carries an
`agent_id`. Pluggable providers: `opaque`, `a2a`, `did`, `oauth_agent`,
`oidc_agent`, `anthropic_session`.
## 60-second quickstart
```bash
git clone https://github.com/axiom-studio/memora && cd memora
make build
# 1) Start the server
./bin/memora-core serve --addr=:7777 --data-dir=./data &
# 2) Create a workspace + remember it
export MEMORA_ENDPOINT=http://localhost:7777
WS=$(./bin/memora-cli workspaces create --name demo -o json | jq -r .id)
export MEMORA_WORKSPACE=$WS
# 3) Imprint a memory
./bin/memora-cli imprint --text "Customer wants the enterprise plan."
# 4) Recall by keyword
./bin/memora-cli recall enterprise
# 5) Patch it — only the changed cell re-embeds (the moat)
WMK=$(./bin/memora-cli lookup mem_XXXX -o json | jq -r .head_watermark)
./bin/memora-cli patch mem_XXXX \
--patch '[{"old_string":"enterprise","new_string":"premium"}]' \
--if-match $WMK
# ✓ Patched mem_XXXX
# Cells re-embed: 1
# Cells skipped: 0 (the moat)
```
Docker:
```bash
docker run -p 7777:7777 -v memora-data:/data ghcr.io/axiomstudio/memora-core:latest
```
Attach via MCP (Claude Code, etc.):
```bash
./bin/memora-core mcp --data-dir=./data
# JSON-RPC 2.0 over stdio; 25 OSS tools.
```
## Docker Compose Setups
Three docker-compose configurations are available for development and testing:
| Setup | Location | Backends | Ports |
|---|---|---|---|
| **Dev** (single node) | `docker-compose.yml` | SQLite + sqlite-vec | 7777 |
| **Federation** (3-node) | `deploy/federation/` | SQLite + sqlite-vec | 7771-7773 |
| **Federation Prod** (3-node) | `deploy/federation-prod/` | Postgres + pgvector | 7771-7773 |
```bash
# Start dev:
docker compose up -d
# Start federation (SQLite):
docker compose -f deploy/federation/docker-compose.yml up -d
# Start federation-prod (Postgres):
docker compose -f deploy/federation-prod/docker-compose.yml up -d
```
### CLI Integration Tests
Pre-built env files and test fixtures live in `test/fixtures/`. To run
CLI-based integration tests against a running docker-compose setup:
```bash
# Build the CLI first:
CGO_ENABLED=0 go build -o memora-cli ./cmd/memora-cli/
# Source the env file for your target setup:
source test/fixtures/env.dev # single dev node
source test/fixtures/env.federation # 3-node SQLite federation
source test/fixtures/env.federation-prod # 3-node Postgres federation
# Run the test suite:
./test/fixtures/run-cli-tests.sh dev
./test/fixtures/run-cli-tests.sh federation
./test/fixtures/run-cli-tests.sh federation-prod
```
The test script exercises health checks, workspace CRUD, imprint (plain text,
markdown, CSV, JSONL with chunker configs), list, recall, and federation
cross-node fanout (for federation targets). Test data fixtures are in
`test/fixtures/` (`sample.txt`, `sample.md`, `sample.csv`, `sample.jsonl`).
## Architecture
```
┌──────────────────────────────┐
Clients ───▶ │ memora-core (HTTP + MCP) │
└──────────────────────────────┘
│ │ │
┌──────┘ │ └──────┐
▼ ▼ ▼
PrimaryStore VectorStore LedgerStore
(SQLite (sqlite-vec (SQLite
/ Postgres) / pgvector) / file
/ Postgres)
```
See [docs/dev-docs/architecture.md](docs/dev-docs/architecture.md) for the full architecture
walkthrough (forthcoming with the F12 docs milestone).
## Editions
- **Memora Core (this repo)** — Apache-2.0, self-hostable, zero-dependency
default. Specified in the OSS PRD.
- **Memora Cloud** — managed multi-tenant SaaS by Axiom Studio, hosted MCP
endpoint, AWS S3 Vectors VectorStore, SLAs, compliance attestations.
Specified separately under the Cloud PRD.
The **public API surface is identical** across editions. Migration from OSS
to Cloud is an endpoint URL + API key change, no code changes.
## License
Apache-2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
## Telemetry
Telemetry is **off by default** in OSS. Opt-in via `MEMORA_TELEMETRY=anonymous`
to send anonymous usage counts to Axiom Studio (helps roadmap prioritization).