Skip to main content

Forge Agent Lens for Google Antigravity

CI

Forge Agent Lens tracing for the Google Antigravity™ coding harness. When an agent turn becomes fully idle, the plugin translates its transcript into typed Forge agent spans.

Antigravity Stop hook + transcript
  -> Forge Turn, LLM, Tool, and SubAgent models
  -> Forge SDK OpenTelemetry exporter
  -> Agent Lens

This repository is only the Antigravity adapter. It has no Agent Lens client, trace-query client, or transport implementation. The CoreWeave Forge SDK (coreweave==0.1.0b0, installed from PyPI) owns W&B credential discovery, endpoint selection, OpenTelemetry encoding, export, flushing, and shutdown.

The forge-agent-lens-for-google-antigravity executable is the plugin's Stop hook: with no arguments it reads a hook payload on stdin. Its install command registers the plugin with Antigravity.

Requirements

  • macOS or Linux.
  • Python 3.10 or newer.
  • Antigravity CLI 1.1.10 or newer; the current release is recommended.
  • A W&B API key and destination in entity/project form.
  • uv, which runs the hook through uvx.

See Google's official hook reference, plugin documentation, and CLI repository.

Install

uvx forge-agent-lens-for-google-antigravity@latest install

install registers the bundled plugin through agy plugin install, with a Stop hook that runs this exact version through uvx, then checks what the hook needs and prints where traces will appear:

Installed the Antigravity plugin (forge-agent-lens-for-google-antigravity X.Y.Z).
✓ Hook command         uvx forge-agent-lens-for-google-antigravity@X.Y.Z
✓ FORGE_TRACE_PROJECT  my-team/antigravity-traces
✓ W&B API key          WANDB_API_KEY
View traces: https://wandb.ai/my-team/antigravity-traces/weave/agents

uvx must be on PATH in the environment that launches Antigravity. Set the destination there too. The Forge SDK reads WANDB_API_KEY directly or resolves it from the W&B entry in .netrc.

export FORGE_TRACE_PROJECT=entity/project
export WANDB_API_KEY=...
agy

To install a specific version, pin it. This also switches an existing install to that version:

uvx forge-agent-lens-for-google-antigravity@X.Y.Z install

Rerun the @latest command to upgrade. Antigravity copies the plugin during installation, and installing over an existing plugin replaces it. Running install through uvx caches that version, so the first Stop hook doesn't download it. Afterwards, a uv tool install from 0.1.0 or 0.1.1 is no longer used; remove it with uv tool uninstall forge-agent-lens-for-google-antigravity.

install needs 0.1.2 or newer. For 0.1.0 or 0.1.1, install the executable with uv tool install forge-agent-lens-for-google-antigravity==X.Y.Z, then the plugin from the latest release archive. The archive's hook runs the executable on PATH, so it works with every version:

curl -fsSLO https://github.com/coreweave/forge-agent-lens-for-google-antigravity/releases/latest/download/forge-agent-lens-for-google-antigravity-plugin.zip
unzip -qo forge-agent-lens-for-google-antigravity-plugin.zip -d forge-agent-lens-plugin
agy plugin install forge-agent-lens-plugin

To test unreleased changes, see Test a change in Antigravity.

View traces

Traces appear in W&B under https://wandb.ai/<entity>/<project>/weave/agents, where entity/project is FORGE_TRACE_PROJECT. For a dedicated or self-managed instance, links follow WANDB_BASE_URL, or WANDB_APP_URL when set. After each exported turn, the hook logs a link to that conversation:

forge-agent-lens-for-google-antigravity: View traces: https://wandb.ai/my-team/antigravity-traces/weave/agents/conversations/<conversation-id>

Antigravity shows hook output neither in its terminal UI nor in agy -p output. It writes the hook's stderr to its CLI logs, so conversation links, export errors, and the warning logged when FORGE_TRACE_PROJECT is unset are all there:

grep -h "JSON hook command stderr" ~/.gemini/antigravity-cli/log/cli-*.log | tail

How export works

The plugin registers one observability-only Stop hook. It waits for fullyIdle=true, reads the untruncated sibling transcript_full.jsonl when available, and maps the completed turn through Forge SDK models:

Antigravity record Forge span
User request through fully-idle stop invoke_agent Antigravity
PLANNER_RESPONSE chat <model>
Tool request and following result execute_tool <tool>
invoke_subagent request and result nested invoke_agent <subagent>

Forge emits one trace per turn and links those traces with the hook's conversationId. User and assistant text, reasoning, tool names, arguments, and results are preserved when present; step timestamps bound the spans. The transcript does not currently expose token usage, exact model request settings or response IDs, or a delegated subagent's internal LLM and tool activity, so the adapter does not synthesize those fields. The delegation itself is still exported as a nested subagent span.

Forge supplies the standard gen_ai.* fields from its typed models. The adapter adds only integration provenance and Antigravity metadata without a semantic-convention equivalent:

Attribute Value
forge.integration.name antigravity
forge.integration.version Installed adapter version
forge.integration.antigravity.workspace.paths Hook workspacePaths
forge.integration.antigravity.execution.number Stop-hook execution attempt
forge.integration.antigravity.termination.reason Stop reason

The adapter calls tracing.init(), log_conversation(), and the returned session's force_flush() and shutdown(). Production code never constructs an HTTP request or OpenTelemetry exporter.

The first observed stop exports only the newest turn, so installing the plugin does not upload earlier conversation history. A small checkpoint under the conversation's Antigravity artifact directory prevents duplicate export. Later turns include history observed after installation. The checkpoint advances only after the Forge SDK reports a successful flush; a failed export stays eligible for retry.

Configuration and privacy

Variable Owner Purpose
FORGE_TRACE_PROJECT adapter Required destination in entity/project form
FORGE_ANTIGRAVITY_INCLUDE_CONTENT adapter Set to false to omit prompts, outputs, reasoning, and tool payloads
WANDB_API_KEY Forge SDK W&B authentication; .netrc is also supported
WANDB_BASE_URL Forge SDK W&B base URL for endpoint derivation
WF_TRACE_SERVER_URL Forge SDK Explicit trace-server override
WANDB_APP_URL adapter W&B app URL for trace links; derived from WANDB_BASE_URL by default

Content capture defaults to enabled. For sensitive workspaces, set:

export FORGE_ANTIGRAVITY_INCLUDE_CONTENT=false

Workspace paths and Stop metadata remain queryable when content capture is disabled.

Runtime export failures are fail-open: the entrypoint logs the error, returns a neutral stop decision, and never extends the agent loop. The plugin registers no tool or invocation hooks and does not alter permissions, prompts, or results.

Validate

The example runs the installed hook entrypoint against a synthetic transcript and an in-process OTLP receiver. It exercises the parser, Forge models, and the real Forge SDK exporter without contacting an external service:

uv sync --locked --group test
uv run python examples/local_smoke_test.py

Run the release checks:

uv run ruff format --check .
uv run ruff check .
uv run mypy
uv run coverage run -m pytest
uv run coverage report
uvx --from bandit==1.8.6 bandit -q -r src examples
AUDIT_SITE_PACKAGES="$(uv run python -c 'import site; print(site.getsitepackages()[0])')"
uvx --from pip-audit==2.9.0 pip-audit --path "$AUDIT_SITE_PACKAGES" --skip-editable
uvx --from zizmor==1.30.1 zizmor --pedantic .
uvx --from 'reuse[charset-normalizer]==6.2.0' reuse lint
uv build
uvx --from twine==7.0.0 twine check dist/*
agy plugin validate src/forge_antigravity/plugin

To test against a local Forge SDK checkout without changing the lockfile:

uv run --with-editable /path/to/forge-sdk/python pytest

CI runs Python 3.10 through 3.14, enforces branch coverage of at least 90%, and validates release artifacts. See CONTRIBUTING.md and CHANGELOG.md.

Contributing

See CONTRIBUTING.md. Contributions require agreeing to the CoreWeave CLA. Report vulnerabilities privately as described in SECURITY.md.

License

Apache 2.0. See LICENSE.

Trademarks

Google Antigravity is a trademark of Google LLC. This project is not affiliated with, sponsored by, or endorsed by Google.

Metadata

Release files for forge-agent-lens-for-google-antigravity 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-agent-lens-for-google-antigravity 0.1.2
File Size Uploaded
forge_agent_lens_for_google_antigravity-0.1.2.tar.gz 113.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forge-agent-lens-for-google-antigravity 0.1.2
File Interpreter ABI Platform
forge_agent_lens_for_google_antigravity-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 135.2 kB

Release files / forge_agent_lens_for_google_antigravity-0.1.2.tar.gz

Download URL forge_agent_lens_for_google_antigravity-0.1.2.tar.gz
Size 113.8 kB
Tags Source
SHA-256 checksum
How to use checksums
85078d3e098fcabdc59a81c7434bad38cebbc647cd869f7a5d42ea19472e0a7e
BLAKE2b-256 checksum
How to use checksums
aa00d4cbba9e5c9b21ce7eedf28510b88ff5e3d76c1fedb0c4df071cbf2d0605
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / forge_agent_lens_for_google_antigravity-0.1.2-py3-none-any.whl

Download URL forge_agent_lens_for_google_antigravity-0.1.2-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
111b009d084ff9cb8d8774b482498514257decf9f0379611ae9617bc375a226b
BLAKE2b-256 checksum
How to use checksums
192d424d0e6c306b56fd12194ce5bc3c6c5f46257384e30a9fbf8b914a36d9ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page