Docs menu

Your First Session

Run fai in your project

$ cd your-project
$ fai

You see (trimmed, with example models):

🧠 Synthesis provider
────────────────────────────────────────
? Select synthesis provider
❯ ollama — qwen2.5-coder:7b (free, local)
  Custom OpenAI-compatible endpoint
  Capture-only (no synthesis)

? Embeddings provider
❯ ollama — nomic-embed-text:latest (768-dim)
  Local ONNX (offline, last resort)
  Custom OpenAI-compatible endpoint

✓ Embeddings configured: ollama — nomic-embed-text:latest

🔧 Your setup
────────────────────────────────────────
  Model:  qwen2.5-coder:7b (local)
  Mode:   watch — fai captures while you code

  Your AI forgets between sessions. fai remembers.
  While you work, fai compounds your context —
  mechanical and AI-driven, growing with you.

That's the only setup. fAI asks two questions the first time: which model distills your sessions, and which one indexes them for recall. Every run after that skips them. Change either later with fai synthesize - see Local Models and Tuning.

Leave it running

While fai runs, it:

  • Captures - reads your agents' logs as you work and records them into your session
  • Serves - runs its MCP server, and has written it into the config of each detected agent that supports MCP
  • Points - has written a short block into each detected agent's rules file, naming the files your agent should read

Stop it with Ctrl+C when you're done.

Work in your agent, as usual

Open Claude Code, Cursor, Codex or whichever agent you use, in the same project, and work the way you normally do. fAI isn't in the conversation. It doesn't answer you or make choices for you. Your agent does that.

What fAI adds is in front of your agent before you type. In CLAUDE.md (and AGENTS.md, .cursor/rules/fai-context.mdc and the rest) there's now a block like this:

<!-- fai:context -->
## fai Context

- Project knowledge: ~/.fai/workbenches/<id>/FAI-PROJECT.md
- Personal preferences: ~/.fai/personal/FAI-PERSONAL.md
- Active session: ~/.fai/sessions/<session-id>/FAI-SESSION.md
<!-- /fai:context -->

fAI rewrites only that block. Everything else in the file is yours. On a brand-new project, the first line can say the project knowledge is "not initialized yet": there's nothing to point at until fAI has captured some work and synthesized it.

Behind the scenes

While you work:

  • Capture. What your agent logs is captured into your session, each capture as its own commit.
  • Seal. Every few minutes, the session seals into fAI's git repositories.
  • Synthesis. On a cadence, the model you chose distills what's been captured into decisions, patterns, context and petnames, and fAI rebuilds FAI-PROJECT.md and FAI-PERSONAL.md from them.

You don't run any of this. With Capture-only, capture and seal still happen; synthesis waits until you choose a model. The details are in How fAI builds compounding intelligence.

Coming back

Next time, run fai again. From the second run on, it opens with a menu:

$ fai
? Resume a session
❯ Continue: <your session> · 1 day ago · …
  Start new session
  Manage this session
  Manage Synthesis

Continue your session and open your agent. It starts a new conversation, already pointed at what fAI has synthesized so far. What carries over is what's in those files, not the old chat. See What the next session gets.

fai --auto skips the menu and continues this project's most recently started session (one started or used in this folder), or creates one if there is none.

See what your agent can see

Open a second terminal:

$ fai --preview

This opens MCP Inspector in your browser. You can see every tool your agent can call, every piece of context fAI captured, and the project knowledge fAI has built. Browse entries, call tools yourself, and check exactly what your agent reads.

First run vs. every run after

First run: fAI asks the two setup questions above, then starts your first session automatically. There's no session menu yet, because there's nothing to choose from.

Second run onward: fAI opens with a session menu. You can continue a session, start a new one, manage one (rename or finish it), or change your providers with Manage Synthesis. See Sessions.


On fathym.com: fAI →

On this page