Balaji Seetharaman
03/12/2025, 6:13 AM{
"actor-start": {
"eventTitle": "Price for Actor start",
"eventDescription": "Flat fee for starting an Actor run.",
"eventPriceUsd": 0.1
},
"task-completed": {
"eventTitle": "Price for completing the task",
"eventDescription": "Flat fee for completing the task.",
"eventPriceUsd": 0.4
}
}
main.py
async def main():
"""Runs the AI Travel Planner workflow."""
async with Actor:
await Actor.charge('actor-start')
actor_input = await Actor.get_input() or {}
Actor.log.info(f"Received input: {actor_input}")
travel_query = TravelState(**actor_input)
# Execute workflow
final_state = travel_workflow.invoke(travel_query)
Actor.log.info(f"Workflow completed. Final state: {final_state}")
await Actor.charge('task-completed')
# Save the final report
await save_report(final_state)Hall
03/12/2025, 6:13 AMSaurav Jain
03/13/2025, 4:24 AMalexeyudovydchenko
03/13/2025, 7:55 AMif (Actor.isAtHome() && Actor.getChargingManager().getPricingInfo().isPayPerEvent) {
if (Actor.getChargingManager().getChargedEventCount('actor-start') === 0) {
await Actor.charge({ eventName: 'actor-start' });
}
}alexeyudovydchenko
03/13/2025, 7:56 AMBalaji Seetharaman
03/13/2025, 8:23 AMactor-start-gb and enabled them in the cloud. will it two weeks for them to take effective and i have used the below code to charge them
async def charge_for_actor_start() -> None:
"""Charges for the Actor start event.
This function calculates the memory usage in gigabytes and charges for the Actor start event accordingly.
"""
count = (Actor.get_env()['memory_mbytes'] or 1024 + 1023) // 1024
await Actor.charge(event_name='actor-start-gb', count=count)
in main.py, i am using this
asyncio.create_task(charge_for_actor_start()Balaji Seetharaman
03/13/2025, 5:26 PMHi Balaji,
We want to inform you about the updated pricing model for the AI Travel Assistant (bala-ceg/ai-travel-assistant). Starting from March 27, 2025, you'll pay only for specific events of the Actor, instead of paying for compute, proxies and other dynamic usage costs. The new prices will be:
actor-start-gb: $0.20
You can find more information on the new pricing model in the documentation. If you have any questions or need more information, don't hesitate to reach out.
This notification relates to your personal account balaji_ceg@outlook.com (bala-ceg).Saurav Jain
03/14/2025, 1:40 AMBalaji Seetharaman
03/14/2025, 2:48 AMdhrumil4u360
08/06/2025, 5:28 AM.actor/pay_per_event.json file and what is the role of it ? Is there any documentation please?