afair
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
The open-source, self-organizing memory for all your AI tools.
---
Every AI you use remembers a different version of you. What one learns is gone
when you open the next, so you repeat the same decisions, relationships,
preferences, and history at the start of another session.
afair gives them one shared vault. It connects through the Model Context
Protocol (MCP), so the same memory is available
in Claude, your coding agent, and whatever you use next.
A growing memory usually becomes another thing to maintain. afair takes that
work away. Background agents read what your tools record, discover what belongs
together, keep the useful understanding current, and let old noise fade from
attention. The structure follows your life instead of a fixed template. You do
not file, tag, or curate it.
The result stays visible. You can read what afair believes, follow it back to the
source, and correct it when it gets you wrong. Corrections become part of the
history instead of silently replacing it.
What goes in is your whole life: your work, the people you love, and the
personal things you'd rather an AI just knew.
The data is append-only and yours. afair is open source and single-tenant, and
you can export all of it whenever you want. The name is short for "as far as I
remember", the hedge it's built to make unnecessary.
Two ways to use it
**Run it yourself.** This repository is the whole thing, AGPLv3. Self-host it on
your own machine or server and you own every layer end to end. It is free,
forever. The quickstart is below.
**Or let afair.ai run it for you.** Managed hosting, with your own isolated EU
instance, backups, export, and updates handled for you, is coming soon. Join the
early-access list at **afair.ai**.
Same code either way. The hosted product is one deployment of this repo, not a
separate proprietary fork.
The three commands
afair exposes exactly three tools, and they are frozen for good:
- **remember** stores something durable: a decision, a person who matters, a
date you can't miss, a preference.
- **recall** pulls back what is relevant to the moment.
- **observe** logs what the AI just did, so the vault keeps up.
Once you hand your AI the short setup snippet, it
calls these on its own. Nothing reaches the vault unless a call puts it there.
Run it yourself
Requires Python 3.12+ and uv.
The server comes up on http://127.0.0.1:8765. Point a CLI or desktop client
(Claude Code, Codex, Cursor, GitHub Copilot) at it, connect, and you are done. Web clients that
run in the cloud (Claude.ai, ChatGPT) instead need a public HTTPS deployment and
a quick OAuth setup, covered in docs/self-hosting.md.
Every environment variable is documented inline in .env.example; per-client
connection guides live in docs/clients. afair is personal by
default; a vault can instead belong to a single organization (one instance, one
team) via two env vars (see docs/self-hosting.md).
Install it with your coding agent
Already in Claude Code, Codex, or another coding agent? Hand it the prompt below
and it sets itself up: clone, dependencies, config, and the MCP wiring, then it
proves the round-trip.
> Set up afair (the open-source MCP memory server at
> https://github.com/afairai/afair) on this machine and connect this tool to it.
> Clone it, run uv sync, copy .env.example to .env, and ask me for an LLM
> provider API key to put there. Then run