from vly import AsyncVlyasync with AsyncVly(api_key=os.environ["VLY_API_KEY"]) as vly: project = await vly.projects.create(name="...", prompt="...") async for chunk in (await vly.agents.run(project_id=project.id, prompt="...")).stream(): print(chunk)
from vly import VlyErrortry: vly.projects.create(name="...", prompt="...")except VlyError as err: print(err.code, err.message) if err.code == "key_rate_limited": # wait and retry pass