Code librariesReviewed · liliang-cn

CortexDB

CortexDB is a Go library for developers adding persistent AI memory and a knowledge graph, but automatic memory features require assistant integration. It combines SQLite storage, text search, optional vector retrieval and scoped memories, with documented Claude Code, Codex and shared-server integrations. Runtime behavior was not assessed.

Researched 14 Nov 2026

In short.

CortexDB is a Go memory and knowledge graph library for AI application developers, but automatic recall and capture require assistant integration. Its documented baseline runs locally in SQLite without an embedding model; optional endpoints add embedding-based retrieval and media processing. Plugins and a gRPC server extend it to coding assistants and shared memory. Retrieval quality, privacy filtering, performance and standards compliance remain unverified, and total operating cost is unknown.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to README.md at commit 4bcad338c2dc4b500059d075fa33adb771e98ddc and its accompanying LICENSE notice. The README is the sole resource file; the LICENSE supplies redistribution terms. Linked documentation, source code, dependencies, release artifacts, tests and external services are excluded. Installation, runtime behavior, retrieval quality, filtering, isolation, standards conformance and performance remain unverified.

The overview

identity

CortexDB combines persistent AI memory, retrieval and a knowledge graph. The README presents a pure Go library using SQLite by default, with PostgreSQL and pgvector available through a PostgreSQL connection string.

The library is the core resource. Assistant plugins, MCP tools, a shared gRPC server, language clients and a browser interface provide additional ways to use it. This assessment covers the documented behavior rather than those implementations.

assessment

The documented architecture is a plausible fit for Go applications that need memories, relationships and retrieval together without operating a separate database service. A local configuration can work without an embedding endpoint, while shared deployment and model integrations are optional.

Its breadth also creates evaluation work: storing a memory does not establish that the right memory will be recalled. The README supports an architectural assessment, but supplies no independently verified results for retrieval accuracy, access isolation or operational reliability.

users

Likely users include Go developers building AI assistants or retrieval-augmented generation applications, coding-assistant users seeking memory across sessions, and teams wanting several agents or machines to share a memory store.

Beginners can follow a documented plugin installation path, but still need to understand where memories are stored and when capture occurs. Experienced developers gain graph query languages, retrieval controls and observability settings. Minimum host versions and the supported operating-system matrix are not established here.

capabilities

The README lists full-text, vector, hybrid and graph retrieval; scoped memories; and context packs with sources. Memories are marked as verified or a guess, and recall keeps the two apart. Vector options include HNSW, IVF, flat search and binary codes. Graph features include RDF, SPARQL, inference, validation, read-only Cypher and historical queries.

Assistant integrations offer remember and recall commands, automatic recall and capture. A read-only browser interface displays graph relationships, changes, ontology information and a project-organized memory library. The live view's Recalls page, showing each recall's plan, hits and why each ranked, requires the optional recall log (CORTEXDB_RECALL_LOG=1).

Media ingestion is documented for images, recordings and video, using captions, visible text or transcripts. Optional media embeddings add retrieval by visual content and image queries. These capabilities are documentation claims; their implementation and results were not assessed.

Using it

requirements

The library installation requires a Go environment. The documented local baseline needs a database file and no separate embedding model or database service. Plugin use requires the corresponding assistant host; shared use requires a running cortexdb-grpc server.

For cortexdb-mcp-stdio and cortexdb-grpc, embedding-based retrieval uses an OpenAI-compatible embeddings endpoint, with model and dimension defaulting to text-embedding-3-small and 1536. The README does not document how the Go library itself is given an embedder. Image captioning is documented as using an Ollama vision model. Optional transcription and media embeddings need suitable endpoints; video frame extraction requires ffmpeg.

The README does not establish minimum Go or client versions, production sizing, or complete deployment requirements. The optional cortexdb-live mod uses Claude Code's model access and is described as depending on an early-access host feature.

mechanism

An application stores content through KnowledgeMemory.Remember and requests relevant context through KnowledgeMemory.Recall. The example supplies a memory identifier, user identifier and user scope. Recall returns a context pack whose text can be passed to an assistant.

Without embedding configuration, the documented mode is lexical retrieval: matching text terms. Embeddings add numeric representations for similarity search, while graph retrieval uses stored relationships. The README says recall distinguishes verified memories from guesses; it does not explain how verification labels are assigned.

The optional Claude Code mod uses haiku to plan retrieval and distil idle-session conversations into memories. It documents replacement by stable identifiers and superseding older facts. Codex retains the plugin's shell hooks instead of this mod.

setup

The documented Go installation command is go get github.com/liliang-cn/cortexdb/v2. The usage example opens brain.db with DefaultConfig, obtains KnowledgeMemory and closes the database when finished.

For Claude Code, the README gives /plugin marketplace add liliang-cn/cortexdb followed by /plugin install cortexdb@cortexdb. For Codex, it gives codex plugin marketplace add liliang-cn/cortexdb followed by codex plugin add cortexdb@cortexdb. Codex automatic recall additionally requires reviewing and trusting the plugin hooks in /hooks.

The plugin's default database is ~/.cortexdb/cortexdb.db; CORTEXDB_PATH changes it. CORTEXDB_REMOTE selects a shared server. Embedding configuration differs between the MCP process and gRPC server: the server reads OPENAI_BASE_URL and OPENAI_API_KEY rather than the CORTEXDB_EMBED_BASE_URL override. No installation was performed.

example

The supplied Go example stores the sentence Alice prefers tabs. It assigns MemoryID alice-tabs, UserID alice and Scope user, then recalls with the question what does Alice prefer? and the same user identifier. It prints rec.ContextPack.Text.

This illustrates the API pattern for retaining a user preference and retrieving context later. The snippet assumes ctx already exists and discards returned errors; an application should handle those errors. No returned text, ranking or execution result is supplied, so successful recall is not established.

Assessment & evidence

limitations

The README reports an EmbeddedConfig example opening 100,000 vectors of 768 dimensions in 0.28 seconds with a 193 MB heap. Hardware, reproduction steps and detailed measurements are absent from this evidence, so those figures do not establish expected performance for another workload. Claimed W3C test-suite results also remain unverified.

Capture is described as excluding credentials and private-marked text, but filtering effectiveness is unknown. The review gate is off by default and explicitly described as a curation filter rather than access control. User and project isolation guarantees are not established.

A direct host:port connection to cortexdb-grpc is plaintext; TLS is documented only through an https address behind a proxy. CORTEXDB_GRPC_TOKEN supplies a bearer token. Recall logging records queries. Its documented defaults retain up to 30 days or 100,000 recall records when enabled. These settings affect deployment and data handling; security properties, backup recovery and concurrent-write behavior were not assessed.

reasoning

Combining memory, text search and graph relationships in one embedded store could reduce integration work for a Go application needing all three. That is an architectural inference from the documented design, not a measured productivity result.

The model-free path provides a way to begin without an embedding dependency. Whether it retrieves useful context depends on the vocabulary and questions in the application. Verification labels and history can help inspect stored claims, but their presence alone does not establish that those claims are correct.

alternatives

The documented deployment choices address different needs: embedded SQLite for an application-local store, cortexdb-grpc for shared access, and PostgreSQL with pgvector for a PostgreSQL-backed deployment. Lexical retrieval avoids an embedding endpoint; embedding-based retrieval adds another dependency and a different retrieval approach.

Existing assistant file memory is another option for projects needing only durable notes. The README documents importing such memory from Claude Code, Codex and DeepSeek Harness. Whether migration improves retrieval is unknown. No comparative evidence supports ranking CortexDB against other memory or graph products.

evidence

The evidence consists of the project's README and accompanying MIT LICENSE. The original README address is [https://github.com/liliang-cn/cortexdb/blob/main/README.md]. The exact captured README is [https://raw.githubusercontent.com/liliang-cn/cortexdb/4bcad338c2dc4b500059d075fa33adb771e98ddc/README.md].

These are first-party descriptions and license terms. Linked guides, implementation files, dependencies, CI results, test suites and release packages are outside this evidence. Badges and reported results do not establish successful execution. No software was executed.

Access & freshness

costs

The README provides no software subscription price, hosting tariff or measured operating cost. Total cost is unknown. Local operation without an embedding endpoint avoids requiring an external embedding account, but still uses the operator's computing and storage resources.

Shared hosting, embedding services and media processing can introduce additional costs depending on deployment and provider. The Claude Code mod uses the host's model access without a separate API key; that does not establish that model usage is free. No usage volumes or provider rates are supplied.

rights

The accompanying MIT License permits use, copying, modification, distribution, sublicensing and sale of the software and associated documentation. Copies or substantial portions must retain the copyright and permission notice. The stated copyright is 2025 liliang-cn.

The license disclaims warranties and liability. It supports redistribution of the captured README with the required notice. Terms for optional providers and rights to content placed in the database are not established by this license. License source: [https://raw.githubusercontent.com/liliang-cn/cortexdb/4bcad338c2dc4b500059d075fa33adb771e98ddc/LICENSE].

freshness

The documented snapshot is commit 4bcad338c2dc4b500059d075fa33adb771e98ddc, captured on 2026-11-14 at 04:44:18.634 UTC. Later changes are unknown.

The Go module path identifies major version 2 rather than an exact release. The README limits cortexdb-mcp --doctor --self-test diagnostics to v2.119.0 and later. Installation commands using @latest can resolve to a different revision; compatibility across the listed plugins, clients and server is not established here.

actions

Choose the library or assistant integration that matches the intended application, decide between local and shared storage, and confirm the installed version. Begin with a known memory and an expected recall answer before adding optional embedding or media services. These are suggested evaluation steps, not completed tests.

Before relying on shared or sensitive memory, establish scoped retrieval behavior, correction and supersession handling, capture filtering, transport configuration and log retention. Obtain reproducible evidence for any performance or standards requirement that matters to the application.

Evidence for this report

LICENSEnotice · checked 2026-11-14
README.mdselected · checked 2026-11-14