codesstar/loci

Memory Palace for AI — persistent memory, identity, and multi-project orchestration for Claude Code

Loci – A Local Memory Layer for AI Agents

What it is

Loci is an open‑source tool that gives you a personal, local “brain” where multiple AI agents can read and write shared context. It stores everything as plain Markdown, JSON and attached files on your own computer, so you keep full control and can browse or edit the data with any editor.

Core capabilities

Feature How you use it
Personal memory Save your name, language preferences, reflections, decisions, etc., and let any connected agent retrieve them later.
Tasks & schedule Create to‑do items, meeting notes and time‑blocks. Tasks that have a time are still just tasks – Loci does not push them into a calendar automatically.
Project context Keep a lightweight index of project state, technical decisions and development tickets inside the project repo; the full details stay in the local brain.
Contacts & places Record people, relationships, past interactions and locations.
Knowledge vault Bookmark links, store snippets, attach files and index your own research notes.
Diary & review Browse activity logs, summarise recent work and review saved information.

You interact with Loci by sending natural‑language commands to an agent that has been hooked into the system, e.g.:

以后用中文回复我。
明天上午9点提醒我发材料。
把这个链接收藏起来,标注“面试参考”。
记住这个项目,再告诉我目前做到哪里了。

The agent translates those commands into file reads/writes according to the rules defined in LOCI‑RULES.md.

Supported agents

Loci provides a tiny “installation” prompt that you paste to any of the following agents, after which the agent can read/write the brain:

  • Claude Code
  • Codex
  • Hermes
  • 千问工作 (Qianwen Work)
  • 豆包工作 (Doubao Work)
  • Qoder
  • WorkBuddy

The first time you run the prompt you choose Install; subsequent agents can simply Connect to the existing brain.

Architecture at a glance

  1. LOCI.md – short entry point – tells an agent where the brain lives and how to fetch preferences.
  2. LOCI‑RULES.md – full handbook – a structured set of rules (tasks, contacts, projects, etc.) that the agent reads once when it first needs to act.
  3. On‑demand data loading – only the piece of information required for a request is read; the whole dataset is never loaded into memory.
  4. Dashboard (Node.js) – a local web UI that runs on your machine, letting you view, edit and search the Markdown/JSON files without touching the agents.
  5. Hooks – optional scripts that automatically inject short‑hand preferences; if they are missing the agent falls back to the generic entry point.

How you run it

  • Prerequisites: Node.js 18+, Git, and a local environment that allows the agent to execute file/command operations.
  • No npm packages need to be installed; the repository contains the Node server and the data schema.
  • Installation is performed by asking the agent to fetch and execute docs/AI‑INSTALL.md. Connecting a new tool uses docs/AI‑CONNECT.md.

Data & privacy

All records stay on your filesystem (Markdown, JSON, attachments). You can back them up, sync them with cloud storage, or move them freely. Loci itself does not send any data to a remote service, but the underlying AI model you use (Claude, Codex, etc.) may still transmit prompts according to its own policy.

Getting started & contribution

  • Full user guide: https://www.tryloci.com/handbook/ (or the Markdown version in docs/user-guide.md).
  • Quick start docs: docs/getting‑started.md (English) / docs/getting‑started.zh‑CN.md.
  • API reference: docs/api.md.
  • Example brain: examples/alex/ shows the directory layout.
  • Contributions are welcomed via Issues and Pull Requests; the project is MIT‑licensed.

In short: Loci is a lightweight, file‑based memory layer that lets multiple AI agents share a common, editable knowledge base on your own computer, with a simple local dashboard for human oversight.

Related

  • Project
  • Project
  • Project
  • Project
  • Project