All skills
google-antigravity avatar

/google-antigravity-sdk

@2eb7fee

Design, implement, and debug autonomous AI agents and multi-agent systems using the Google Antigravity (AGY) SDK. ACTIVATE this skill when the user wants to create, configure, or orchestrate Google Antigravity agents.

Use this Skill: https://skilld.dev/gh/google-antigravity/antigravity-sdk-python/google-antigravity-sdk

This session only. Nothing lands on disk.

examplesgetting_startedcompaction.md

≈370 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Conversation Compaction & Context Limits

This guide demonstrates how to configure conversation history compaction thresholds using CompactionConfig.


Overview

As an agent performs multi-turn tasks, its conversation trajectory grows. To prevent exceeding model token limits while retaining critical task history, Antigravity compacts older conversation history when the active trajectory exceeds token_threshold. Earlier turns are evicted and replaced with a cumulative summary, while recent turns are preserved verbatim with full fidelity.


Code Example

import asyncio
from google.antigravity import Agent, LocalAgentConfig, types

# Configure compaction parameters on LocalAgentConfig
config = LocalAgentConfig(
    compaction_config=types.CompactionConfig(
        token_threshold=50_000,
    ),
)

async def main():
    async with Agent(config=config) as agent:
        response = await agent.chat(
            "Perform a deep multi-step analysis of our code repository."
        )
        print(await response.text())

if __name__ == "__main__":
    asyncio.run(main())

Key Concepts

  • CompactionConfig: Attached to LocalAgentConfig(compaction_config=...), LiteRTAgentConfig, LocalOpenAIAgentConfig, or AntigravityProdActorAgentConfig.
  • token_threshold: The token ceiling allowed for conversation history before older turns are compacted. When omitted or None, the backend's default threshold is used.

Source: SKILL.md on GitHub

No alerts6d3 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    The skill provides comprehensive documentation and code examples for the Google Antigravity SDK. It describes tools for shell execution, web search, and subagent orchestration, which are intended features of the SDK. The documentation emphasizes security best practices, including safe credential management, safety policy configuration, and the use of sandboxing for shell commands.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: LOW · No issues

Signed by skilld at 2eb7fee. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 2 weeks ago

README badge

README badge for google-antigravity/antigravity-sdk-python