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 installed forge-agent-lens-for-google-antigravity executable is the plugin's stdin/stdout hook entrypoint, not a user-facing CLI.

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 for source installation.

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

Install

git clone https://github.com/coreweave/forge-agent-lens-for-google-antigravity.git
cd forge-agent-lens-for-google-antigravity
uv tool install .
command -v forge-agent-lens-for-google-antigravity
agy plugin validate plugin
agy plugin install plugin

The executable must be on PATH in the environment that launches Antigravity.

Set the destination in the environment that launches Antigravity. 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

Antigravity copies plugins during installation. Reinstall after changing files under plugin/:

agy plugin uninstall forge-agent-lens-for-google-antigravity
agy plugin install plugin

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

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 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.0

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.0
File Size Uploaded
forge_agent_lens_for_google_antigravity-0.1.0.tar.gz 107.5 kB Details

Built distribution (wheel)

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

Total release size: 124.5 kB

Release files / forge_agent_lens_for_google_antigravity-0.1.0.tar.gz

Download URL forge_agent_lens_for_google_antigravity-0.1.0.tar.gz
Size 107.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0bc0678bd41186e5d3b3183ecd91810ed3794000f05f870012abec5350e7ae20
BLAKE2b-256 checksum
How to use checksums
df19453f1e08ec1b1782200e67ad28f58021d7c5d92f9e526d429ae5bfdce91c
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 Sep 29, 2026.

Transparency log

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

Download URL forge_agent_lens_for_google_antigravity-0.1.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efa457244264888a59cd24ce81e1ee3a6e8a099be992bf5e07fbe1f6b15085c9
BLAKE2b-256 checksum
How to use checksums
60d2d06c44f5a040eb3021bb309e669b2a154a27477f6b4986ab94af43cc98ea
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 Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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