from codegen import Agent # Initialize the Agent with your organization ID and API token agent = Agent(org_id="...", token="...") # Run an agent with a prompt task = agent.run(prompt="Leave a review on PR #123") # Check the initial status print(task.status) # Refresh the task to get updated status (tasks can take time) task.refresh() if task.status == "completed": print(task.result) # Result often contains code, summaries, or links