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

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

Structured Output

This example demonstrates how to force the agent to produce structured data (JSON) matching a specific schema. This is useful when you need the agent's response to be machine-readable and conform to a strict structure.

Code

from google.antigravity import Agent, LocalAgentConfig
import pydantic

# Define the target schema using Pydantic
class ActionItem(pydantic.BaseModel):
    assignee: str
    task: str
    deadline: str

class MeetingSummary(pydantic.BaseModel):
    action_items: list[ActionItem]

# Configure the agent with the response schema
config = LocalAgentConfig(
    response_schema=MeetingSummary,
)

async with Agent(config) as agent:
    prompt = (
        "Extract action items from this text: Alice will update tests by "
        "Monday. Bob will run benchmarks tomorrow."
    )

    response = await agent.chat(prompt)

    # Access the structured output
    data = await response.structured_output()

    # The result is a dictionary matching the schema
    print(data)

Key Concepts

  • response_schema: You can pass a Pydantic model to LocalAgentConfig via the response_schema parameter to enforce structured output.
  • response.structured_output(): This method retrieves the parsed JSON data matching the specified schema. It returns a dictionary (or None if parsing failed).

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