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_startedsubagents.md

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

Subagents Example

This example demonstrates how an agent can spawn and delegate tasks to sub-agents using the Google Antigravity SDK.

Spawning a Subagent

To allow an agent to spawn subagents, you need to enable them in the CapabilitiesConfig. By default, subagents are enabled.

Here is a minimal example of an agent spawning a subagent to perform a specific task.

from google.antigravity import Agent, LocalAgentConfig, types

# Enable subagents in the config
config = LocalAgentConfig(
    capabilities=types.CapabilitiesConfig(
        enable_subagents=True,
    )
)

async with Agent(config) as agent:
    # Prompt the agent to use a subagent
    response = await agent.chat("Use a subagent to write a short poem about nature.")
    print(await response.text())

Consuming Subagent Output

The result from the subagent is typically delivered back to the main agent, which then presents it or uses it. The await response.text() call will return the final aggregated response, including the output produced by the subagent.

Configuring Subagent Capabilities and Behavior

Subagents default to agent_behavior=AgentBehavior.AUTONOMOUS. You can declare custom subagents and customize their capabilities and execution behavior via SubagentConfig and SubagentCapabilities:

from google.antigravity import Agent, LocalAgentConfig, types

config = LocalAgentConfig(
    subagents=[
        types.SubagentConfig(
            name="researcher",
            description="Researches topics autonomously.",
            capabilities=types.SubagentCapabilities(
                agent_behavior=types.AgentBehavior.AUTONOMOUS,
            ),
        ),
    ],
)

Hierarchical & Nested Subagents

You can create multi-tier subagent hierarchies where subagents delegate further to other subagents. Configure the session-wide depth limit with max_subagent_depth on CapabilitiesConfig, and scope which subagents each tier can invoke with allowed_subagents:

from google.antigravity import Agent, LocalAgentConfig, types

# Leaf tier: Can read files but cannot spawn further subagents.
fact_checker = types.SubagentConfig(
    name="fact_checker",
    description="Fact checks claims by verifying data.",
    capabilities=types.SubagentCapabilities(
        enabled_tools=[types.BuiltinTools.VIEW_FILE],
    ),
)

# Middle tier: Can read files and delegate to fact_checker.
lead_researcher = types.SubagentConfig(
    name="lead_researcher",
    description="Researches a topic and delegates verification to fact_checker.",
    capabilities=types.SubagentCapabilities(
        enabled_tools=[
            types.BuiltinTools.VIEW_FILE,
            types.BuiltinTools.START_SUBAGENT,
        ],
        allowed_subagents=["fact_checker"],
    ),
)

# Root agent: Session depth ceiling of 3; initially allowed to invoke lead_researcher.
config = LocalAgentConfig(
    subagents=[lead_researcher, fact_checker],
    capabilities=types.CapabilitiesConfig(
        enable_subagents=True,
        max_subagent_depth=3,
        allowed_subagents=["lead_researcher"],
    ),
)

async with Agent(config) as agent:
    response = await agent.chat(
        "Use 'lead_researcher' to analyze the report and have 'fact_checker' verify figures."
    )
    print(await response.text())

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