Skip to content

feat(agent-manager): add Antigravity CLI adapter#133

Open
nnhhoang wants to merge 1 commit into
codeaholicguy:mainfrom
nnhhoang:feat/antigravity-cli-adapter
Open

feat(agent-manager): add Antigravity CLI adapter#133
nnhhoang wants to merge 1 commit into
codeaholicguy:mainfrom
nnhhoang:feat/antigravity-cli-adapter

Conversation

@nnhhoang

@nnhhoang nnhhoang commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an antigravity_cli agent adapter so ai-devkit can detect, list, and inspect Google's Antigravity CLI (agy) alongside Claude, Codex, Gemini, and Grok. This is the runtime/agent side of Antigravity and is independent of the existing antigravity environment (which configures the Antigravity IDE), the same way gemini_cli is independent of the gemini environment.

How it works

  • Detects agy processes via matchArgv0('agy').
  • Resolves each live process to its conversation through ~/.gemini/antigravity-cli/cache/last_conversations.json, a { "<cwd>": "<conversationId>" } map the CLI keeps per workspace (ANTIGRAVITY_CLI_HOME overrides the base).
  • Reads the transcript from brain/<conversationId>/.system_generated/logs/transcript.jsonl: user prompts are the text inside <USER_REQUEST>...</USER_REQUEST> of type: "USER_INPUT" records, assistant turns are source: "MODEL", SYSTEM records are skipped. Summary is the last user request; last activity is the newest record created_at.

Changes

  • New AntigravityCliAdapter (self-contained, inline parsing like the other recent adapters) + unit tests.
  • AgentType/StartableAgentType gain antigravity_cli; AGENTS.antigravity_cli = { command: 'agy', matches: matchArgv0('agy') }; exported from the package.
  • Wired into the agent command and channel runner; TYPE_LABELS, --type help, and VALID_AGENT_TYPES updated; README matrix flips Antigravity remote control to yes.
  • dev-lifecycle docs under docs/ai/*/feature-antigravity-cli-adapter.md.

Testing

  • npx nx run agent-manager:test and npx nx run cli:test pass (husky pre-commit ran all packages).
  • Verified against a real agy session on disk: listSessions() and getConversation() parse the on-disk conversation, and detectAgents() with a live agy process resolves the cwd via last_conversations.json to its conversation and summary.

Detect, list, and inspect Google's Antigravity CLI (`agy`) alongside Claude,
Codex, Gemini, and Grok.

- AntigravityCliAdapter (self-contained, parsing inline like the other recent
  adapters): detects `agy` processes via matchArgv0, resolves each live process
  to its conversation through
  ~/.gemini/antigravity-cli/cache/last_conversations.json (the { cwd:
  conversationId } registry), and reads the transcript from
  brain/<id>/.system_generated/logs/transcript.jsonl. The last <USER_REQUEST>
  prompt is the summary; the newest record created_at is the last activity.
- AgentType 'antigravity_cli', AGENTS launch map entry (command `agy`), package
  exports.
- Registered in the agent command and channel runner; added to TYPE_LABELS,
  --type help, and VALID_AGENT_TYPES. README matrix flips Antigravity remote
  control to yes.
- Independent of the existing `antigravity` IDE environment, the same way
  gemini_cli is independent of the gemini environment.

Verified against a real agy session on disk: listSessions and getConversation
parse the on-disk conversation, and detectAgents resolves a live agy pid via
last_conversations.json to its conversation and summary.
@nnhhoang nnhhoang force-pushed the feat/antigravity-cli-adapter branch from 09604b5 to 617efc6 Compare July 2, 2026 07:30
* ~/.gemini/antigravity-cli/cache/last_conversations.json, which the CLI
* maintains as a `{ <cwd>: <conversationId> }` map of the current conversation
* per workspace. The process cwd is the join key.
* 3. Reading the transcript from

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation does not fully satisfy the stated requirement for historical Antigravity CLI sessions. listSessions() only reads cache/last_conversations.json, which is documented as the current conversation per cwd, so older brain/ transcripts can be missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants