Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.argalabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Create a URL run

Test a live URL with browser validation and optional digital twins.
run = client.runs.create_url_run(
    url="https://staging.myapp.com",
    prompt="Test the checkout flow",         # optional
    twins=["stripe", "slack"],               # optional
    credentials={"email": "test@example.com", "password": "pass"},  # optional
    runner_mode="visual",                    # optional
    session_id="abc-123",                    # optional
)
# run.run_id, run.status, run.session_id

Create a PR run

Validate code changes from a branch or pull request.
run = client.runs.create_pr_run(
    repo="myorg/myrepo",
    branch="feature/checkout",               # optional (or use pr_url)
    pr_url="https://github.com/org/repo/pull/42",  # optional
    twins=["stripe"],                        # optional
    context_notes="Changed the payment flow", # optional
    scenario_prompt="Customer with active subscription",  # optional
)

Get run details

detail = client.runs.get("run-id")
print(detail.status)          # "completed", "running", "failed", etc.
print(detail.results_json)    # list of step results
print(detail.step_summaries)  # grouped summaries
print(detail.event_log_json)  # timeline events

Stream results

Stream live results via server-sent events:
for event in client.runs.stream_results("run-id"):
    print(event)

# Async
async for event in client.runs.stream_results("run-id"):
    print(event)

Wait for completion

Block until the run reaches a terminal status (completed, failed, or cancelled):
detail = client.runs.wait(
    "run-id",
    poll_interval=2.5,  # seconds between polls (default 2.5)
    timeout=600,         # max seconds to wait (default 600)
)

Cancel a run

client.runs.cancel("run-id")