经 AI Skill Hub 精选评估,CortexDB 获评「强烈推荐」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。
CortexDB 是一款基于 Go 开发的开源工具,专注于 AI、Go、知识图谱 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
CortexDB 是一款基于 Go 开发的开源工具,专注于 AI、Go、知识图谱 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:go install(推荐) go install github.com/liliang-cn/cortexdb@latest # 方式二:从源码编译 git clone https://github.com/liliang-cn/cortexdb cd cortexdb go build -o cortexdb . # 方式三:下载预编译二进制 # 访问 Releases 页面下载对应平台二进制文件 # https://github.com/liliang-cn/cortexdb/releases
# 查看帮助 cortexdb --help # 基本运行 cortexdb [options] <input> # 详细使用说明请查阅文档 # https://github.com/liliang-cn/cortexdb
# cortexdb 配置说明 # 查看配置选项 cortexdb --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export CORTEXDB_CONFIG="/path/to/config.yml"
A pure-Go, single-file AI memory and knowledge graph library and plugin. Use CortexDB as an embedded memory/KG layer in your own Go agent projects, or install it as a shared memory brain for Claude Code and Codex. SQLite is the kernel — one file holds vectors, lexical/RAG search, scoped agent memory, an RDF/SPARQL/RDFS/SHACL knowledge graph, and MCP tools. Works with no embedder (lexical mode) or any OpenAI-compatible embeddings endpoint.
go get github.com/liliang-cn/cortexdb/v2
db, _ := cortexdb.Open(cortexdb.DefaultConfig("KnowledgeMemory.db"))
defer db.Close()
q := db.Quick()
_, _ = q.Add(ctx, []float32{0.1, 0.2, 0.9}, "SQLite is a single-file database.")
hits, _ := q.Search(ctx, []float32{0.1, 0.2, 0.8}, 1)
// No-embedder RAG (lexical):
_, _ = db.SaveKnowledge(ctx, cortexdb.KnowledgeSaveRequest{
KnowledgeID: "apollo", Content: "Alice owns Apollo. Apollo ships Friday."})
resp, _ := db.SearchKnowledge(ctx, cortexdb.KnowledgeSearchRequest{
Query: "Who owns Apollo?", RetrievalMode: cortexdb.RetrievalModeLexical, TopK: 3})
examples/01_core … 15_cortex_query are small and architecture-oriented (go run ./examples/01_core); 01-07/09/15 run standalone, others need an LLM/embeddings/live DB — see examples/README.md.
An embedded local-first AI memory/KG library — not a drop-in replacement for Fuseki/GraphDB/Stardog. One file, Go APIs, tool/MCP surfaces, and enough RDF/SPARQL/RDFS/SHACL to build real memory workflows.
tools := db.GraphRAGTools() // in-process tool calling
server := db.NewMCPServer(cortexdb.MCPServerOptions{}) // MCP server
Tool groups: GraphRAG (ingest_document, search_text, build_context), knowledge/memory (knowledge_save, memory_search, …), KG (knowledge_graph_query, _shacl_validate), KnowledgeMemory (knowledge_memory_recall, _reflect). memoryflow/graphflow/importflow/connector expose their own toolboxes too.
Give Claude Code (and Codex) durable memory + a knowledge graph as a plugin. It bundles the cortexdb skill plus a live MCP server, runs in no-embedder lexical mode by default (no API key, no Go toolchain — the server binary is fetched from the matching release), and stores everything in one global SQLite file shared by every project.
Install — Claude Code — run each as a slash command:
/plugin marketplace add liliang-cn/cortexdb
/plugin install cortexdb@cortexdb
/reload-plugins
Install — Codex — run in your shell:
codex plugin marketplace add liliang-cn/cortexdb
codex plugin add cortexdb@cortexdb
Codex uses the same default global brain at ~/.cortexdb/cortexdb.db.
Use — just talk to Claude; it calls the MCP tools for you ("remember that I prefer …", "what do you know about X?"). Or use the slash commands: /remember <text>, /recall <query>, /cortexdb-graph (interactive knowledge-graph view), or /cortexdb for the skill. Key tools: memory_save / memory_search, knowledge_save / knowledge_search, knowledge_graph_query, and the unified knowledge_memory_recall. When enabled, a SessionStart directive + UserPromptSubmit auto-recall hook make Claude recall and save proactively (it asks once, per machine).
Where data lives — ~/.cortexdb/cortexdb.db by default, so memory follows you across projects (multiple sessions share it safely via SQLite WAL). Override per project:
export CORTEXDB_PATH=.cortexdb/cortexdb.db # inherited by the launched server
To force the same global brain explicitly, set:
export CORTEXDB_PATH="$HOME/.cortexdb/cortexdb.db"
To upgrade: /plugin update cortexdb then /reload-plugins — the server binary auto-refreshes (version-pinned cache). See plugins/cortexdb/README.md for all env vars.
高性能AI内存和知识图谱库
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:CortexDB 的核心功能完整,质量优秀。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | cortexdb |
| 原始描述 | 开源AI工具:A pure-Go, single-file AI memory and knowledge graph library. 。⭐38 · Go |
| Topics | AIGo知识图谱内存库 |
| GitHub | https://github.com/liliang-cn/cortexdb |
| License | MIT |
| 语言 | Go |
收录时间:2026-06-09 · 更新时间:2026-06-11 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。