somora 2026.1122.7 → 2026.1128.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +29 -22
  2. package/config.example.yaml +15 -1
  3. package/docs/agents.md +3 -3
  4. package/docs/api.md +4 -4
  5. package/docs/builder.md +1 -1
  6. package/docs/cache-strategy.md +6 -4
  7. package/docs/compaction.md +10 -8
  8. package/docs/dream-phases.md +3 -2
  9. package/docs/index.md +2 -2
  10. package/docs/lsp.md +1 -1
  11. package/docs/mcp.md +3 -2
  12. package/docs/memory.md +3 -2
  13. package/docs/models.md +131 -17
  14. package/docs/sampling.md +2 -2
  15. package/docs/security.md +38 -5
  16. package/docs/setup.md +41 -9
  17. package/docs/thinking.md +14 -10
  18. package/docs/tools.md +8 -6
  19. package/docs/videogen.md +1 -1
  20. package/docs/web.md +4 -4
  21. package/package.json +1 -1
  22. package/src/cli/agy.ts +47 -0
  23. package/src/cli/help-args.ts +1 -1
  24. package/src/cli/setup.ts +67 -4
  25. package/src/cli/somora.ts +6 -0
  26. package/src/compaction/summarize.ts +15 -0
  27. package/src/config/settings/catalog/agents.ts +6 -0
  28. package/src/config/types.ts +16 -0
  29. package/src/dream/deep-llm.ts +35 -2
  30. package/src/dream/rem-extract.ts +1 -1
  31. package/src/engine/agy-bin.ts +64 -0
  32. package/src/engine/agy-cli.ts +1023 -0
  33. package/src/engine/agy-home.ts +135 -0
  34. package/src/engine/agy-mcp-launch.mjs +49 -0
  35. package/src/engine/engine-meta-labels.ts +4 -0
  36. package/src/engine/registry.ts +2 -0
  37. package/src/engine/thinking-params.ts +20 -0
  38. package/src/server/ask-attended.ts +1 -1
  39. package/src/server/heal-session.ts +3 -0
  40. package/src/server/inbox-sources.ts +2 -0
  41. package/src/server/run-turn-fallback.ts +4 -1
  42. package/src/server/run-turn.ts +2 -0
  43. package/src/server/session-compact.ts +20 -1
  44. package/src/server/tls-keeper.ts +21 -12
  45. package/src/setup/presets.ts +20 -4
  46. package/src/setup/tailscale-bin.ts +69 -0
  47. package/src/setup/tailscale.ts +10 -4
  48. package/src/tmux/detection/somora-rules/agy.json +39 -0
  49. package/src/tools/dream/tools.ts +1 -1
  50. package/src/tools/exec/internal-env.ts +1 -0
  51. package/web/dist/assets/{index-By92PtvM.js → index-CCsUnCP2.js} +2 -2
  52. package/web/dist/assets/index-CCsUnCP2.js.map +1 -0
  53. package/web/dist/index.html +1 -1
  54. package/web/dist/assets/index-By92PtvM.js.map +0 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  > **Your AI team. Shared memory. Your choice of models.**
8
8
  >
9
9
  > Run personal AI agents on your own machine, switch between Claude, ChatGPT,
10
- > Grok and local models in the middle of a conversation, and let the agents
10
+ > Grok, Gemini and local models in the middle of a conversation, and let the agents
11
11
  > turn what they learn into a shared long-term wiki while they sleep.
12
12
  > Run. Rest. Dream.
13
13
 
@@ -75,10 +75,11 @@ same local server, the same agents, the same memory.
75
75
  into a shared Obsidian wiki — with your approval where it matters. What
76
76
  one agent learns today, another can use next week.
77
77
  - **Any model, one conversation.** Flip between Claude (your Claude
78
- subscription), ChatGPT (your ChatGPT subscription), Grok, or any
78
+ subscription), ChatGPT (your ChatGPT subscription), Grok, Gemini (your
79
+ Google AI subscription), or any
79
80
  OpenAI-compatible endpoint (Ollama, LM Studio, vLLM, OpenRouter) with a
80
81
  slash command. History and tools carry over; the same tool registry
81
- feeds all four engines.
82
+ feeds all five engines.
82
83
  - **Yours.** Config, agent memory, sessions and attachments live in
83
84
  `~/.somora/`; the shared wiki lives in your Obsidian vault; workspace
84
85
  files and generated media in your configured workspace. Which models and
@@ -181,7 +182,8 @@ Hard:
181
182
  - **At least one LLM backend:** a Claude subscription (engine
182
183
  `claude-cli` — Claude Code is bundled, `somora claude login`); a ChatGPT
183
184
  subscription (engine `codex-cli` — Codex is bundled, `somora codex login`); a SuperGrok or
184
- Premium subscription (engine `grok-cli` — the Grok CLI is bundled, `somora grok login`); or any OpenAI-compatible HTTP
185
+ Premium subscription (engine `grok-cli` — the Grok CLI is bundled, `somora grok login`); a Google AI Pro or Ultra
186
+ subscription (engine `agy-cli` — install Google's Antigravity CLI, then `somora agy login`); or any OpenAI-compatible HTTP
185
187
  server (Ollama, LM Studio, vLLM, oMLX, OpenRouter, …).
186
188
 
187
189
  Optional: an **Obsidian vault** for the shared wiki and read-only vault
@@ -214,7 +216,7 @@ then starts the **setup assistant**:
214
216
 
215
217
  ```text
216
218
  somora setup
217
- 1 Models connect a Claude, ChatGPT or Grok subscription, or your own model server
219
+ 1 Models connect a Claude, ChatGPT, Grok or Google AI subscription, or your own model server
218
220
  2 Web search a Brave Search API key or your own SearXNG, so agents can search
219
221
  3 Browser optional: a browser the agents can use (checks Chromium or Chrome)
220
222
  4 First agent name, language, model and a backup model, then optionally a builder
@@ -291,6 +293,8 @@ ONNXRUNTIME_NODE_INSTALL=skip npm install -g somora \
291
293
  somora claude login # Claude subscription; Claude Code is bundled
292
294
  somora codex login # ChatGPT subscription; Codex is bundled
293
295
  somora grok login # SuperGrok or Premium subscription; the Grok CLI is bundled
296
+ somora agy login # Google AI subscription; install the Antigravity CLI first:
297
+ # curl -fsSL https://antigravity.google/cli/install.sh | bash
294
298
  # local models: run Ollama / LM Studio / oMLX and add the endpoint to
295
299
  # ~/.somora/config.yaml after step 4
296
300
 
@@ -310,21 +314,24 @@ its [contributor section](docs/setup.md#develop-from-a-checkout).
310
314
 
311
315
  ## What works where
312
316
 
313
- Every engine gets the same feature set:
314
-
315
- | Capability | claude-cli | codex-cli | grok-cli | openai-compatible |
316
- |---|:-:|:-:|:-:|:-:|
317
- | Chat (streaming) | ✓ | ✓ | ✓ | ✓ |
318
- | Memory auto-injection | ✓ | ✓ | ✓ | ✓ |
319
- | Memory tools (read + write) | ✓ via MCP | ✓ dynamic tools | ✓ via MCP | ✓ in-process |
320
- | Wiki layer (shared) | ✓ | ✓ | ✓ | ✓ |
321
- | Three-phase dreams | ✓ | ✓ | ✓ | ✓ |
322
- | Tool surface | ✓ via MCP | ✓ dynamic tools | ✓ via MCP | ✓ in-process |
323
- | Skills (markdown how-tos) | ✓ | ✓ | ✓ | ✓ |
324
- | Multimodal attachments (image, PDF) | ✓ native | ✓ image native, PDF rasterized | ✓ image native, PDF rasterized | ✓ image; PDF native or rasterized per provider |
325
- | Image + video generation¹ | ✓ via MCP | ✓ dynamic tools | ✓ via MCP | ✓ in-process |
326
- | Sub-agents, agent-to-agent questions, follow-ups | ✓ | ✓ | ✓ | ✓ |
327
- | SSH-resource exec | ✓ | ✓ | ✓ | ✓ |
317
+ Every engine gets the same core feature set; the last three rows differ:
318
+
319
+ | Capability | claude-cli | codex-cli | grok-cli | agy-cli | openai-compatible |
320
+ |---|:-:|:-:|:-:|:-:|:-:|
321
+ | Chat (streaming) | ✓ | ✓ | ✓ | ✓ | ✓ |
322
+ | Memory auto-injection | ✓ | ✓ | ✓ | ✓ | ✓ |
323
+ | Memory tools (read + write) | ✓ via MCP | ✓ dynamic tools | ✓ via MCP | ✓ via MCP | ✓ in-process |
324
+ | Wiki layer (shared) | ✓ | ✓ | ✓ | ✓ | ✓ |
325
+ | Three-phase dreams | ✓ | ✓ | ✓ | ✓ | ✓ |
326
+ | Tool surface | ✓ via MCP | ✓ dynamic tools | ✓ via MCP | ✓ via MCP | ✓ in-process |
327
+ | Skills (markdown how-tos) | ✓ | ✓ | ✓ | ✓ | ✓ |
328
+ | Multimodal attachments (image, PDF) | ✓ native | ✓ image native, PDF rasterized | ✓ image native, PDF rasterized | ✓ read through `file_read`, PDF as page images | ✓ image; PDF native or rasterized per provider |
329
+ | Image + video generation¹ | ✓ via MCP | ✓ dynamic tools | ✓ via MCP | ✓ via MCP | ✓ in-process |
330
+ | Sub-agents, agent-to-agent questions, follow-ups | ✓ | ✓ | ✓ | ✓ | ✓ |
331
+ | SSH-resource exec | ✓ | ✓ | ✓ | ✓ | ✓ |
332
+ | Steering a running turn | ✓ | ✓ | ✓ | — queued as the next turn | ✓ |
333
+ | `/compact` uses your focus | ✓ | — | — | ✓ | ✓ |
334
+ | Thinking text | placeholder | summary | short notes | — count only | full text |
328
335
 
329
336
  ¹ Off until an `imageGen` / `videoGen` block exists in `config.yaml`.
330
337
 
@@ -344,8 +351,8 @@ Every engine gets the same feature set:
344
351
  │ work ledger: what runs, what waits, what is arriving · wakes when
345
352
  │ late results land · follow-ups to whoever asked · visible in every client
346
353
  │
347
- ├─ Engines claude-cli · codex-cli · grok-cli · openai-compatible
348
- │ one tool registry for all four (in-process · MCP child · Codex dynamic tools)
354
+ ├─ Engines claude-cli · codex-cli · grok-cli · agy-cli · openai-compatible
355
+ │ one tool registry for all five (in-process · MCP child · Codex dynamic tools)
349
356
  │
350
357
  ├─ Tools memory · dream · wiki · file · exec + tmux · web · agents
351
358
  │ skills · sentinel · browser · image · video · media · projects
@@ -2,7 +2,7 @@
2
2
  # (created with sane defaults on first server start).
3
3
  #
4
4
  # Secrets:
5
- # - Subscription engines (claude-cli, codex-cli, grok-cli) do not need any keys
5
+ # - Subscription engines (claude-cli, codex-cli, grok-cli, agy-cli) do not need any keys
6
6
  # here — they authenticate via their CLI's own `login` flow.
7
7
  # - OpenAI-compatible providers (custom endpoints, OpenRouter, oMLX,
8
8
  # Ollama, …) read `apiKey` directly from this file. The recommended
@@ -112,6 +112,19 @@ providers:
112
112
  # contextWindow: 256000
113
113
  # capabilities: [text, image, reasoning]
114
114
 
115
+ # Gemini via Google's Antigravity CLI (`agy`, installed with
116
+ # `curl -fsSL https://antigravity.google/cli/install.sh | bash`). A Google
117
+ # AI Pro or Ultra subscription signs it in with `somora agy login`; no API
118
+ # key. Images and PDFs reach the model through file_read. See
119
+ # docs/models.md, section "Google AI subscription (Gemini)".
120
+ # google:
121
+ # engine: agy-cli
122
+ # models:
123
+ # - id: gemini-4-neon
124
+ # alias: neon
125
+ # contextWindow: 512000
126
+ # capabilities: [text, image, pdf, reasoning]
127
+
115
128
  # Local OpenAI-compatible server (Ollama, LM Studio, oMLX, vLLM, ...).
116
129
  # Multiple providers of the same engine are fine — just give each a unique key.
117
130
  omlx:
@@ -664,6 +677,7 @@ providers:
664
677
  # claudeCliIdleMs: 300000 # 5 min — subscription, fast first event
665
678
  # codexCliIdleMs: 300000 # 5 min — subscription, fast first event
666
679
  # grokCliIdleMs: 300000 # 5 min — same class as the other CLIs
680
+ # agyCliIdleMs: 300000 # 5 min — same class as the other CLIs
667
681
  # openaiCompatibleIdleMs: 1200000 # 20 min — local LLMs (oMLX, ollama, vLLM)
668
682
  # # can legitimately stream slowly on
669
683
  # # consumer hardware. Raise if your
package/docs/agents.md CHANGED
@@ -732,7 +732,7 @@ How the fallback chain works:
732
732
  |---|---|---|---|
733
733
  | `kind` | `chat`, `builder` | `chat` | The kind of agent. Set once at creation. |
734
734
  | `a2a` | boolean | `false` | Other agent systems may send this agent tasks over [A2A](a2a.md#taking-work-in), if `config.yaml` lists them under `a2a.peers`. Also the A2A switch in the Agent window. Never for a builder. |
735
- | `steering` | boolean | `false` | Default for a message typed in the web client or the terminal client while a turn runs. `true` hands it into the running turn before its next step. `false` queues it as its own turn. The toggle next to Send flips it per message, Ctrl+T in the terminal client for the session. Steering works on every engine: `openai-compatible`, `claude-cli`, `codex-cli` and `grok-cli`. |
735
+ | `steering` | boolean | `false` | Default for a message typed in the web client or the terminal client while a turn runs. `true` hands it into the running turn before its next step. `false` queues it as its own turn. The toggle next to Send flips it per message, Ctrl+T in the terminal client for the session. Steering works on `openai-compatible`, `claude-cli`, `codex-cli` and `grok-cli`. On `agy-cli` a message always waits for its own turn. |
736
736
  | `imageReview` | `never`, `always` | `never` | `always` feeds each generated image back to the agent so it can judge it, about 2k tokens per image. Not a lock: the agent can set `return_image` per call either way. |
737
737
  | `agentLoop.maxRounds` | integer | server value (8) | Rounds per turn on the `openai-compatible` engine. Builders have none unless set. |
738
738
  | `agentLoop.maxToolCallsPerTurn` | integer | server value (30) | Tool calls per turn, across all rounds. Builders default to 2000. A hard limit: calls in a reply beyond it are refused, not run, and the model is asked to answer. |
@@ -804,8 +804,8 @@ Deep and Lucid themselves work for the whole install and are set under
804
804
  | `rem.chunkTimeoutMs` | integer | `600000` | Time limit per piece. Ten minutes leaves room for local models. A piece that runs out is marked failed and REM continues with the next. |
805
805
  | `rem.thinking` | `off`, `low`, `medium`, `high` | none | Reasoning depth for the worker, when its model has the `reasoning` capability. |
806
806
 
807
- The worker can be a model on `claude-cli`, `codex-cli`, `grok-cli` or
808
- an `openai-compatible` provider.
807
+ The worker can be a model on `claude-cli`, `codex-cli`, `grok-cli`,
808
+ `agy-cli` or an `openai-compatible` provider.
809
809
 
810
810
  > **Note:** The switch in the Agent window applies at once. After you
811
811
  > edit `dreams` or `rem.*` in `agent.yaml` by hand,
package/docs/api.md CHANGED
@@ -662,7 +662,7 @@ What a client sees, in order:
662
662
  | Case | Result |
663
663
  |---|---|
664
664
  | Engine `openai-compatible`, `claude-cli`, `codex-cli` or `grok-cli` | The message is steered. |
665
- | Any other engine, or no turn running | It is queued as a turn of its own (`steered: false`). |
665
+ | Engine `agy-cli`, or no turn running | It is queued as a turn of its own (`steered: false`). agy cannot take a message into a running turn. |
666
666
  | The turn is already finishing | It becomes an ordinary queued turn. Nothing is lost. |
667
667
  | The message carries `agent_ask_call_id` | Never steered: such a question needs a turn of its own. |
668
668
 
@@ -731,7 +731,7 @@ Response `200`, the turn result:
731
731
  | `tool_calls`, `rounds`, `ms` | How much work the turn was. For a builder sent back to open work, `tool_calls`, `files_written` and `tools_used` cover the follow-up turns too, and `finalText` is the last turn's report ([Builder](builder.md#when-the-builder-wants-to-stop)). |
732
732
  | `files_written`, `media` | Files and generated media of the turn, when there are any. |
733
733
  | `tools_used` | The tools the turn called, each once, by their registry name. |
734
- | `engine`, `agentKind` | The engine that ran the turn (`claude-cli`, `codex-cli`, `grok-cli`, `openai-compatible`) and the agent's kind (`chat` or `builder`). |
734
+ | `engine`, `agentKind` | The engine that ran the turn (`claude-cli`, `codex-cli`, `grok-cli`, `agy-cli`, `openai-compatible`) and the agent's kind (`chat` or `builder`). |
735
735
  | `follow_ups` | Texts that reached the caller after the report. See `GET /spawn-result`. |
736
736
  | `usage`, `contextWindow`, `provider`, `model` | Tokens and the model that answered. `fallback` is added when a backup model answered. |
737
737
  | `thinkingActive`, `thinkingLevel` | Whether a thinking level was applied. |
@@ -1277,11 +1277,11 @@ Compacts the session now, on the engine of its model. See
1277
1277
 
1278
1278
  | Body field | Required | Meaning |
1279
1279
  |---|---|---|
1280
- | `instructions` | no | What the summary should keep. Used on `openai-compatible` and `claude-cli`, at most 2000 characters. |
1280
+ | `instructions` | no | What the summary should keep. Used on `openai-compatible`, `claude-cli` and `agy-cli`, at most 2000 characters. |
1281
1281
 
1282
1282
  | Status | Body |
1283
1283
  |---|---|
1284
- | `200` | `{agent, session, status: "compacted", engine, tokensBefore?, tokensAfter?, note?}`. `note` says when the engine ignored the instructions (`codex-cli`, `grok-cli`). |
1284
+ | `200` | `{agent, session, status: "compacted", engine, tokensBefore?, tokensAfter?, note?}`. `note` says when the engine ignored the instructions (`codex-cli`, `grok-cli`). `agy-cli` uses them. |
1285
1285
  | `200` | `{agent, session, status: "nothing_to_compact", engine, note}`. The session is too short, or the engine has no conversation for it yet. |
1286
1286
  | `400` | `{status: "unsupported", engine, note}`. The engine cannot compact by hand. |
1287
1287
  | `409` | `{error, busy: true}`. A turn or another compaction is running. |
package/docs/builder.md CHANGED
@@ -277,7 +277,7 @@ How the builder is sent back depends on the engine:
277
277
  | Engine | How |
278
278
  |---|---|
279
279
  | openai-compatible | Inside the running turn. The chat shows an `open tasks` row. At most twice per turn, and not again when the builder ends right after such a notice. |
280
- | claude-cli, codex-cli, grok-cli | These engines run their own tool loop, so somora sees the turn only once it ended. It starts a follow-up turn at once, under the same lock: a message from somora itself (`system · open items`) that names what is open and asks for the complete report again. At most two follow-ups, and none after a follow-up without a tool call: that answer stands. The log line is `builder.turn_end_follow_up`. |
280
+ | claude-cli, codex-cli, grok-cli, agy-cli | These engines run their own tool loop, so somora sees the turn only once it ended. It starts a follow-up turn at once, under the same lock: a message from somora itself (`system · open items`) that names what is open and asks for the complete report again. At most two follow-ups, and none after a follow-up without a tool call: that answer stands. The log line is `builder.turn_end_follow_up`. |
281
281
 
282
282
  Whoever gave the order gets the answer only after the follow-ups: the
283
283
  answer of the last turn, with the acceptance list under it. A follow-up
@@ -114,15 +114,16 @@ How that block reaches the model depends on the engine.
114
114
  | `claude-cli` | the Claude session, resumed | every turn, unchanged | catch-up, per-turn block, your text |
115
115
  | `codex-cli` | the Codex thread, resumed | as developer instructions on every thread start and resume | attachment notes, per-turn block, project block on a resumed thread, catch-up, your text |
116
116
  | `grok-cli` | the Grok session, resumed | in the session's agent profile, replaced on every resume | per-turn block, project block on a resumed session, attachments, your text |
117
+ | `agy-cli` | the agy conversation, resumed | in the agent file at the start of a conversation. A changed prompt starts a new conversation with the history replayed. | per-turn block, project block on a resumed conversation, attachments, catch-up, your text |
117
118
  | `openai-compatible` | somora, rebuilt from the session file on every request | every request, as the one system message | per-turn block, your text |
118
119
 
119
120
  "Catch-up" is the summary of turns another engine answered, sent when
120
121
  you switch engines within a session.
121
122
 
122
- `claude-cli`, `codex-cli` and `grok-cli` keep the conversation themselves. somora only
123
+ `claude-cli`, `codex-cli`, `grok-cli` and `agy-cli` keep the conversation themselves. somora only
123
124
  sends the new turn, and the provider's cache covers the rest.
124
125
 
125
- On `codex-cli` and `grok-cli` a resumed conversation also gets the
126
+ On `codex-cli`, `grok-cli` and `agy-cli` a resumed conversation also gets the
126
127
  project block in front of the user message, so the model sees a new pin
127
128
  at once.
128
129
 
@@ -273,8 +274,8 @@ wiki:
273
274
  | `wiki.search.overviewTopNSlugs` | `30` | Most sections listed when the overview falls back to section names and counts. |
274
275
 
275
276
  Set `memoryInjectMode: system` only for a model server that mishandles
276
- a memory block inside user messages. `claude-cli`, `codex-cli` and
277
- `grok-cli` have no such setting: the placement is fixed.
277
+ a memory block inside user messages. `claude-cli`, `codex-cli`,
278
+ `grok-cli` and `agy-cli` have no such setting: the placement is fixed.
278
279
 
279
280
  ## Where the numbers come from
280
281
 
@@ -283,6 +284,7 @@ a memory block inside user messages. `claude-cli`, `codex-cli` and
283
284
  | `claude-cli` | `cache_read_input_tokens` |
284
285
  | `codex-cli` | `cachedInputTokens` |
285
286
  | `grok-cli` | `cachedReadTokens` |
287
+ | `agy-cli` | `cache_read_tokens`, summed over the turn's model steps |
286
288
  | `openai-compatible` | `prompt_tokens_details.cached_tokens` |
287
289
 
288
290
  somora passes the value on as `tokens_in_cached` in the usage of a turn.
@@ -42,7 +42,7 @@ Who compacts depends on the engine of the model that answers.
42
42
  | Engine | Who compacts | When | What you see |
43
43
  |---|---|---|---|
44
44
  | `openai-compatible` | somora | Before a turn, when the prompt reaches `triggerRatio` times the input budget | A `context compacted` row with the context before and after, and the usage display drops |
45
- | `claude-cli`, `codex-cli`, `grok-cli` | The CLI itself, inside its own session | At the CLI's own threshold | A `context compacted` row, and the usage display drops |
45
+ | `claude-cli`, `codex-cli`, `grok-cli`, `agy-cli` | The CLI itself, inside its own session | At the CLI's own threshold | A `context compacted` row, and the usage display drops |
46
46
 
47
47
  Every `context compacted` row shows in every client, also with the
48
48
  tool rows hidden. On the phone it is a divider line in the chat.
@@ -80,6 +80,7 @@ What happens depends on the engine of the session's model:
80
80
  | `claude-cli` | Claude Code compacts its own session, as `/compact` does in Claude Code. | Passed to Claude as its instructions. |
81
81
  | `codex-cli` | Codex compacts its own thread. | Not used: Codex takes no instructions for it. The reply says so. |
82
82
  | `grok-cli` | Grok compacts its own conversation. | Not used: Grok takes no instructions for it. The reply says so. |
83
+ | `agy-cli` | The Antigravity CLI compacts its own conversation. | Passed to agy with its `/compact`, and used. |
83
84
 
84
85
  Good to know:
85
86
 
@@ -173,7 +174,7 @@ The summary is saved in the session's meta data together with the time
173
174
  it covers. Later turns send the summary plus the exchanges after that
174
175
  time.
175
176
 
176
- `claude-cli`, `codex-cli` and `grok-cli` use the same record when they have to
177
+ `claude-cli`, `codex-cli`, `grok-cli` and `agy-cli` use the same record when they have to
177
178
  rebuild a session, for example after a Codex thread is gone. That replay
178
179
  is limited to the 40 most recent exchanges and 60,000 characters.
179
180
 
@@ -273,9 +274,9 @@ affected.
273
274
 
274
275
  ## Which model summarises
275
276
 
276
- A summary is a separate, single model call without tools. All four
277
- engines can do it: `openai-compatible`, `claude-cli`, `codex-cli` and
278
- `grok-cli`.
277
+ A summary is a separate, single model call without tools. All five
278
+ engines can do it: `openai-compatible`, `claude-cli`, `codex-cli`,
279
+ `grok-cli` and `agy-cli`.
279
280
 
280
281
  ### With a workers list
281
282
 
@@ -290,14 +291,14 @@ all, the compaction fails.
290
291
 
291
292
  ### Without a list
292
293
 
293
- somora picks from every configured model on the four engines above:
294
+ somora picks from every configured model on the five engines above:
294
295
  each model whose `contextWindow` is at least 1.3 times the estimated
295
296
  size of the summary request, smallest window first.
296
297
 
297
298
  Three things follow from this:
298
299
 
299
300
  - **A subscription model may be picked.** If the smallest fitting window
300
- belongs to a Claude, Codex or Grok model, the summary runs through that CLI
301
+ belongs to a Claude, Codex, Grok or Gemini model, the summary runs through that CLI
301
302
  and counts against that subscription. Nothing in the UI says so. Set
302
303
  `workers` to keep summaries on local models.
303
304
  - **A wrong `contextWindow` misleads the pick.** Too high makes a model
@@ -348,7 +349,7 @@ once. The memory is not kept across a restart.
348
349
 
349
350
  The same per-model field does three jobs:
350
351
 
351
- | Job | `openai-compatible` | `claude-cli`, `codex-cli`, `grok-cli` |
352
+ | Job | `openai-compatible` | `claude-cli`, `codex-cli`, `grok-cli`, `agy-cli` |
352
353
  |---|---|---|
353
354
  | Compaction trigger and in-turn limit | yes | no, the CLI compacts on its own threshold |
354
355
  | Choice of summariser | yes | yes |
@@ -363,6 +364,7 @@ enforces:
363
364
  |---|---|---|
364
365
  | `codex-cli` | 258400 (475000 for `gpt-6.1-terra`) | Codex runs every session against its own window, which is smaller than the model's API window. |
365
366
  | `claude-cli` | the model's real window | Claude Code sessions run against it: 1M for the Claude 5 family, 200k for Haiku 4.5. |
367
+ | `agy-cli` | 512000 | Antigravity states up to 512K. agy reports no window, so the header uses this value. |
366
368
  | `openai-compatible` | the server's limit | Use vLLM `--max-model-len`, SGLang `--context-length` or oMLX's configured length, not the number on the model card. |
367
369
 
368
370
  > **Warning:** A value that is too high on `openai-compatible` means
@@ -120,8 +120,9 @@ disk, whoever wrote them.
120
120
  ### Which models can do the work
121
121
 
122
122
  A worker model can sit on an `openai-compatible` provider, on
123
- `claude-cli`, on `codex-cli` or on `grok-cli`. A Claude, ChatGPT or
124
- Grok subscription is therefore enough for all three phases. A worker on
123
+ `claude-cli`, on `codex-cli`, on `grok-cli` or on `agy-cli`. A Claude,
124
+ ChatGPT, Grok or Google AI subscription is therefore enough for all
125
+ three phases. A worker on
125
126
  a subscription engine runs locked down like a chat turn: no shell, no
126
127
  web search, no plugins or MCP servers of its own.
127
128
 
package/docs/index.md CHANGED
@@ -10,7 +10,7 @@ each page is for.
10
10
  - **Agents with memory.** Each agent has its own character, model and
11
11
  notes. Background phases turn finished conversations into notes and
12
12
  into a shared wiki.
13
- - **Your models.** A Claude, ChatGPT or Grok subscription, a local model
13
+ - **Your models.** A Claude, ChatGPT, Grok or Google AI subscription, a local model
14
14
  server or an API key. somora brings no model of its own.
15
15
  - **Three clients.** A desktop in the browser, an app for the phone and
16
16
  a terminal client. All talk to the same server.
@@ -58,7 +58,7 @@ takes about ten minutes. [Setup](setup.md) explains each step.
58
58
  |---|---|
59
59
  | **agent** | A persona with its own instructions, model, notes and conversations. Lives in `~/.somora/agents/<name>/`. A chat agent talks and coordinates. A builder plans and writes software. |
60
60
  | **session** | One conversation with one agent. Stored as a file, can be resumed and switched. |
61
- | **engine** | The way somora reaches a model: `claude-cli` (Claude subscription), `codex-cli` (ChatGPT subscription), `grok-cli` (SuperGrok or Premium subscription) or `openai-compatible` (any server or API that speaks the OpenAI chat format). |
61
+ | **engine** | The way somora reaches a model: `claude-cli` (Claude subscription), `codex-cli` (ChatGPT subscription), `grok-cli` (SuperGrok or Premium subscription), `agy-cli` (Google AI subscription, through the Antigravity CLI) or `openai-compatible` (any server or API that speaks the OpenAI chat format). |
62
62
  | **provider, model, alias** | `config.yaml` lists providers and the models on each. An alias is a short name for a model that works everywhere. |
63
63
  | **memory** | An agent's own short-term notes. Recalled automatically for every message, together with the wiki and your vault. |
64
64
  | **wiki** | The long-term knowledge base shared by all agents. Lives in a folder, usually inside your Obsidian vault. |
package/docs/lsp.md CHANGED
@@ -79,7 +79,7 @@ model knows what to expect: `typescript ✓`, `pyright — off`, or
79
79
 
80
80
  The servers live in the main somora process. The file tools ask it over
81
81
  loopback HTTP, so builders on the CLI engines (`claude-cli`,
82
- `codex-cli`, `grok-cli`) get the same verdicts.
82
+ `codex-cli`, `grok-cli`, `agy-cli`) get the same verdicts.
83
83
 
84
84
  ## The project root
85
85
 
package/docs/mcp.md CHANGED
@@ -9,7 +9,7 @@ sees.
9
9
  ## What you get
10
10
 
11
11
  - **One entry, every engine.** Agents on `claude-cli`, `codex-cli`,
12
- `grok-cli` and `openai-compatible` all get the server's tools.
12
+ `grok-cli`, `agy-cli` and `openai-compatible` all get the server's tools.
13
13
  - **One connection, in one place.** somora holds the connection and the
14
14
  credentials. The engines never talk to the external server
15
15
  themselves.
@@ -94,6 +94,7 @@ runs every call, whichever engine asked.
94
94
  | `openai-compatible` | Added to somora's own tool list. | `mcp__<server>__<tool>` |
95
95
  | `claude-cli` | One small proxy per server and turn. It serves the tool list and forwards calls to the hub. | `mcp__somora-<server>__<tool>` |
96
96
  | `grok-cli` | The same proxy as `claude-cli`. | `somora-<server>__<tool>` |
97
+ | `agy-cli` | The same proxy as `claude-cli`, called through agy's `call_mcp_tool`. | server `somora-<server>`, tool under its own name |
97
98
  | `codex-cli` | Codex dynamic tools, one namespace per server. | `somora_mcp_<server>` namespace, tool under its own name |
98
99
 
99
100
  In `agent.yaml`, in the abilities window and in the session history the
@@ -143,7 +144,7 @@ name ending in `*`. A name under `deny` beats everything; a match under
143
144
  an exception. An agent without a `tools:`
144
145
  block sees everything. A change applies from the agent's next turn.
145
146
 
146
- A hidden tool is absent from the model's tool list on all four engines,
147
+ A hidden tool is absent from the model's tool list on all five engines,
147
148
  so it also costs no context. In a sub-agent session and in a task from
148
149
  another agent system, `subagents.tools.deny` and `a2a.tools.deny` hide
149
150
  external tools too, on every engine, with the same patterns
package/docs/memory.md CHANGED
@@ -375,12 +375,13 @@ A section that lies completely inside another hit of the same file is
375
375
  folded into it, so the same text never appears twice in the results.
376
376
 
377
377
  The tools reach the model differently per engine: through a local MCP
378
- server for `claude-cli` and `grok-cli`, as dynamic tools for
378
+ server for `claude-cli`, `grok-cli` and `agy-cli`, as dynamic tools for
379
379
  `codex-cli`, and as function definitions for `openai-compatible`
380
380
  engines. `memory_search`, `memory_get` and `memory_write` are in every
381
381
  engine's direct tool list; `memory_list`, `memory_edit` and
382
382
  `memory_delete` are found through the engine's tool search (see
383
- [Tools](tools.md)).
383
+ [Tools](tools.md)). `agy-cli` has no direct list: its prompt names all
384
+ six.
384
385
 
385
386
  ## When recall feels off
386
387
 
package/docs/models.md CHANGED
@@ -279,6 +279,117 @@ model can also be the worker for REM, Deep, Lucid and compaction: each
279
279
  request runs in a fresh Grok session without tools, which is removed
280
280
  afterwards.
281
281
 
282
+ ## Google AI subscription (Gemini)
283
+
284
+ Engine `agy-cli`, for a Google AI Pro or Ultra subscription on a
285
+ private Google account. somora runs Google's Antigravity CLI (`agy`)
286
+ once per turn. A Workspace account gets only a small starter quota
287
+ unless it runs on a Google Cloud project, where you pay per token.
288
+
289
+ somora does not bundle `agy`. Install it with Google's installer, which
290
+ puts it in `~/.local/bin`, then log in:
291
+
292
+ ```sh
293
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
294
+ somora agy login
295
+ ```
296
+
297
+ The login prints a link. Open it in any browser, sign in with the
298
+ Google account that has the subscription, and paste the code back. A
299
+ login you made with your own `agy` on a server is picked up. On a Mac
300
+ or a desktop, your own `agy` keeps its login in the system keychain,
301
+ which somora does not read: run `somora agy login` once there.
302
+
303
+ `somora agy models` lists the models your account offers. The setup
304
+ assistant does all of this under "Google AI subscription".
305
+
306
+ ```yaml
307
+ providers:
308
+ google:
309
+ engine: agy-cli
310
+ models:
311
+ - id: gemini-4-neon
312
+ alias: neon
313
+ contextWindow: 512000
314
+ capabilities: [text, image, pdf, reasoning]
315
+ - id: gemini-4-carbon
316
+ alias: carbon
317
+ contextWindow: 512000
318
+ capabilities: [text, image, pdf, reasoning]
319
+ - id: gemini-4-hydrogen
320
+ alias: hydrogen
321
+ contextWindow: 512000
322
+ capabilities: [text, image, pdf, reasoning]
323
+ ```
324
+
325
+ | Model | contextWindow | Notes | Checked |
326
+ |---|---|---|---|
327
+ | `gemini-4-neon` | 512000 | Frontier model, fast. The recommended choice for chat. Knows `low`, `medium`, `high`, `xhigh`. | partial: chat, tools, files, images, continuity, a changed persona, `/compact`, worker |
328
+ | `gemini-4-carbon` | 512000 | Strongest reasoning, slower. Knows `low` to `high`. | partial: chat, tools, files, images, continuity, a changed persona, `/compact`, worker |
329
+ | `gemini-4-hydrogen` | 512000 | Fast everyday model, good for background work. Knows `low`, `medium`, `high`, `xhigh`. | partial: chat, tools, files, images, continuity, a changed persona, `/compact`, worker |
330
+
331
+ Antigravity states "up to 512K" for Neon and nothing for the others, so
332
+ all three use 512000. agy also lists Claude and GPT-OSS models. Claude
333
+ belongs on `claude-cli`. Other ids from `somora agy models` can be added
334
+ by hand.
335
+
336
+ ### Which Gemini model for what
337
+
338
+ | Job | Model | Why |
339
+ |---|---|---|
340
+ | Chat and everyday agents | `neon` at `medium` or `high` | As reliable as Carbon on tools, files, images and code, and two to five times faster. A higher level adds little time on Neon. |
341
+ | Hard reasoning | `carbon` at `low` or `medium` | The strongest thinker. At `high` a single answer can take minutes, too slow for chat. |
342
+ | REM, Deep, Lucid, compaction | `hydrogen` | Fast and light on the subscription's quota. |
343
+
344
+ All three run every somora feature on this engine: tools, files, images
345
+ and PDFs through `file_read`, sessions that resume, `/compact`, dream
346
+ workers.
347
+
348
+ > **Note:** A Google AI subscription has a usage quota. When it is used
349
+ > up, agy says so ("Individual quota reached", with the time until it
350
+ > resets) and the turn ends with that error. Give Gemini agents a
351
+ > `fallback` model on another engine if they must always answer.
352
+
353
+ ### Thinking levels on Gemini
354
+
355
+ somora's thinking level goes to agy as `--effort`. `off` is sent as
356
+ `low`, because the models always think. `reasoning.levels` is applied,
357
+ and a `null` mapping leaves the flag out.
358
+
359
+ | You want | Mapping |
360
+ |---|---|
361
+ | `/thinking high` to use `xhigh` on Neon or Hydrogen | `levels: { high: xhigh }` |
362
+ | No effort sent for a level | `levels: { medium: null }` |
363
+
364
+ agy shows no thinking text. The chat shows only the count of reasoning
365
+ tokens.
366
+
367
+ ### How a Gemini turn runs
368
+
369
+ | Topic | How it works |
370
+ |---|---|
371
+ | Tools | agy's own tools (shell, files, browser, web search, its subagents) are off. The model reaches somora's tools over MCP through agy's `call_mcp_tool`. The prompt names the tools, and agy fetches a tool's schema when it is first used. |
372
+ | Prompt | agy keeps a conversation's system prompt and MCP servers from its start. When the prompt, the set of servers or the stored conversation changes, a new agy conversation starts and the history is replayed into it. |
373
+ | Working folder | agy starts in an empty folder of somora's. The system prompt names the session's real working folder. An `AGENTS.md` or `GEMINI.md` there is not read. |
374
+ | Images and PDFs | An attachment is named by its path, and the model reads it with `file_read`: images as images, PDFs as page images. Text files go into the message. |
375
+ | Long tool output | Over about 10 KB agy shows the model the start and the end and saves the whole output in its own folder. The model is told it may read that file with `file_read`. |
376
+ | Steering | Not possible. A message sent while a turn runs waits and becomes the next turn. |
377
+ | Stop | agy gets an interrupt and is ended after 3 seconds if it is still running. |
378
+
379
+ agy compacts its own conversation near its limit, and a row in the
380
+ chat says so. `/compact` asks agy to compact now, and a focus you give
381
+ is used. A Gemini model can also be the worker for REM, Deep, Lucid and
382
+ compaction: each request runs in a new agy conversation without tools
383
+ or servers, which is deleted afterwards.
384
+
385
+ > **Warning:** Google's Antigravity terms say your interactions may be
386
+ > used to improve Google's products and may be reviewed by people. You
387
+ > can opt out in agy's own settings: run `agy` once and open `/config`.
388
+ > Business accounts have it off. The terms also count third party
389
+ > software used to access the service as a breach. somora only starts
390
+ > Google's own program and never handles the token, but whether that is
391
+ > covered is for the account owner to judge.
392
+
282
393
  ## Self hosted models
283
394
 
284
395
  Engine `openai-compatible`, for vLLM, SGLang, oMLX, Ollama, LM Studio
@@ -496,7 +607,7 @@ come first. The [thinking guide](thinking.md) lists the order.
496
607
  | Worker | Engines |
497
608
  |---|---|
498
609
  | Vision worker for `analyze_file` | `openai-compatible` only |
499
- | REM, Deep, Lucid, compaction | `openai-compatible`, `claude-cli`, `codex-cli`, `grok-cli` |
610
+ | REM, Deep, Lucid, compaction | `openai-compatible`, `claude-cli`, `codex-cli`, `grok-cli`, `agy-cli` |
500
611
 
501
612
 
502
613
  ## Hosted models through OpenRouter
@@ -588,7 +699,7 @@ required.
588
699
  ```yaml
589
700
  providers:
590
701
  <name>:
591
- engine: openai-compatible # claude-cli | codex-cli | grok-cli | openai-compatible
702
+ engine: openai-compatible # claude-cli | codex-cli | grok-cli | agy-cli | openai-compatible
592
703
  baseUrl: http://<your-host>:8000/v1
593
704
  apiKey: "<key>"
594
705
  pdfMode: rasterize
@@ -609,19 +720,19 @@ providers:
609
720
 
610
721
  ### Model fields
611
722
 
612
- | Field | Default | openai-compatible | claude-cli | codex-cli | grok-cli |
613
- |---|---|---|---|---|---|
614
- | `contextWindow` | required | compaction trigger, worker choice, display. Use the server's limit. | worker choice, display. The native window is right. | worker choice, display. Use the window Codex reports for the model: 258400, or 475000 for `gpt-6.1-terra`. | display. Grok reports the window itself, and that number is shown. |
615
- | `capabilities` | `[text]` | `image` and `pdf` gate attachments, `reasoning` decides whether a thinking level is sent | same | same | same |
616
- | `alias` | none | short name for `model:` in `agent.yaml`, letters, digits, `-` and `_` | same | same | same |
617
- | `reasoning.default` | unset | the thinking level used when session and agent set none, in somora's words; sent explicitly and shown as the model's default | same | same | same |
618
- | `reasoning.levels` | unset | somora level to the word the model gets, for `off`, `low`, `medium`, `high`. `null` leaves the parameter out. | not used | applied, for example `xhigh` and `max` | applied |
619
- | `reasoning.param` | `reasoning_effort` | where the word goes: `reasoning_effort`, nested `reasoning` for OpenRouter, or `chat_template_kwargs` | not used | not used | not used |
620
- | `sampling` | unset | sent on every call, dropped once when the server rejects a key | not used | not used | not used |
621
- | `maxTokens` | unset, nothing sent | output cap on every call, dream and compaction workers included | not used | not used | not used |
622
- | `builder.maxTokens` | unset | replaces `maxTokens` when a [builder](builder.md) runs on this model | not used | not used | not used |
623
- | `builder.thinking` | unset | replaces `reasoning.default` for builders; an agent's or session's own level still wins | same | same | same |
624
- | `parallelToolCalls` | unset | unset or `false`: the model is asked for one tool call per round. `true` lets a model you trust call several tools at once; calls of tools that only read then run at the same time ([Tools](tools.md#results-limits-and-timeouts)). | not used | not used | not used |
723
+ | Field | Default | openai-compatible | claude-cli | codex-cli | grok-cli | agy-cli |
724
+ |---|---|---|---|---|---|---|
725
+ | `contextWindow` | required | compaction trigger, worker choice, display. Use the server's limit. | worker choice, display. The native window is right. | worker choice, display. Use the window Codex reports for the model: 258400, or 475000 for `gpt-6.1-terra`. | display. Grok reports the window itself, and that number is shown. | worker choice, display. agy reports no window: use 512000. |
726
+ | `capabilities` | `[text]` | `image` and `pdf` gate attachments, `reasoning` decides whether a thinking level is sent | same | same | same | same |
727
+ | `alias` | none | short name for `model:` in `agent.yaml`, letters, digits, `-` and `_` | same | same | same | same |
728
+ | `reasoning.default` | unset | the thinking level used when session and agent set none, in somora's words; sent explicitly and shown as the model's default | same | same | same | same |
729
+ | `reasoning.levels` | unset | somora level to the word the model gets, for `off`, `low`, `medium`, `high`. `null` leaves the parameter out. | not used | applied, for example `xhigh` and `max` | applied | applied, for example `xhigh` on Neon |
730
+ | `reasoning.param` | `reasoning_effort` | where the word goes: `reasoning_effort`, nested `reasoning` for OpenRouter, or `chat_template_kwargs` | not used | not used | not used | not used |
731
+ | `sampling` | unset | sent on every call, dropped once when the server rejects a key | not used | not used | not used | not used |
732
+ | `maxTokens` | unset, nothing sent | output cap on every call, dream and compaction workers included | not used | not used | not used | not used |
733
+ | `builder.maxTokens` | unset | replaces `maxTokens` when a [builder](builder.md) runs on this model | not used | not used | not used | not used |
734
+ | `builder.thinking` | unset | replaces `reasoning.default` for builders; an agent's or session's own level still wins | same | same | same | same |
735
+ | `parallelToolCalls` | unset | unset or `false`: the model is asked for one tool call per round. `true` lets a model you trust call several tools at once; calls of tools that only read then run at the same time ([Tools](tools.md#results-limits-and-timeouts)). | not used | not used | not used | not used |
625
736
 
626
737
  Keys allowed in `sampling`: `temperature`, `top_p`, `top_k`, `min_p`,
627
738
  `frequency_penalty`, `presence_penalty`, `repetition_penalty`, `seed`,
@@ -629,7 +740,7 @@ Keys allowed in `sampling`: `temperature`, `top_p`, `top_k`, `min_p`,
629
740
 
630
741
  ### Provider fields
631
742
 
632
- These exist only on an `openai-compatible` provider. The three CLI
743
+ These exist only on an `openai-compatible` provider. The four CLI
633
744
  engines take `engine` and `models` and nothing else.
634
745
 
635
746
  | Field | Default | Meaning |
@@ -670,6 +781,9 @@ not in `user`.
670
781
  - Claude Code, Codex and the Grok CLI need no separate install. somora
671
782
  bundles the exact versions pinned in its `package.json`. A Claude
672
783
  Code you installed yourself is used instead when present.
784
+ - The Antigravity CLI for `agy-cli` is not bundled. Install it with
785
+ Google's installer, as shown under
786
+ [Google AI subscription](#google-ai-subscription-gemini).
673
787
 
674
788
  A CLI engine's tools and lock-down are checked again after every CLI
675
789
  update.
@@ -689,7 +803,7 @@ update.
689
803
 
690
804
  ## See also
691
805
 
692
- - [Setup](setup.md): logging in to Claude Code, Codex and Grok, and
806
+ - [Setup](setup.md): logging in to Claude Code, Codex, Grok and agy, and
693
807
  connecting a local server
694
808
  - [Thinking](thinking.md): thinking levels, vocabularies per model,
695
809
  which engines show thinking text
package/docs/sampling.md CHANGED
@@ -17,8 +17,8 @@ and per session.
17
17
  you.
18
18
 
19
19
  > **Note:** Only the `openai-compatible` engine sends sampling
20
- > parameters. `claude-cli`, `codex-cli` and `grok-cli` have no such
21
- > knobs. On those engines the setting is stored but dormant, and
20
+ > parameters. `claude-cli`, `codex-cli`, `grok-cli` and `agy-cli` have no
21
+ > such knobs. On those engines the setting is stored but dormant, and
22
22
  > `/sampling` answers with a `dormant` warning.
23
23
 
24
24
  ## Try it