Korely
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Korely Agent gives your AI agents a memory that keeps its history. When something stops being true, the old fact is closed instead of overwritten: your agent knows what is true now, and you can see what was true, and what it knew, at any moment in the past. It runs on your servers, with your Postgres and your model key.
One memory, every agent
Any agent that speaks MCP, and your own code, reads and writes the same memory. Here Claude Code saves, and Gemini CLI, which never saw that conversation, answers from Korely's dated facts:

Related MCP server: kepta
Why Korely
It remembers how things change. When something stops being true, Korely closes the old fact instead of overwriting it. Your agent knows what is true now and what was true before, and you can check what it knew at any moment in the past.
You can see why it said that. Every fact links back to the memory it came from, and every read of a person's data leaves an entry in the audit trail.
One database you already know. Korely runs on Postgres with pgvector, both open source. No separate vector database, graph database, queue or cache to run.
Built for personal data. Data stays on your servers and you use your own model key, with a model hosted in Europe if you want one. An erasure deletes the person's data and leaves a record that proves it, and the logs never contain what people said.
Works with the tools you use. Claude Code, Cursor, Gemini CLI, Codex, ChatGPT and any MCP client, plus Python and JavaScript SDKs and a REST API.
Measured in public. Benchmark scores below, with the scripts to run them again.
Not the right fit if you want a memory that rewrites how your agent behaves as it learns: Korely stores facts about people and things, it does not change your agent's instructions. And for one user with no questions about the past, a plain file is simpler.
What is in this repository
Everything an install of your own runs, under Apache 2.0:
The memory: memories searched by meaning, the facts a model reads from them with their dates and both clocks, corrections, and erasure.
Projects: one install holds many, each with its own keys, which read and write that project only.
Agent notices: an agent that names itself when it reads (
reader) learns, in its next context block, which of the facts it was given have ended since (how).The MCP server, the REST API and webhooks.
The dashboard of your install: memories, facts, projects, keys, webhooks and the audit trail.
The benchmark scripts behind the numbers below.
Korely Cloud runs this code, plus what a public hosted service needs on top: sign-up, plans and payments, and spending limits per account. That part is not in this repository. Neither is a way to ask questions of your documents or folders: Korely remembers what your agents and your code send it.
Quick start

What the installer prints, line by line. Two programs run: Korely and its database. The other lines are Docker setting them up.
Name | What it is |
| Korely: the dashboard, the API and the MCP server, on port 8000. |
| The database: Postgres with pgvector. |
| The disk the database keeps its data on. It stays when Korely is stopped, and goes with |
| The private network the two programs talk over. |
| A one-off helper: it lets Korely write to the |
Install Docker Desktop and open it (on Windows, use it inside WSL2 with Docker: tested). Korely needs 4 GB of free memory.
Download and run the installer. Open a terminal (on a Mac: the Terminal app), paste this line and press Enter:
curl -fsSL https://raw.githubusercontent.com/korely-ai/korely/main/install.sh | shcurldownloads the installer and| shruns it. The installer works in a new folder,korely, and nowhere else: it downloads Korely (about 0.7 GB to download and about 2.4 GB on disk, the first time), starts it and creates your account.Open the address it prints, http://127.0.0.1:8000, and sign in with the login and password it prints. It also prints an API key: that is what your agents use. The password and the key are shown once. The key expires after 90 days (the installer prints the date); make a new one on the dashboard's API keys page (Keys and account limits).
On a Mac, without a terminal: download Korely Installer, open it and double-click Korely Installer. It checks Docker Desktop, asks where to install and, if you want, your model key, then installs in a Terminal window you can watch, and opens your dashboard at the end. It runs the same installer as the line above.
Running the line again starts what is there and creates nothing new. To read
the installer before running it: curl -fsSLO …/install.sh, then
sh install.sh --help.
Your model key. The one model call is the writer that turns memories into facts, and it is billed to you. Name your provider and the installer asks for the key without showing it:
curl -fsSL https://raw.githubusercontent.com/korely-ai/korely/main/install.sh | KORELY_PROVIDER=gemini shGemini, Scaleway, Mistral, OpenAI and OpenRouter work; Scaleway writes in Europe, in Paris. Without a key the install completes and the dashboard's first screen asks for one (Skip for now works too: memories are stored and searched, and facts arrive when your agents write them).
To stop it, start it again or remove it, use ./korely in that folder
(Install has the commands).
Without installing anything: the same code runs as Korely Cloud, with a free plan, at korely.ai. On a server, with your domain and a certificate: Install.
Using Claude Code, Cursor or another coding agent? Connect it over MCP with the key the installer printed:
read -rs KORELY_API_KEY # paste the key, it is not shown claude mcp add --transport http korely http://127.0.0.1:8000/mcp \ --header "Authorization: Bearer $KORELY_API_KEY"Your agent can then save a memory, search its memories, and read what is true about a person, now or on any past day. Connect your agent has Cursor, ChatGPT and the SDKs.
Facts with dates: why did it say that in March?
A support agent tells customer 4821 they have priority support. That is March. In June they move to a cheaper plan. Today they are angry, quoting your bot back at you. Was the bot wrong, or right at the time?
Claude Code, in a new session with no memory of its own, asked about today and about April:

The same history in the dashboard, with the clock dragged back to 1 April:


With no model key, as in the recording, an agent writes the facts itself. Each
write answers with the fact's id (fct_...):
# the plan from 15 March
curl -X POST https://your-domain/v1/facts \
-H "Authorization: Bearer kor_self_..." -H "Content-Type: application/json" \
-d '{"user_id":"c4821","subject":"c4821","predicate":"subscribes_to","object":"Priority Support plan","valid_from":"2026-03-15"}'
# it stopped being true on 20 June (use the id the first call returned)
curl -X POST https://your-domain/v1/facts/fct_.../forget \
-H "Authorization: Bearer kor_self_..." -H "Content-Type: application/json" \
-d '{"at":"2026-06-20"}'
# and the new plan starts that day
curl -X POST https://your-domain/v1/facts \
-H "Authorization: Bearer kor_self_..." -H "Content-Type: application/json" \
-d '{"user_id":"c4821","subject":"c4821","predicate":"subscribes_to","object":"Basic plan","valid_from":"2026-06-20"}'To change a fact you know is wrong while it is still open, correct it by its
id (PATCH /v1/facts/{id}). A date with no time is midnight UTC: when a fact read from
a memory may come later that day, give the time too
(Honest limits).
With a model key, you can send sentences to POST /v1/memories instead, and a
model turns them into facts. Without a key a memory is stored and searched, but
no fact comes out of it, and GET /v1/facts stays empty. Every write says whose
memory it is, with a user_id (the person it belongs to) or an agent_id (the
agent writing it): with neither, the answer is a 422 identity_required (since
1.0.19).
curl -X POST https://your-domain/v1/memories \
-H "Authorization: Bearer kor_self_..." -H "Content-Type: application/json" \
-d '{"content":"Customer 4821 is on the Priority Support plan.","user_id":"c4821","timestamp":"2026-03-15"}'
# then the same with "Customer 4821 moved to the Basic plan." and "timestamp":"2026-06-20"What the store held on the day of the conversation:
curl "https://your-domain/v1/facts?user_id=c4821&as_of=2026-04-01" \
-H "Authorization: Bearer kor_self_..."c4821 -subscribes_to-> Priority Support planThe bot was right at the time, and that is a row, not a reconstruction. Nobody
wrote the second fact as an update to the first: a model read the second
sentence, saw it was about the same thing, and the older fact was closed on
20 June. include_invalidated=true returns both rows with their dates. (The
relation's name is the word the model chose, so yours may read is_on: the
example is about the dates.)
There are two clocks. as_of asks what was true on a date; known_as_of asks
what the store knew on a date, which differs when a change is told late. And
when a model in the write path is not acceptable, an agent can write and close
facts itself (POST /v1/facts, POST /v1/facts/{id}/forget with the date it
stopped being true), with no model involved.
Time: what was true, and what the store knew has all of it.
Benchmarks
Benchmark | Score | Reader and judge |
LongMemEval, oracle split, 500 questions | 87.2% | gpt-4o, with the benchmark's own prompts |
LoCoMo, 1,540 questions, Mem0's judge prompt | 86.9% | gpt-4o-mini |
LoCoMo, the same context read by an open-weight model | 80.8% | gpt-oss-120b |
79.9% | gpt-4o-mini |
Measured on version 0.1.36 in October 2026, not yet rerun on this release. The judge alone moves a LoCoMo score by several points, so compare numbers only under the same judge; the benchmarks page has the protocol, the cost and the command for each row.
Connect your agent
Python. Install the client, then three lines:
pip install korely-memoryfrom korely_memory import Korely
korely = Korely(api_key="kor_self_...", base_url="http://127.0.0.1:8000")
korely.add("I prefer to be called Max.", user_id="max")
print(korely.search("What should I call the user?", user_id="max")[0].snippet)JavaScript works the same way: npm install korely-memory.

MCP. Any MCP client connects to https://your-domain/mcp with the same key.
Your agent can then save a memory, search its memories, read the facts about a
person (now or on a past day) and get a ready-made context block for its
prompt.
# Claude Code
claude mcp add --transport http korely https://your-domain/mcp \
--header "Authorization: Bearer kor_self_..."{ "mcpServers": { "korely": {
"url": "https://your-domain/mcp",
"headers": { "Authorization": "Bearer kor_self_..." } } } }This is the shape Cursor and most clients read. ChatGPT and Claude on the web connect as a custom connector at the same address and sign in through your install's own consent page, choosing the project they may read.
REST. /docs on your install is the whole contract, served by the install
itself. Talking to it covers the SDKs, the context block
for prompts, errors and the shell commands.
How it works
An agent writes a memory; it is stored and searchable at once. A worker sends its text to the model provider you chose, gets facts back, and asks the model whether each new fact replaces an older one about the same thing; the older one is closed, never deleted. No read calls the model: a search and a context compute one vector of the question, on your server by default, and every other read is SQL.
Your data
What leaves the machine is text sent to the model provider whose key you set, and only to write facts: the memory with the end user's id as your agent sent it (prefer an opaque id to an email address or a name), a few of the same person's earlier memories for context, and the facts the judge compares. Install lists exactly what goes. Nothing is sent to Korely, and nothing phones home. Vectors are computed on your server by default (EmbeddingGemma-300m).
Europe or Global is chosen per project. Europe writes with gpt-oss-120b on Scaleway, in Paris; a region with no provider keeps its memories waiting and never falls back to the other one.
One install, many projects. Give each app or customer its own project: its key reads and writes that project only, so the shop's agent never sees the clinic's memories. A project key cannot manage keys or webhooks, and reads the audit trail of its own project only (
GET /v1/audit), without the name of the operator behind the dashboard's acts there; an admin key, and you signed in to the dashboard, reach every project of the account. The dashboard shows the project chosen at its top, or all of them together with All projects.An audit trail that stores no content: who read or changed which person's data, when, with what result, kept 400 days by default.
Erasure that erases:
DELETE /v1/users/{id}/memoriesremoves the person's memories and facts in the key's project, history included, and leaves a record with counts and a keyed pseudonym instead of their id; the account's administrator can erase them in every project at once.Logs carry no end-user words: errors and access lines hold ids and route shapes, never the text of memories, facts or questions.
What is in the box details the facts, the trail and every form of erasure.
Status
Actively maintained: releases come out every few days, each with upgrade notes in the CHANGELOG. The same code runs Korely Cloud, the hosted service at korely.ai. The issues this version ships with are listed in Honest limits and known issues; none of them shows one account's data to another, loses data or keeps an erased person's data. Upgrades, backups and restores are in Keeping it running.
Honest limits
Facts are mined by a model. It misses things, invents relation names, and sometimes closes a fact that was still true. A closed fact stays readable, and an agent can close or correct one itself.
Whether a relation holds one value at a time is a model's answer. A change of plan closes the old plan; a change of employer may leave both employers open.
More than one process needs sticky MCP sessions. Two processes on one Postgres took 2,000 memories at once: each memory reached the model once and sent its webhook once, with no error (scripts/two_processes.sh, no key needed). Thirty agents of one account, 15 on REST and 15 on MCP, wrote 600 memories and read 600 times in 26 seconds on the same two processes, with no client retry: none lost, none stored twice, no read refused (scripts/concurrent_agents.sh). Twelve hours of load on one process (36,027 memories, a restart at the twelfth hour, writer faked) kept the API's memory flat at about 590 MiB, with no error in its log (scripts/soak.sh). An MCP session lives in the process that opened it, so a load balancer in front must keep each MCP client on the same process; REST calls can go to any of them.
Honest limits and known issues has each one with what was measured.
Documentation
docs/guide: install, the two clocks, the API and MCP, webhooks, keys and limits, data and privacy, operations, troubleshooting.
Support
Bugs and ideas: GitHub issues, where everybody can read them; the form asks for the version and whether it is an install of your own or the Cloud, and real people's data stays out of it. Vulnerabilities: security@korely.ai, never an issue (SECURITY.md). Commercial support and setup for your domain: info@korely.ai. The Cloud's plans are at korely.ai/pricing.
License
Apache License 2.0. See LICENSE and NOTICE. In plain words,
and the file is what governs: you can use it, change it, pass it on and sell it,
run it for yourself or host it for other people. A copy you pass on carries
LICENSE and NOTICE, and a file you changed says so. Whoever contributes code
also licenses the patents that code needs (section 3), and it comes with no
warranty. The licence gives no right to the name and logo "Korely" (section 6):
saying your work is built on Korely Agent is fine, calling it Korely is not. A
contribution you send is taken under the same licence (section 5);
CONTRIBUTING.md says how. The korely-memory clients on PyPI
and npm are MIT. Every third-party licence in the tree is listed in
docs/DEPENDENCIES.md.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory for your AI agents. Every fact shows its source, and stale facts get replaced.
Shared memory for AI agents and teams: store, search and correct dated facts and decisions.
Persistent memory for AI agents, for code, research and everyday life. Stale facts retire.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceOpen-source AI memory layer for LLM agents. Importance scoring, temporal decay, hierarchical memory (facts, summaries, themes), YMYL prioritization, and active retrieval with contradiction detection. Supports OpenAI, Anthropic, Ollama. Local-first with SQLite + FAISS.50Apache 2.0
- AlicenseNot gradedqualityBmaintenanceLocal memory for AI agents in one SQLite file on your own machine. Facts carry a validity window and a confidence score, so an outdated one is superseded and downweighted rather than deleted, and retrieval fuses BM25, vector similarity and a knowledge graph.4Business Source 1.1
- AlicenseNot gradedqualityCmaintenanceSelf-hosted long-term memory for AI agents on your own Postgres. Facts are dated, versioned and superseded rather than silently overwritten, every recall ships with an inspectable trace, and agents can correct wrong memories from inside the conversation.2Apache 2.0
- AlicenseNot gradedqualityAmaintenanceCogniCore — persistent memory, reflection and safety for AI agents. Agents forget everything between runs. CogniCore gives them a memory that survives: structured experience with the evidence that verified it, recall by relevance, and a safety layer that blocks prompt injection before it reaches the model. Runs locally with no vector database and no embedding server, or connect the hosted endpoint74 PyPI87Apache 2.0