Vector and hybrid retrieval for structured data. Flex compiles any data source into a SQLite database with embeddings, knowledge graphs, and structured views. Installing flex registers an MCP endpoint with a single tool — the AI agent reads the schema and writes SQL against the database.
curl -sSL https://getflex.dev/install.sh | bash- flexvec — SQL vector retrieval kernel. suppress, diversify, decay, trajectory — composable operations on the score array before selection. paper.
- MCP server — a single read-only tool (
flex_search). The agent discovers the schema at runtime and writes SQL. - worker — a background service that detects new data and embeds it within seconds.
- modules — data source adapters.
claude_codeships built-in.
The claude_code module indexes your entire Claude Code session history — file lineage, decision archaeology, weekly digests. One install command.
curl -sSL https://getflex.dev/install.sh | bash -s -- claude-codeThe installer scans existing sessions, embeds everything, starts a background worker, and registers the MCP server.
"Use flex: what's the history of worker.py?"
"Use flex: what did we build this week?"
"Use flex: how did we create the curl install script?"
data source
│
[compile] parse → chunks + metadata + embeddings
│
▼
SQLite database
│
[manage] knowledge graph, fingerprints, project attribution
│
[MCP server] read-only SQL surface
│
▼
AI agent writes SQL
Each database is a single .db file with the same schema — chunks, edges, enrichments, and views. The database describes itself; the agent discovers what's available at query time.
ls ~/.flex/cells/
claude_code.db 284M
sqlite3 claude_code.db "SELECT COUNT(*) FROM sessions"
4547Everything runs in-process. No external services, no cloud dependency.
curl -sSL https://getflex.dev/install.sh | bashMIT · Python 3.12 · SQLite · getflex.dev · paper · x
