You ask questions. Claude reads the schema, writes SQL, and returns the answer. Flex gives Claude persistent memory — it indexes whatever sessions exist on disk at install time (~30 days of history), then captures everything going forward.
After flex init, open a new Claude Code session and try:
"Use flex: what did we build this week?"
Claude runs @orient to learn the schema, writes a query, and returns a summary. That's the whole UX.
use flex:, use flex., use flex search, and freeform all work.
Ask about any file. Claude traces it through every session that ever touched it — who created it, when, what changed, what it became.
"Use flex: what session created src/worker.py?"
Returns the session ID, timestamp, and context around why it was written.
"Use flex: show me every session that touched auth.py"
Lists every Read, Write, and Edit operation across all sessions, in order. Tracks the file across renames.
"Use flex: what was the last change to config.py and why?"
Finds the most recent Edit, shows the diff, and pulls the surrounding conversation for context.
"Use flex: what are the most-touched files in this project?"
Hotspot analysis across all sessions. Shows which files get the most attention.
Every Claude Code session is a unit of work. Flex indexes tool calls, user prompts, agent delegations, and files touched. Once indexed, sessions persist in the cell even after Claude prunes the source JSONLs.
"Use flex: tell me the story of session abc123"
Timeline with artifacts, tool usage breakdown, and key decisions.
"Use flex: what files were modified in session abc123?"
Every file operation with tool name (Read/Write/Edit) and timestamps.
"Use flex: which sessions involved database migrations?"
Semantic search across all sessions. Finds sessions by concept, not just keywords.
"Use flex: show the delegation tree for session abc123"
If a session spawned sub-agents, shows the parent → child topology.
Flex maps sessions to repos automatically. Ask about activity across time.
"Use flex: what did we accomplish this week?"
Sessions grouped by day, tools used, files touched, project breakdown.
"Use flex: show my recent work sprints"
Detects natural work blocks separated by 6+ hour gaps. Shows duration and density.
"Use flex: what projects am I working on?"
Session counts grouped by project, with recency.
"Use flex: what are the most important sessions for this project?"
Hub sessions have the highest centrality in the knowledge graph — they connect the most ideas.
The hardest question in software: why was it done this way? Flex searches the actual conversations where decisions were made.
"Use flex: why did we switch from Redis to SQLite?"
Finds the session where the decision was discussed, with the reasoning.
"Use flex: trace the lineage of our authentication system"
Timeline of every session that touched the concept, ordered chronologically. Hub sessions first.
"Use flex: how did our deployment strategy change between January and February?"
Side-by-side comparison of a concept in two time periods.
"Use flex: what decisions from last month haven't been implemented?"
Cross-references decisions with file changes to find gaps.
Ask anything. Flex uses 128-dimensional embeddings to find sessions by meaning, not keywords.
"Use flex: what do we know about error handling?"
Returns diverse results across subtopics. Finds patterns you didn't know existed.
"Use flex: find where we discussed the rate limiting bug"
Narrower search. Returns the most relevant matches.
"Use flex: what have I asked about testing?"
Filters to only your messages — what you requested, not what Claude generated.
"Use flex: what topic clusters exist in my sessions?"
The knowledge graph organizes sessions into communities. See which clusters emerged.
Presets are named queries that ship with Flex. Claude uses them automatically when they fit, but you can also ask for them by name.
| Preset | What it does | Parameters |
|---|---|---|
@orient | Full cell orientation — shape, schema, graph intelligence, presets | |
@digest | Multi-day activity summary — sessions, tools, files | days (default: 7) |
@file | Find sessions that touched a file (tracks renames) | path (required) |
@story | Session narrative — timeline, artifacts, agents | session (required) |
@sprints | Work sprints detected by time gaps | limit (default: 20), gap_hours (default: 6) |
@genealogy | Trace a concept's lineage — timeline, hubs, key excerpts | concept (required) |
@session-files | All files touched in a session with operations | session (required) |
@file-hotspots | Most-touched files across all sessions | limit (default: 30) |
@delegation-tree | Recursive parent → child agent tree | session (required) |
@bridges | Cross-community connector sessions | |
@file-search | BM25 search over file content (Write/Edit/Read) | query (required) |
@health | Pipeline health check — counts, coverage, queue depth |
@orient. You rarely need to name them — just describe what you want.
"Use flex: what did we do?" is too broad. "Use flex: what did we build this week in the auth module?" gets better results.
"Use flex: what's the history of worker.py?" uses the @file preset, which tracks the file across renames via SOMA identity. More precise than semantic search.
For complex research, delegate to flx-trace — a general-purpose retrieval sub-agent that runs multiple queries without filling your context window.
"Use flx-trace: reconstruct how the deployment pipeline evolved"
"Use flx-trace: what projects am I working on?"
If you have multiple cells (e.g. claude_code + a documentation corpus), you can ask Claude to query both in the same conversation. It runs them in parallel automatically.
"Use flex: search claude_code for auth sessions and flexsearch-context for auth design docs"
Sessions are captured in real time. The worker indexes within seconds of each tool call. No need to run flex index manually.
You can also query from the terminal without Claude:
$ flex search "@digest days=3"
$ flex search "@file path=src/worker.py"