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 scenario

Create with a natural language prompt. Arga generates the seed config.
scenario = client.scenarios.create(
    name="E-commerce checkout",
    prompt="A Stripe account with 3 customers on different plans",
    description="For testing checkout flows",  # optional
    tags=["checkout", "stripe"],               # optional
)
Or create with an explicit seed config:
scenario = client.scenarios.create(
    name="Support channel",
    twins=["slack"],
    seed_config={
        "slack": {
            "channels": [{"name": "support", "messages": ["Help needed"]}]
        }
    },
)

List scenarios

# All scenarios
scenarios = client.scenarios.list()

# Filter by twin or tag
scenarios = client.scenarios.list(twin="stripe")
scenarios = client.scenarios.list(tag="checkout")

Get a scenario

scenario = client.scenarios.get("scenario-id")
print(scenario.name, scenario.twins, scenario.seed_config)

Ensure permanent scenario twin URLs

Create or return a long-lived twin environment pinned to a scenario. Each (scenario, twin) pair gets a stable base_url, so two different scenarios using the same twin receive different permanent URLs.
env = client.scenarios.ensure_twin_environment(
    "scenario-id",
    twins=["stripe", "slack"],  # optional — defaults to the scenario's twins
    public=True,                # public base URLs are directly callable
)

if env.status != "ready":
    env = client.scenarios.get_twin_environment("scenario-id")

for name, twin in env.twins.items():
    print(f"{name}: {twin.base_url}")
    print(f"  Admin: {twin.admin_url}")
    print(f"  Env vars: {twin.env_vars}")
Reseed a ready environment from the scenario’s saved seed configuration:
env = client.scenarios.reseed_twin_environment("scenario-id")
print(env.status, env.last_seeded_at)
Tear it down when you no longer need the stable URLs:
client.scenarios.delete_twin_environment("scenario-id")
List all long-lived scenario twin environments:
envs = client.scenarios.list_twin_environments()
client.twins.provision(...) still creates short-lived twin sessions with a TTL. Use scenario twin environments when you need URLs that survive across runs and can be reset with reseed_twin_environment(...).