Skip to content

Google Antigravity

Google Antigravity (the agy CLI, Antigravity App, and Antigravity IDE) connects to The Librarian natively over Streamable HTTP MCP. The in-tree plugin bundles the MCP config, three slash-command skills, session-start awareness and recent journal injection, and automatic transcript capture.

Before you start: you need a running Librarian server, its MCP URL, and an agent token — see Install.

Terminal window
npx @the-librarian/cli install # choose Google Antigravity
npx @the-librarian/cli update # later: pull the latest plugin

librarian install works on both CLI and Desktop-only machines: if agy is on PATH, it runs agy plugin install; if not (for example Antigravity Desktop without the CLI), it installs the plugin directly into ~/.gemini/config/plugins/the-librarian/, where Antigravity Desktop discovers global plugins automatically.

Or install straight from this repository with agy:

Terminal window
agy plugin install https://github.com/code-ministry-ltd/the-librarian/tree/main/integrations/antigravity

Or for Antigravity Desktop without agy, copy or symlink integrations/antigravity into ~/.gemini/config/plugins/the-librarian/, then open Skills & Customizations in the left sidebar. Once approved in Google’s official Antigravity Plugin Marketplace, you can also install it from Customizations → Plugins → Marketplace → The Librarian.

Because the plugin declares MCP variables, Antigravity installs it disabled (enabled: false) until you supply those values. Open /plugin in Antigravity, fill in:

  • LIBRARIAN_MCP_URL — your Librarian MCP endpoint (for example https://librarian.example.com/mcp)
  • LIBRARIAN_AGENT_TOKEN — your agent bearer token (stored as a sensitive variable)

and then enable the-librarian. (Do not enable the plugin before filling in the variables, or Antigravity will pass literal ${LIBRARIAN_MCP_URL} placeholders.)

To enable automatic capture and session-start journal injection, also export both variables in the shell profile that launches Antigravity (e.g. ~/.zshrc or ~/.bashrc):

Terminal window
export LIBRARIAN_MCP_URL="https://librarian.example.com/mcp"
export LIBRARIAN_AGENT_TOKEN="<your-token>"

Antigravity injects the plugin’s mcp_config.json variables into the MCP connection (so all 8 tools, the primer, and the slash commands work immediately), but passes only PLUGIN_ROOT and PLUGIN_DATA into hook scripts. If the shell variables are not set, hooks fail soft and your turns are never blocked.

If you only want the 8 MCP tools without slash commands or hooks:

Terminal window
agy mcp add --type http --header "Authorization: Bearer $LIBRARIAN_AGENT_TOKEN" \
librarian "$LIBRARIAN_MCP_URL"
  • Eight memory, handoff and journal tools — recall, remember, flag_memory, store_handoff, list_handoffs, claim_handoff, search_references, and journal.
  • Three slash-command skills — /handoff, /takeover, and the local-only /toggle-private.
  • Automatic capture — a fail-soft Stop hook tails Antigravity’s transcript.jsonl from a byte-offset cursor ($PLUGIN_DATA/cursors/<conversationId>), keeps unwrapped user and assistant prose only, skips private mode turns forward-only, and respects LIBRARIAN_AUTO_SAVE=false.
  • Awareness banner & recent journal — SessionStart hooks inject the awareness banner and recent journal window (capped at 9,500 characters; opt out with LIBRARIAN_JOURNAL=off).
  • History backfill — librarian import --harness antigravity reads past Antigravity transcripts from ~/.gemini/{antigravity-cli,antigravity,antigravity-ide}/brain/.
Terminal window
agy plugin list --json

You should see the-librarian listed with "enabled": true, 3 skills (handoff, takeover, toggle-private), 1 MCP server (librarian), and 1 hook group (librarian).