CLI-справка
Один бинарь — все среды выполнения: безголовые запуски, интерактивный TUI, HTTP-сервер, MCP-эндпоинт и инструменты обслуживания. Все команды и флаги fathom.
One binary, every runtime: headless runs, interactive TUI, HTTP server, MCP endpoint and maintenance tools. All commands and flags of fathom.
Обзор команд
fathom
run Run a research task (headless)
tui Interactive TUI
serve HTTP API server + dashboard
mcp-serve Expose the agent tools over MCP (stdio)
memory Semantic memory: search / list / stats / distill / gc
sessions Browse past sessions
resume Resume an interrupted session
config Show or set configuration values
profiles List / show / create personas
contacts Contact database: list / export / dedup / push-crm
jobs Durable background jobs
bench Benchmark the tool-execution layer
stats Tool-call statistics for a recorded session run
Автономный консольный режим. Координатор декомпозирует запрос на субагентов, синтезирует их результаты и формирует структурированный отчёт. С флагом --repeat переходит в режим мониторинга: каждый прогон сравнивается с предыдущим и отправляет алерты по новым контактам.
| Флаг | Описание |
|---|---|
| -o, –output <DIR> | Каталог вывода результатов (по умолчанию: из конфига) |
| –repeat <SECS> | Watch-режим — повторный запуск каждые N секунд, сравнение запусков, оповещение о новых контактах |
| –profile <NAME> | Персона: hunter | analyst | validator | файл в ~/.fathom/profiles/ | путь к .toml |
| –task-file <FILE> | Read task from a file instead of the positional argument |
fathom run "Compare Rust and Go for backend services" --output ./research/
# watch mode: re-collect every 6 hours, alert on new contacts
fathom run "Acme leadership team" --repeat 21600
# with a persona
fathom run --profile hunter "Find the CTO of Acme"tui
Интерактивный терминальный интерфейс (ratatui): живое дерево агентов, стриминговый вывод, журнал событий, панели jobs и memory, флоу одобрения. Клавиши и панели — в разделе TUI-интерфейс.
| Флаг | Описание |
|---|---|
| [QUERY] | Опциональный стартовый запрос |
| –profile <NAME> | Персона, применяемая к сессиям, запущенным из TUI |
| –replay <SESSION-ID> | Повторить сохранённую сессию вместо живого запуска (допускается совпадение по префиксу) |
fathom tui
fathom tui "Find VPs of Engineering at fintech startups" --profile analyst
fathom tui --replay 3f9c2a # browse a saved sessionserve
HTTP-сервер Axum: управление сессиями и задачами, потоки событий SSE, memory API, метрики Prometheus и веб-дашборд на /dashboard. По умолчанию слушает loopback.
| Флаг | Описание |
|---|---|
| –port <PORT> | Порт прослушивания (по умолчанию: 8080) |
| –host <HOST> | Адрес привязки (по умолчанию: 127.0.0.1) |
--host 0.0.0.0) требует установки FATHOM_API_KEYS — иначе запуск отклоняется. Ключи передаются через Authorization: Bearer или X-Api-Key.fathom serve --port 8080
fathom serve --host 0.0.0.0 # requires FATHOM_API_KEYSmcp-serve
Предоставляет все инструменты агентов внешним MCP-клиентам (Claude, ZCode и др.) через stdio. Вызовы инструментов выполняются через тот же реестр, что используют агенты. Логи идут в stderr, поэтому stdout остаётся чистым JSON-RPC.
fathom mcp-serveДобавьте его в конфиг вашего MCP-клиента:
{ "command": "fathom", "args": ["mcp-serve"] }memory
Поддерживайте долгосрочную семантическую базу знаний без запуска агента: гибридный поиск (вектора + BM25), цепочек версий с возможностью только добавления (append-only), дистилляция и GC. Ничто никогда не удаляется молча.
| Подкоманда | Флаги | Описание |
|---|---|---|
| search <query> | –top-k (default 10), –scope agent|user|run|all | Гибридный семантический + ключевой поиск |
| list | –scope, –status active|superseded|archived|all, -n | Перечислить сохранённые факты, новейшие первыми |
| get <id> | –follow active|latest|full_history | Одна запись плюс её цепочка версий |
| stats | — | Подсчёты по области/статусу, граф сущностей, размер БД |
| rebuild | — | Пересоздать эмбеддинги всех фактов текущей моделью |
| distill | –session <key>, –dry-run | Дистиллировать run-scoped факты сессий в долговременные знания |
| gc | –ttl-days <N>, –dry-run | Архивировать устаревшие run-факты, сжать разросшиеся группы областей |
| nuke | –scope, –yes | Полностью удалить записи области; требует явного --yes |
fathom memory search "email of the director of Acme" --top-k 10
fathom memory list --scope agent --status active -n 20
fathom memory get 7f31 --follow full_history
fathom memory stats
fathom memory distill --dry-run
fathom memory gc --ttl-days 30 --dry-runsessions
Просматривайте историю сессий, хранящуюся в базе данных.
| Подкоманда | Флаги | Описание |
|---|---|---|
| list | -n <LIMIT> (default 20), -s, –search <SUBSTR> | Недавние сессии, новейшие первыми; опциональный фильтр по подстроке запроса |
| show <id> | — | Одна сессия подробно: агенты + находки (принимается уникальный префикс) |
fathom sessions list -n 10 --search "fintech"
fathom sessions show 3f9c2aresume
Возобновите прерванную сессию: повторно запускает незавершённые подзадачи из сохранённого состояния в .research.db.
| Флаг | Описание |
|---|---|
| -o, –output <DIR> | Каталог вывода сессии (содержит .research.db); по умолчанию: настроенный каталог вывода |
| -s, –session-id <ID> | Сессия для возобновления; по умолчанию: самая последняя прерванная |
fathom resume --output ./results/config
Показать или отредактировать ~/.fathom/config.toml из командной строки. Ключи используют точечную нотацию: section.field.
fathom config show
fathom config set agent.max_depth 3
fathom config set agent.max_agents 30profiles
Персоны для run --profile и tui --profile: готовый системный промпт плюс опциональные переопределения модели, температуры, глубины, числа агентов и запрещённых инструментов. Встроенные: hunter, analyst, validator; ваши TOML-файлы лежат в ~/.fathom/profiles/.
fathom profiles list
fathom profiles show hunter
fathom profiles new my-persona # creates a template filecontacts
База OSINT-контактов, собранная save_contacts: список, экспорт, дедупликация и отправка в настроенную CRM (amoCRM, Bitrix24, HubSpot — дедупликация по crm_id, без дубликатов при повторных пушах).
| Подкоманда | Флаги | Описание |
|---|---|---|
| list | –limit (default 50) | Перечислить сохранённые контакты |
| export | –format csv|vcf|json|xlsx (default csv), -o, –output <DIR> | Экспортировать контакты в файл |
| dedup | –merge | Найти дубликаты (нормализованные email/телефон); --merge сводит каждую группу в самую полную строку |
| push-crm | — | Отправить все сохранённые контакты в настроенную CRM |
fathom contacts list
fathom contacts export --format csv
fathom contacts dedup # dry run: list groups
fathom contacts dedup --merge # actually merge them
fathom contacts push-crmjobs
Устойчивые фоновые задачи в SQLite: попытки с самовосстанавливающимся ретраем (задача повторно отправляется с добавлением предыдущей ошибки), переживают рестарты.
| Подкоманда | Флаги | Описание |
|---|---|---|
| submit <task> | –attempts (default 3) | Запустить задачу отсоединённо в фоне |
| list | — | Перечислить все задачи |
| status <id> | –watch <SECS> | Подробный статус; --watch обновляет до терминального состояния |
| logs <id> | -n <LINES> (default 50) | stdout + stderr всех попыток |
| cancel <id> | — | Отменить поставленную в очередь или выполняющуюся задачу |
| rerun <id> | — | Перезапустить завершённую/отменённую/устаревшую задачу с нуля |
fathom jobs submit "Analyze the market of AI agents" --attempts 3
fathom jobs list
fathom jobs status 9b2e --watch 5
fathom jobs logs 9b2e
fathom jobs cancel 9b2e
fathom jobs rerun 9b2ebench
Бенчмарк слоя выполнения инструментов — без сети и LLM; фикстуры генерируются автоматически. Девять сценариев охватывают overhead диспетчеризации, параллельные батчи, масштабирование парсеров и семантическую память.
| Флаг | Описание |
|---|---|
| -s, –scenario <NAME> | Сценарий для запуска (по умолчанию: all) |
| -n <N> | parallel-безопасные вызовы / файлы данных в batch-сценариях (по умолчанию: 16) |
| –save <FILE> | Также записать markdown-отчёт в файл |
fathom bench # all scenarios
fathom bench -s feed-parse # feed parsing (quick-xml)
fathom bench -s code-map # code_symbols / repo_map
fathom bench -s memory # absorb / search / digeststats
Статистика вызовов по каждому инструменту — задержки p50/p95 — вычисленные из реальной записанной сессии (.research.db).
| Флаг | Описание |
|---|---|
| -o, –output <DIR> | Каталог вывода сессии; по умолчанию: настроенный каталог вывода |
fathom stats -o ./results/worker
Внутренний режим воркера — запускается автоматически координатором при use_multiprocess = true. Не предназначен для прямого вызова.
| Флаг | Описание |
|---|---|
| –session-id <ID> | Id сессии (обязательно) |
| –agent-id <ID> | Id агента (обязательно) |
| –task <TEXT> | Описание задачи (обязательно) |
| –socket <PATH> | Путь к Unix-сокету для IPC с координатором (обязательно) |
| –role <ROLE> | Роль агента: coordinator, researcher, analyst, verifier, writer (по умолчанию: researcher) |
TUI-интерфейс
Шапка показывает id сессии, прошедшее время и спарклайн расхода токенов за сессию. В replay-режиме шапка помечена [REPLAY], и сохранённое дерево агентов загружается с финальными статусами.
Клавиши
| Клавиша | Действие |
|---|---|
| q | Выйти (также Ctrl+C) |
| i | Режим вставки — ввести запрос |
| Enter | Отправить запрос (режим вставки) |
| Shift+Enter | Перевод строки во вводе |
| Esc | Выйти из режима вставки / вернуться к панели ввода |
| Tab / BackTab | Переключать панели |
| Up / Down | Прокрутка — или перемещение курсора агента в панели Agents; история ввода в поле ввода |
| Left / Right | Свернуть / развернуть поддерево агента (панель Agents) |
| t | Переключить панель мышления |
| c | Очистить вывод |
| y / n | Одобрить / отклонить ожидающий вызов инструмента с побочным эффектом |
| ? | Оверлей справки по раскладке |
| Ctrl+V | Режим вставки (bracketed paste) |
Панели
Живое дерево агентов: координатор, субагенты, статусы. Навигация курсором, поддеревья сворачиваются Left/Right.
Финальный собранный вывод, стримится токен за токеном по мере генерации автором.
Журнал событий: запуски агентов, вызовы инструментов с таймингами, предупреждения и находки.
Устойчивые фоновые задачи, поданные через jobs submit — состояние и попытки с одного взгляда.
Недавние записи из семантического хранилища памяти, обновляются вживую.
Ввод запроса с навигацией по истории (Up/Down) и выделенным режимом вставки.
Структура вывода
Каждый запуск пишет одинаковую структуру в свой каталог вывода — плюс опциональные PDF/HTML/JSON/DOCX экспорты, если настроены.
output/
├── index.md # table of contents + metadata
├── summary.md # final synthesis
├── findings/ # findings per subtask
│ ├── finding-1.md
│ ├── finding-2.md
│ └── finding-3.md
├── sources.md # source list
└── .research.db # session SQLite databaseCommon Workflows
These multi-step workflows show how to combine CLI commands for real-world use cases.
Workflow 1 — Research → Export → Push to CRM
The standard end-to-end pipeline: run a research task, export contacts, deduplicate, and push to your CRM.
# 1. Run the research with the hunter profile
fathom run --profile hunter "Find VPs of Engineering at Series B startups" -o ./fintech-vps/
# 2. Review the results
fathom sessions show --output ./fintech-vps/
# 3. Export contacts to CSV
fathom contacts export --format csv -o ./fintech-vps/
# 4. Deduplicate (dry run first, then merge)
fathom contacts dedup
fathom contacts dedup --merge
# 5. Push to your configured CRM
fathom contacts push-crmWorkflow 2 — Resume crashed session
If a long-running session was interrupted (network drop, system restart), you can resume from
where it left off using the persisted state in .research.db.
# 1. Find the interrupted session
fathom sessions list -n 5
# 2. Resume it (defaults to most recent interrupted session)
fathom resume --output ./fintech-vps/
# 3. Check the completed results
fathom sessions show --output ./fintech-vps/
fathom stats -o ./fintech-vps/Workflow 3 — Memory management
Keep the long-term memory store clean and useful: search, review, boost important facts, distill session-scoped knowledge into durable records, and garbage-collect stale entries.
# 1. Check what's in memory
fathom memory stats
# 2. Search for specific knowledge
fathom memory search "CTO of Acme Corp" --top-k 5
# 3. View a record and its version history
fathom memory get 7f31 --follow full_history
# 4. Distill session facts into durable knowledge
fathom memory distill --session a3f2 --dry-run
fathom memory distill --session a3f2
# 5. Garbage-collect stale run-scoped facts (older than 30 days)
fathom memory gc --ttl-days 30 --dry-run
fathom memory gc --ttl-days 30
# 6. Rebuild embeddings after upgrading the embedding model
fathom memory rebuildWorkflow 4 — Job management
Submit long-running tasks as durable background jobs that survive restarts and self-heal on failure.
# 1. Submit a job (detached, runs in background)
fathom jobs submit "Analyze the AI agent market landscape" --attempts 3
# 2. List all jobs and their states
fathom jobs list
# 3. Watch a job until it completes (refreshes every 5 seconds)
fathom jobs status 9b2e --watch 5
# 4. View the job's stdout/stderr logs
fathom jobs logs 9b2e -n 100
# 5. If it failed, re-run it
fathom jobs rerun 9b2e
# 6. Cancel a stuck job
fathom jobs cancel 9b2eWorkflow 5 — Profile-based campaigns
Create a custom profile for a specific campaign type, then reuse it across multiple runs.
# 1. Create a new profile from template
fathom profiles new series-b-outreach
# 2. Edit the profile (set prompt, model, temperature)
# vim ~/.fathom/profiles/series-b-outreach.toml
# 3. Verify the profile
fathom profiles show series-b-outreach
# 4. Run with the profile
fathom run --profile series-b-outreach "Find CTOs at Series B companies in fintech"
# 5. Reuse for a different vertical
fathom run --profile series-b-outreach "Find CTOs at Series B companies in healthtech"TUI Deep Dive
The TUI (Terminal User Interface) is built with ratatui and provides a real-time view
into the agent swarm. Here’s a detailed look at each panel and feature.
Panel details
Live agent tree showing the coordinator at the root and sub-agents as children. Each agent displays its status (running, complete, failed), current tool call, and elapsed time. Use Up/Down to move the cursor, Left/Right to collapse/expand subtrees. The selected agent’s details appear in the Output panel.
The final assembled output, streamed token-by-token as the writer produces it. In replay mode, this shows the complete saved output. When multiple writers run in parallel, their outputs are interleaved with agent-id markers.
Event log showing: agent spawns with task descriptions, tool calls with argument summaries and execution time in milliseconds, warnings (compaction events, truncation), and findings as they’re discovered. Each entry is timestamped relative to session start.
Active and recent tool calls with their arguments, execution status, and timing. Shows which tools are running in parallel and which are serialized. Pending approval calls are highlighted — press y or n to act.
Durable background jobs submitted via jobs submit. Shows job state (queued, running, complete, failed), attempt count, and last error if any. Refreshes automatically.
Recent records from the semantic memory store. Shows new facts as they’re absorbed during the run. Useful for verifying that the agent is remembering the right things.
Header sparkline
The header bar shows three things: the session ID (first 8 chars), elapsed time (MM:SS format), and a sparkline chart of token spend. The sparkline is a rolling 60-second window showing how many tokens were consumed per second. A flat sparkline means the agent is waiting (blocked on a tool or idle); a rising sparkline means active generation; a spike indicates a large tool output being processed.
Session browser (key ‘b’)
Press b to open the session browser — a list of all past sessions stored in the
database. Navigate with Up/Down, press Enter to load a session in replay mode. This is equivalent
to tui –replay <id> but accessible from inside the TUI. Sessions are sorted
newest-first and show: ID, query (truncated), status, and timestamp.
File reference mode (key ‘@’)
In insert mode, type @ followed by a path to reference a local file. The file content
is read and included as context for the agent. This is useful for:
@./contacts.csv validate these contacts@./task.txt reads the file as the query@./notes.md summarize and expand on thisTypical TUI session flow
fathom tui — the TUI opens with the Input panel focused. Type your query and press Enter.
Switch to the Agents panel (Tab) to watch sub-agents spawn and work. The Log panel shows tool calls in real-time.
When an approval prompt appears, press y to approve or n to deny. Switch to the Tools panel to see pending approvals.
Switch to the Output panel to read the synthesized report as it streams in. Use Up/Down to scroll through history.
Type a follow-up query in the Input panel to continue the research. The agent retains context from the previous run.
Output Structure Guide
Every research run produces a consistent output directory. Here’s what each file contains and how to use it.
File-by-file breakdown
| File | Contents | How to use it |
|---|---|---|
index.md | Table of contents with links to all findings, run metadata (query, profile, timestamps, agent count) | Start here — it’s the entry point to the report |
summary.md | Executive summary produced by the coordinator’s synthesis step. Key findings, recommendations, and contact highlights | Share this with stakeholders who don’t need the details |
findings/*.md | One file per sub-task. Contains the sub-agent’s full research output with inline source citations | Dive deeper into specific topics or verify claims |
sources.md | Deduplicated list of all source URLs referenced across all findings, with titles and last-seen dates | Fact-check the report or build a reading list |
.research.db | SQLite database with full session state: agents, messages, tool calls, findings, contacts, jobs | Resume interrupted sessions, run stats, or export contacts |
Export formats
When configured, the run produces additional files in the output directory:
| Format | File | Triggered by |
|---|---|---|
| HTML | report.html | export.html = true in config |
report.pdf | export.pdf = true in config | |
| JSON | report.json | export.json = true in config |
| DOCX | report.docx | export.docx = true in config |
All exports are generated from the same in-memory report structure, so they’re always consistent with the Markdown output. The JSON format includes the full source metadata and is ideal for programmatic consumption.
CLI Tips & Tricks
Use –task-file for complex queries
For long or structured queries, write them to a file instead of passing as a positional argument. This avoids shell escaping issues and lets you version-control your research prompts.
# task.txt
Research the competitive landscape of AI coding assistants.
Include:
1. GitHub Copilot, Cursor, Codeium, Tabnine, Cody
2. Pricing models and enterprise features
3. Technical architecture (local vs cloud, model choices)
4. Market share estimates and growth trajectories
5. Key differentiators and weaknesses
Format as a comparison table with a recommendation section.
# Run with the task file
fathom run --task-file task.txt -o ./ai-coding-tools/Use –repeat for monitoring loops
The –repeat flag turns run into a watch mode. Each cycle re-runs the
query, diffs results against the previous run, and alerts on new contacts or changed findings.
# Check for new Acme Corp signals every 6 hours
fathom run "Acme Corp latest news and hiring" --repeat 21600
# Monitor a job board every hour
fathom run "New postings on careers.acme.com" --repeat 3600Use –profile for campaign-specific behavior
Combine profiles with the same query to get different perspectives. Run once with hunter
for contacts, then with analyst for deep research on the same companies.
# Pass 1: harvest contacts
fathom run --profile hunter "Series B fintech companies" -o ./fintech/
# Pass 2: deep analysis on the same topic
fathom run --profile analyst "Series B fintech companies" -o ./fintech-analysis/Pipe output to other tools
The CLI writes structured Markdown and JSON that can be piped to other tools for further processing.
# Export contacts and pipe to jq for filtering
fathom contacts export --format json | jq '.[] | select(.title | contains("CTO"))'
# Search memory and format as markdown links
fathom memory search "fintech" --top-k 5 | grep -oP 'https?://\\S+' | sort -u
# Run stats and save to file
fathom stats -o ./results/ > stats-report.mdFind past research with sessions
The sessions command is your research history. Use substring search to find past runs
by topic, company, or date.
# Find all sessions about fintech
fathom sessions list --search "fintech"
# Show the last 5 sessions
fathom sessions list -n 5
# View details of a specific session (prefix match)
fathom sessions show 3f9c2aAnalyze tool performance with stats
The stats command shows per-tool call statistics from a recorded session: call counts,
p50/p95 latencies, and error rates. Use this to identify slow tools or optimize your research pipeline.
# Show stats for the most recent session
fathom stats
# Show stats for a specific output directory
fathom stats -o ./fintech-vps/
# Example output:
# Tool Calls p50(ms) p95(ms) Errors
# web_search 47 312 1840 2
# web_fetch 89 245 3200 5
# extract_contacts 23 180 420 0
# verify_email 15 890 4500 1
# memory_search 12 45 120 0Benchmark before deploying
Run the bench suite to verify your environment’s performance before starting large campaigns.
This catches issues like slow DNS, memory constraints, or misconfigured embedding models.
# Run all benchmark scenarios
fathom bench
# Run a specific scenario and save the report
fathom bench -s memory --save bench-report.md
# Quick check on tool dispatch overhead
fathom bench -s dispatch -n 32