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.
const run = await client.runs.createUrlRun({
url: 'https://staging.myapp.com',
prompt: 'Test the checkout flow', // optional
twins: ['stripe', 'slack'], // optional
credentials: { email: 'test@example.com', password: 'pass' }, // optional
runnerMode: 'visual', // optional
sessionId: 'abc-123', // optional
});
// run.runId, run.status, run.sessionId
Create a PR run
Validate code changes from a branch or pull request.
const run = await client.runs.createPrRun({
repo: 'myorg/myrepo',
branch: 'feature/checkout', // optional
prUrl: 'https://github.com/org/repo/pull/42', // optional
twins: ['stripe'], // optional
contextNotes: 'Changed the payment flow', // optional
scenarioPrompt: 'Customer with active subscription', // optional
});
Agent run migration
The old client.runs.createAgentRun(...) helper targeted the removed /validate/agent-run endpoint.
Use client.runs.createUrlRun(...) for deployed URLs, client.runs.createPrRun(...) for normal PR validation, or call POST /validate/pr-run with run_type: "agent_run" when you need a sandbox-style branch run.
Get run details
const detail = await client.runs.get('run-id');
console.log(detail.status); // "completed", "running", "failed", etc.
console.log(detail.resultsJson); // step results array
console.log(detail.stepSummaries); // grouped summaries
console.log(detail.eventLogJson); // timeline events
Stream results
Stream live results via server-sent events:
for await (const event of client.runs.streamResults('run-id')) {
console.log(event);
}
Wait for completion
Block until the run reaches a terminal status (completed, failed, or cancelled):
const detail = await client.runs.wait('run-id', {
pollInterval: 2500, // ms between polls (default 2500)
timeout: 600000, // max ms to wait (default 600000)
});
Cancel a run
await client.runs.cancel('run-id');