# pip install smooth-pyfrom smooth import SmoothClientsmooth_client = SmoothClient(api_key="cmzr-YOUR_API_KEY")task = smooth_client.run("Go to google flights and find the cheapest flight from London to Paris today")print(f"Live URL: {task.live_url()}")print(f"Agent response: {task.result()}")
If Python is not your language of choice, check out our API Reference.
Returns a live URL where you can see the agent in action.Set interactive=True to get an interactive view.Set embed=True to get an embeddable view (ideal for iframes).
Waits for the task completion and returns a recording URL upon completion. You can use this link to download the video recording of the task. The video will be ready shortly after the task completes.
from smooth import SmoothClientsmooth_client = SmoothClient(api_key="cmzr-YOUR_API_KEY")task = smooth_client.run("Go to google flights and find the cheapest flight from London to Paris today")task_result = task.result() # Waits for the agent responseif task_result.status == "done": print(f"Agent response: {task_result.output}") print(f"Total cost: ${task_result.credits_used * 0.01}")else: print(f"There was an error: {task_result.error}")
Returns a TaskHandle with the following attributes.