Skip to main content

AI Agent Memory System — coordinate-based memory management with 30M parameter models

Project description

LightHouseOS

AI Agent 记忆系统 — 让小模型管理记忆,让记忆永不丢失、越用越精准

LightHouseOS 是一个轻量级 AI Agent 记忆系统,基于 坐标索引(而非向量检索)和 三个 33M 参数的小模型 实现长期记忆管理。

核心思路

与所有主流记忆系统(Mem0、MemGPT、RAG)不同,LightHouseOS 不用向量检索

传统方案: 对话 → 嵌入向量 → 向量数据库 → 余弦相似度检索 → 注入提示词
LightHouseOS: 对话 → 小模型分类 → pin 坐标 → 哈希索引查找 → 直接返回

三个模型各自专攻一个环节:

  • 输入模型 (33M) — 对话 → pin坐标(event, entity, topic) + importance
  • 召回模型 (33M) — 查询 → pin坐标 + precision
  • 整理模型 (33M) — 修正错误的 pin 标注

快速开始

pip install lighthouse-memory

# 写入记忆
lh write "我刚把 update_query 的返回值从 Vec<Row> 改成 usize" \
  --event 代码修改 --entity src/db.rs --topic 数据库层

# 查询记忆
lh recall "刚才改了啥"

# 列出最近记忆
lh list

集成到 Claude Code

lh serve

然后在 Claude Code 的 MCP 配置中指向这个服务,即可通过 tools 读写记忆。

项目结构

lighthouse-memory/
├── lighthouse/
│   ├── memory/        # TF Database (pin index + fragment archive)
│   ├── models/        # 模型推理(计划中)
│   ├── cli/           # 命令行工具
│   └── server/        # MCP 服务器
├── Models/            # 训练代码
├── Docs/              # 设计文档
└── scripts/           # 工具脚本

设计文档

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lighthouse_memory-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file lighthouse_memory-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lighthouse_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05e24f576230028000162e335af795dc8dae736685d6596c999220ab36b5b007
MD5 7c93feafeca2f245e8500d79e9f63525
BLAKE2b-256 a71b9f5e49edc4ff519ec747b198432d079165b647812d3203e7cd442f432b48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page