Agents
Agents
fai works with 15 coding agents. When you run fai, it:
- Writes your project context to that agent's native rules file
- Opens the agent (or prints setup instructions for IDE extensions)
- Reads session logs after the session ends (where supported)
- Feeds everything captured into synthesis
Launch any agent:
fai --agent cursor
fai --agent cline
fai --agent codex
fai --agent windsurf
fai --agent goose
fai --agent antigravity
Run fai without --agent to pick interactively from detected agents.
How context injection works
Before launching, fai writes your accumulated project context into the agent's
native rules/instructions file. The block is idempotent — re-running fai
refreshes the block in-place without duplicating it.
fai --agent cursor → writes .cursor/rules/fai-context.mdc
fai --agent cline → writes .clinerules
fai --agent codex → writes AGENTS.md
This happens for ALL registered agents on every fai invocation — not just the
one being launched. Any IDE you open after running fai already has current
context.
Context injection is error-tolerant. One agent's rules file failing to write never delays session launch or blocks other agents.
All 15 agents receive context injection into their native rules files. 11 of
those (Claude, Cursor, Cline, Copilot, Windsurf, Codex, Gemini, JetBrains,
Goose, Antigravity, OpenCode) also get MCP server configuration written to
user-level global paths on each session start. Claude uses type: 'stdio'; all
others use type: 'http'.
Switch without losing context. Your vault follows you across tools. Start
a session with fai --agent claude, then open Cursor in the same project —
your accumulated context is already there.
CLI agents
These agents run in your terminal. fai waits until you exit.
| Agent | Command | Rules file | Log capture |
|---|---|---|---|
| Claude Code | claude | CLAUDE.md (via hooks) | ✅ Real-time (native hooks) |
| Codex CLI | codex | AGENTS.md | ✅ ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
| OpenCode | opencode | .opencode-fai-context.md | ✅ .opencode/*.jsonl in project |
| Goose | goose | .goosehints | Deferred (SQLite) |
| Aider | aider | .aider-fai-context.md | ✅ .aider.chat.history.md |
| Gemini CLI | gemini | GEMINI.md | ✅ ~/.gemini/tmp/<hash>/chats/*.jsonl |
| Amazon Q | q | .amazonq-fai-context.md | Deferred |
GUI agents
fai launches the app and returns immediately. Your session runs in the IDE.
| Agent | Command | Rules file | Log capture |
|---|---|---|---|
| Windsurf | windsurf {cwd} | .windsurf/rules/fai-context.md | ✅ ~/.codeium/windsurf/cascade/ |
| Cursor | cursor {cwd} | .cursor/rules/fai-context.mdc | Deferred (workspace SQLite) |
| Antigravity | agy {cwd} | AGENTS.md (free — already written by fai) | ⏳ Phase 3 (.pb binary) |
Extension agents
fai writes the rules file and prints instructions. No binary is launched — open the extension in your IDE as usual.
| Agent | Rules file | Log capture |
|---|---|---|
| Cline | .clinerules | ✅ {AppData}/Code/.../saoudrizwan.claude-dev/tasks/ |
| Continue.dev | .continuerules | ✅ ~/.continue/sessions/*.jsonl |
| GitHub Copilot | .github/copilot-instructions.md | Deferred (workspace-scoped) |
| JetBrains AI | .aiassistant/rules/fai-context.md | Deferred |
Daemon agent
| Agent | Integration | Log capture |
|---|---|---|
| OpenClaw | Hook package installed at ~/.openclaw/hooks/fai-capture/ | ✅ Real-time (native hooks) |
Detecting installed agents
fai detect --agents
Scans which agent binaries are on your PATH. Results cached at ~/.fai/detect.json.
Extension agents (Cline, Continue, Copilot, JetBrains) are always listed since they
don't require a binary.
Configure your synthesis provider
Agents use your configured synthesis provider to distill session captures into knowledge. Run:
fai synthesize
To configure which model powers synthesis. See Local Models → for setup with Ollama, LM Studio, or cloud API keys.
Right AI for the Job → — deeper look at agent categories