import asyncio
from google.antigravity import Agent, LocalAgentConfig

async def test():
    config = LocalAgentConfig(model="gemini-3.1-pro", api_key="test")
    try:
        async with Agent(config) as agent:
            resp = await agent.chat("hello")
            print("Is coroutine:", asyncio.iscoroutinefunction(resp.text))
            
            # call it
            val = resp.text()
            print("Return value type:", type(val))
    except Exception as e:
        print("ERROR:", e)

asyncio.run(test())
