Skip to content

feat: add antigravity tools and external agent#8006

Merged
ysolanky merged 1 commit into
mainfrom
ysolanky/mirror-pvt-pr-1
May 19, 2026
Merged

feat: add antigravity tools and external agent#8006
ysolanky merged 1 commit into
mainfrom
ysolanky/mirror-pvt-pr-1

Conversation

@ysolanky

@ysolanky ysolanky commented May 19, 2026

Copy link
Copy Markdown
Member

Summary

Adds first-party support for Google's Gemini Agents API ("Antigravity") in Agno, in two integration shapes mapped to the API's two natural use cases:

  • AntigravityAgent (agno.agents.antigravity) — a BaseExternalAgent adapter so an Antigravity-backed agent can be served through AgentOS with native sessions, streaming, and UI. Mirrors the existing ClaudeAgent / LangGraphAgent / DSPyAgent pattern.
  • AntigravityTools (agno.tools.antigravity) — a Toolkit so a regular Agno agent (any model) can delegate a sub-task to a managed Antigravity sandbox as a single tool call. Mirrors the DaytonaTools / E2BTools pattern

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Duplicate and AI-Generated PR Check

  • I have searched existing open pull requests and confirmed that no other PR already addresses this issue
  • If a similar PR exists, I have explained below why this PR is a better approach
  • Check if this PR was entirely AI-generated (by Copilot, Claude Code, Cursor, etc.)

@ysolanky ysolanky requested a review from a team as a code owner May 19, 2026 21:03
@ysolanky ysolanky force-pushed the ysolanky/mirror-pvt-pr-1 branch from 471e167 to 7618904 Compare May 19, 2026 21:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 471e167055

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +455 to +459
event.get("environment_id")
or interaction_obj.get("environment_id")
or (interaction_obj.get("environment") or {}).get("id")
if isinstance(interaction_obj.get("environment"), dict)
else None

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve top-level environment_id when parsing SSE frames

The final_env_id assignment is gated by if isinstance(interaction_obj.get("environment"), dict), so when that condition is false the whole expression becomes None and both event["environment_id"] and interaction["environment_id"] are ignored. In streaming runs this can silently drop a valid env id, which prevents session env caching and breaks follow-up features that rely on persisted environment state (reuse/snapshot by session).

Useful? React with 👍 / 👎.

- `antigravity_session_agentos.py` — same with SQLite-backed sessions

For the toolkit examples (Antigravity-as-a-tool), see:
- [`cookbook/91_tools/antigravity_tools.py`](../../91_tools/antigravity_tools.py) — delegate a sub-task to a sandbox

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point toolkit README links to the actual antigravity subfolder

The toolkit example links in this README target cookbook/91_tools/*.py, but the new files were added under cookbook/91_tools/antigravity/*.py; following these links lands on non-existent paths and blocks users from running the documented examples.

Useful? React with 👍 / 👎.

@ysolanky ysolanky force-pushed the ysolanky/mirror-pvt-pr-1 branch from 7618904 to e32b4bb Compare May 19, 2026 21:26
Adds first-party support for Google's Gemini Agents API ("Antigravity") in
Agno, in two integration shapes mapped to the API's two natural use cases:

- AntigravityAgent (agno.agents.antigravity) — a BaseExternalAgent adapter
  so an Antigravity-backed agent can be served through AgentOS with native
  sessions, streaming, and UI. Mirrors the existing ClaudeAgent /
  LangGraphAgent / DSPyAgent pattern.
- AntigravityTools (agno.tools.antigravity) — a Toolkit so a regular Agno
  agent (any model) can delegate a sub-task to a managed Antigravity sandbox
  as a single tool call. Mirrors the DaytonaTools / E2BTools pattern.

Mirrored from agno-agi/agno-pvt#1 (squashed).
@ysolanky ysolanky force-pushed the ysolanky/mirror-pvt-pr-1 branch from e32b4bb to 69e4193 Compare May 19, 2026 21:40
@ysolanky ysolanky merged commit 28f8b4a into main May 19, 2026
6 checks passed
@ysolanky ysolanky deleted the ysolanky/mirror-pvt-pr-1 branch May 19, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant