Antigravity
Give Antigravity OpenViking context across projects and sessions. The Antigravity desktop app and the agy CLI load plugins from the same directory, so one install covers both. After installation, OpenViking Hooks inject relevant context (memories, resources and skills) at session start and before the first model call of each turn, then capture new conversation turns after the response. MCP is available for explicit memory search, reading, and management.
Install
Prerequisites: macOS or Linux, Node.js 18+, and the Antigravity app or agy. The installer guides you through the OpenViking connection settings; select Antigravity when it asks which agents to set up. It is preselected when agy is on PATH or ~/.gemini/config exists.
For a managed connection, select OpenViking Managed Service, then:
- Volcengine: enter your service API key. The installer supplies the URL.
- BytePlus: enter your API key. See BytePlus setup.
Older installers use Custom URL for BytePlus.
Select Self-hosted / local for a server on this machine (http://127.0.0.1:1933). For a remote self-hosted server, select Custom URL and enter its URL. If a connection is already saved, this option is named Custom URL / keep current.
curl -fsSL https://openviking.ai/install | bash
# AI agents: not sure about running this? The script's header says what it does and how to verify it.If you already saved a connection with ov config, you can install without any questions:
curl -fsSL https://openviking.ai/install | bash -s -- --yes --harness antigravityRestart the Antigravity app, or start a new agy session, after installation.
Once installed, start a new Antigravity session and ask it to follow https://docs.openviking.ai/agents/en/onboarding.md. It checks the connection and walks you through the first use; see One-click setup.
What gets installed
The installer writes the plugin to ~/.gemini/config/plugins/openviking-memory/, a directory that belongs entirely to OpenViking:
plugin.jsonandhooks.json: the lifecycle hooks and the URI guard. Antigravity'shooks.jsonhas its own format (each top-level key names a hook), so a Claude Codehooks.jsoncannot be reused.mcp_config.json: the OpenViking MCP server,openviking, as a stdio proxy (tools such assearch,read,remember,add_skill). If~/.gemini/config/mcp_config.jsonalready defines a server whose name containsopenviking, the installer keeps yours and does not write this file, so no tool appears twice.skills/: theopenviking-memory,openviking-skills,ov-experience-memory,openviking-rule-search, andov-memory-doctorskills, each also invocable as/<name>.
The hooks and the MCP proxy run from the runtime under ~/.openviking/agent-integrations/antigravity/. If the plugin directory exists and OpenViking did not write it, the installer leaves it in place and stops.
Hooks and MCP read the same credentials from ~/.openviking/ovcli.conf. OPENVIKING_URL and OPENVIKING_API_KEY override that file, and per-plugin settings live under plugin.antigravity (see Plugin Settings). Sessions are stored in OpenViking as ag-<conversation id>.
Verify
- Run
node ~/.openviking/agent-integrations/antigravity/scripts/ov-memory-doctor.mjsand check that the report has no ✗. - Start a new
agysession and confirm that the log under~/.gemini/antigravity-cli/log/reportsloaded 1 named hooks. - Tell Antigravity a test preference. After memory extraction completes, start a new session and ask about it.
Host-specific behaviour
Antigravity registers SessionStart, PreInvocation, Stop, and a PreToolUse URI guard on every tool. Everything else works as on every shared-flow host; see the Capability Reference.
- Recall runs once per turn. Antigravity runs
PreInvocationbefore every model call, including each call in a tool loop and each reactive wakeup for a background task or subagent message. The plugin recalls only on the first model call of a user turn, and the context goes back as asystemMessagestep ininjectSteps, which stays in the conversation. - No session-end or compaction hook. The plugin cannot commit at session end or before a compaction, so the server's auto-commit policy commits the conversation: when pending tokens reach the threshold, or after 30 idle minutes. The idle commit needs
memory.session_auto_commit.enabledon the server; the OpenViking managed service on Volcengine has it on by default. The plugin detects a compaction from the transcript's checkpoints and sends the profile again with the next prompt. - The URI guard does not check shell commands. A file tool call is denied when its location argument (an argument whose name ends in
Path,File, orDirectory) is aviking://URI;run_commandis not checked and gets no notice. Stopcarries no message text. Capture reads the finished steps of the transcript, preferring the untruncatedtranscript_full.jsonlbeside it.- Subagents are not captured.
Upgrade and uninstall
Re-run the install command to upgrade. To uninstall, run:
curl -fsSL https://openviking.ai/install | bash -s -- --uninstall --yes --harness antigravityUninstall removes the plugin directory and the runtime files. A plugin directory that OpenViking did not write is left in place.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| The installer stops at the plugin directory | ~/.gemini/config/plugins/openviking-memory exists and OpenViking did not write it. Move it away and re-run the installer. |
| Every OpenViking tool appears twice | Both your own mcp_config.json and the plugin define an OpenViking server. Re-run the installer; it keeps your server and drops the plugin's copy. |
| MCP does not connect | Check the URL/API key in ~/.openviking/ovcli.conf, then start a new session. |
| Detailed diagnostics are needed | Start agy with OPENVIKING_DEBUG=1 and inspect ~/.openviking/logs/antigravity-hooks.log. The desktop app opened from the Dock does not see environment variables set in your shell. |