import asyncio
from oagi import AsyncDefaultAgent
from tapkit import TapKitClient
from tapkit.oagi import TapKitAsyncActionHandler, TapKitAsyncImageProvider
async def main():
# Connect to your phone
client = TapKitClient()
phone = client.phone("my-phones-name")
# Set up TapKit providers for Lux
image_provider = TapKitAsyncImageProvider(phone=phone)
action_handler = TapKitAsyncActionHandler(phone=phone)
# Create and run the agent
agent = AsyncDefaultAgent(
model="lux-actor-1",
max_steps=20
)
await agent.execute(
instruction="Open up messages and text Edgar that we're going on the boat tomorrow.",
action_handler=action_handler,
image_provider=image_provider
)
asyncio.run(main())