Agents

Agents

fai works with 15 coding agents. When you run fai, it:

  1. Writes your project context to that agent's native rules file
  2. Opens the agent (or prints setup instructions for IDE extensions)
  3. Reads session logs after the session ends (where supported)
  4. 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.

AgentCommandRules fileLog capture
Claude CodeclaudeCLAUDE.md (via hooks)✅ Real-time (native hooks)
Codex CLIcodexAGENTS.md~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
OpenCodeopencode.opencode-fai-context.md.opencode/*.jsonl in project
Goosegoose.goosehintsDeferred (SQLite)
Aideraider.aider-fai-context.md.aider.chat.history.md
Gemini CLIgeminiGEMINI.md~/.gemini/tmp/<hash>/chats/*.jsonl
Amazon Qq.amazonq-fai-context.mdDeferred

GUI agents

fai launches the app and returns immediately. Your session runs in the IDE.

AgentCommandRules fileLog capture
Windsurfwindsurf {cwd}.windsurf/rules/fai-context.md~/.codeium/windsurf/cascade/
Cursorcursor {cwd}.cursor/rules/fai-context.mdcDeferred (workspace SQLite)
Antigravityagy {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.

AgentRules fileLog capture
Cline.clinerules{AppData}/Code/.../saoudrizwan.claude-dev/tasks/
Continue.dev.continuerules~/.continue/sessions/*.jsonl
GitHub Copilot.github/copilot-instructions.mdDeferred (workspace-scoped)
JetBrains AI.aiassistant/rules/fai-context.mdDeferred

Daemon agent

AgentIntegrationLog capture
OpenClawHook 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

On this page