Skip to content

feat(labs): add experimental Antigravity SDK agent wrapper#6040

Closed
Jacksunwei wants to merge 1 commit into
mainfrom
feat/antigravity-agent
Closed

feat(labs): add experimental Antigravity SDK agent wrapper#6040
Jacksunwei wants to merge 1 commit into
mainfrom
feat/antigravity-agent

Conversation

@Jacksunwei

@Jacksunwei Jacksunwei commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Introduces google.adk.labs.antigravity with AntigravityAgent, a BaseAgent that runs a Google Antigravity SDK agent (described by an AgentConfig) as a native ADK root agent. Lives under labs/ as an experimental feature.

  • Delegates each turn to a fresh SDK Agent and maps trajectory steps to ADK events: model text, function calls/responses, and SSE-gated partial thinking/text deltas.
  • Folder-based session resumption via config.save_dir: renames the harness trajectory to a deterministic per-session name and skips replayed steps using a persisted resume step index.
  • Restricted to standalone root use (local mode only) with construction-time guards (cannot be a sub-agent or have sub-agents).
  • serialize_agent now honors Field(exclude=True) so the non-serializable config does not break the build_graph endpoint.
  • Adds the [antigravity] optional extra (in both the extra and test groups, with uv.lock updated), a game-developer sample, package README, and unit tests.

Test plan

  • pytest tests/unittests/labs/antigravity/ (22 unit tests pass)
  • pytest tests/unittests/cli/utils/test_graph_serialization.py
  • Manual: run the sample via adk web with GEMINI_API_KEY and a [antigravity] install, confirm multi-turn resumption and no duplicate events.

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Jun 9, 2026
@adk-bot

adk-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Response from ADK Triaging Agent

Hello @Jacksunwei, thank you for creating this PR to add the experimental Antigravity SDK agent wrapper!

This is a fantastic addition! While checking the contribution guidelines, we noticed a minor detail that could be updated to make the PR review process even smoother for the maintainers:

  • Logs or Screenshots: Under the Requirement for PRs section of our Contribution Guidelines, we recommend providing logs or a screenshot after the feature is implemented. Since your test plan includes manual verification via adk web and running unit tests, could you please attach a screenshot of the adk web interface showing the running agent, or paste the console outputs from your test runs?

Providing this E2E evidence helps reviewers understand and verify the behavior of your changes more easily. Thank you for your support and great work!

@Jacksunwei Jacksunwei force-pushed the feat/antigravity-agent branch 5 times, most recently from 9cd62a5 to fddafa0 Compare June 10, 2026 22:23
@Jacksunwei Jacksunwei changed the title feat(integrations): add experimental Antigravity SDK agent wrapper feat(labs): add experimental Antigravity SDK agent wrapper Jun 10, 2026
Introduce google.adk.labs.antigravity with AntigravityAgent, a
BaseAgent that runs a Google Antigravity SDK agent (described by an
AgentConfig) as a native ADK root agent.

- Delegates each turn to a fresh SDK Agent and maps trajectory steps to ADK
  events (model text, function calls/responses; SSE-gated partial thinking/
  text deltas).
- Folder-based session resumption via config.save_dir: renames the harness
  trajectory to a deterministic per-session name and skips replayed steps
  using a persisted resume step index.
- Restricted to standalone root use (local mode only) with construction-time
  guards.
- serialize_agent now honors Field(exclude=True) so the non-serializable
  config does not break the build_graph endpoint.
- Adds the [antigravity] extra, a game-developer sample, package README, and
  unit tests.

Change-Id: I58454bce1747002805f523e4b7c8454e9df0c7d2
@Jacksunwei Jacksunwei force-pushed the feat/antigravity-agent branch from fddafa0 to 304f6ad Compare June 10, 2026 22:30
copybara-service Bot pushed a commit that referenced this pull request Jun 11, 2026
Merge #6040

## Summary

Introduces `google.adk.labs.antigravity` with `AntigravityAgent`, a `BaseAgent` that runs a Google Antigravity SDK agent (described by an `AgentConfig`) as a native ADK root agent. Lives under `labs/` as an experimental feature.

- Delegates each turn to a fresh SDK `Agent` and maps trajectory steps to ADK events: model text, function calls/responses, and SSE-gated partial thinking/text deltas.
- Folder-based session resumption via `config.save_dir`: renames the harness trajectory to a deterministic per-session name and skips replayed steps using a persisted resume step index.
- Restricted to standalone root use (local mode only) with construction-time guards (cannot be a sub-agent or have sub-agents).
- `serialize_agent` now honors `Field(exclude=True)` so the non-serializable `config` does not break the `build_graph` endpoint.
- Adds the `[antigravity]` optional extra (in both the extra and `test` groups, with `uv.lock` updated), a game-developer sample, package README, and unit tests.

## Test plan

- [ ] `pytest tests/unittests/labs/antigravity/` (22 unit tests pass)
- [ ] `pytest tests/unittests/cli/utils/test_graph_serialization.py`
- [ ] Manual: run the sample via `adk web` with `GEMINI_API_KEY` and a `[antigravity]` install, confirm multi-turn resumption and no duplicate events.

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=#6040 from google:feat/antigravity-agent 304f6ad
PiperOrigin-RevId: 930712984
@adk-bot

adk-bot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Thank you @Jacksunwei for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit 4cb27fd.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Jun 11, 2026
@adk-bot adk-bot closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core [Component] This issue is related to the core interface and implementation merged [Status] This PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants