展示HN:VexFS – 一个面向AI代理的内核原生语义文件系统

4作者: lspecian大约 1 个月前原帖
嗨,HN, 我昨天开始构建 VexFS——一个内核原生的文件系统,能够将向量嵌入与文件一起存储,支持语义搜索(目前是暴力搜索,未来会实现 HNSW),并通过一个简洁的 IOCTL + mmap 接口暴露所有功能。 可以把它看作: - 本地 AI 代理的语义记忆层 - 无需向量数据库的 RAG - 作为操作系统原语的向量搜索 现在还很早,功能尚不完善,但它可以启动。 为什么?因为如果内存不能被快照化,那就不算真正的内存。 也许,代理们确实应该有一个可以原生挂载的 /mnt/mem。 当我问 Gemini 对这个想法的看法时,它说: “这样一个操作系统级的语义上下文层可以使更强大、更具上下文感知能力和更高效的 AI 系统成为可能。” 我不确定这是否是一个绝妙的主意,还是一个随时可能导致内核崩溃的隐患。 无论如何,我非常希望听到你们的反馈(以及批评)。 → [https://github.com/lspecian/vexfs](https://github.com/lspecian/vexfs)
查看原文
Hi HN,<p>I started building VexFS yesterday — a kernel-native filesystem that stores vector embeddings alongside files, supports semantic search (brute-force now, HNSW later), and exposes everything through a minimal IOCTL + mmap interface.<p>Think of it as:<p>A semantic memory layer for local AI agents<p>RAG without a vector DB<p>Vector search as an OS primitive<p>It’s early. It barely works. But it boots.<p>Why? Because if memory’s not snapshotable, it’s not memory. And maybe, just maybe, agents deserve a &#x2F;mnt&#x2F;mem they can mount natively.<p>When I asked Gemini what it thought of the idea, it said:<p>“An OS-level semantic context layer like this could enable more powerful, context-aware, and efficient AI systems.”<p>Not sure if it&#x27;s a brilliant idea or a kernel panic waiting to happen. Either way, I’d love your feedback (and flames).<p>→ <a href="https:&#x2F;&#x2F;github.com&#x2F;lspecian&#x2F;vexfs">https:&#x2F;&#x2F;github.com&#x2F;lspecian&#x2F;vexfs</a>