Skip to main content

Installation

uv add arga-py-sdk

Quick start

from arga_sdk import Arga

client = Arga(api_key="arga_sk_...")

# Start an ad hoc browser test run
run = client.test_runs.create(
    prompt="Test checkout with Stripe",
    start_url="https://staging.myapp.com",
    twins=["stripe"],
)

# Wait for completion
detail = client.test_runs.wait(run.id, timeout=300)
print(detail.status, detail.artifacts_json)

Async usage

Every method is available in async form via AsyncArga:
import asyncio
from arga_sdk import AsyncArga

async def main():
    async with AsyncArga(api_key="arga_sk_...") as client:
        run = await client.test_runs.create(
            prompt="Smoke test",
            start_url="https://staging.myapp.com",
        )
        detail = await client.test_runs.wait(run.id)
        print(detail.status)

asyncio.run(main())

Reference

Runs

Use the canonical sandbox, twin, saved-test, and test-run resources, plus legacy runs when needed.

Twins

Use both canonical twin runs and legacy twin quickstart helpers.

Scenarios

Create reusable seed configs and use them to seed short-lived twin runs.

Errors and clients

Handle SDK errors and use sync or async context managers.

Examples

Run production-style scripts from the Python SDK repository.

Source

github.com/ArgaLabs/arga-python-sdk