Skip to main content

Knowledge engine for AI agents. Compile any data source into a queryable SQLite cell with embeddings, graph intelligence, and full-text search.

Project description

flex

flex

PyPI License: MIT Python 3.12+

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

what's inside

  • 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_code ships built-in.

claude code

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-code

The 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?"

claude code docs

how it works

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.

local-first

ls ~/.flex/cells/
claude_code.db    284M

sqlite3 claude_code.db "SELECT COUNT(*) FROM sessions"
4547

Everything runs in-process. No external services, no cloud dependency.


curl -sSL https://getflex.dev/install.sh | bash

MIT · Python 3.12 · SQLite · getflex.dev · paper · x

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.

getflex-0.30.0-py3-none-any.whl (663.0 kB view details)

Uploaded Python 3

File details

Details for the file getflex-0.30.0-py3-none-any.whl.

File metadata

  • Download URL: getflex-0.30.0-py3-none-any.whl
  • Upload date:
  • Size: 663.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for getflex-0.30.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07bdd217ad601441a02877352e7f62446e870aa66174ba5c375a70639da31df7
MD5 f8af81596c7cef4dbd997bd788c659be
BLAKE2b-256 9b4ae9b2c75310d32b84300f94112b29ec8fb62ef48443cce25584a6c966d212

See more details on using hashes here.

Provenance

The following attestation bundles were made for getflex-0.30.0-py3-none-any.whl:

Publisher: pypi-publish.yml on damiandelmas/flex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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