Agents

An agent carries out a set of instructions in Aiqaramba. It uses a browser or mobile device to complete the task and records what happened. The API lets you follow the run and inspect its result.

Overview

An agent represents one prompt execution and owns its full lifecycle. Its API record contains the configuration used for the run and the data produced during execution. This data includes the trace, executor result, auditor summary, findings, and artifacts.

Create an agent directly when the configuration applies to one run. Running a test spawns an agent from a saved configuration. The spawned agent links back to that test, while its state and results belong to the agent.

Lifecycle

The status field reports the current state:

  • pending: The run waits for an executor.
  • running: The executor performs the prompt.
  • waiting: The executor waits for human input or browser handoff.
  • auditing: The executor finished, and the auditor reviews the evidence.
  • completed: The run and audit finished. This state can include application findings.
  • failed: A platform error prevented the run or audit from finishing.
  • stopped: A user or the platform stopped the run.

Lifecycle status and test outcome serve different purposes. The result.success field gives the final pass or fail value.

Audit and summary

The executor stores result when it finishes the prompt, then moves the agent from running to auditing. The result contains the executor's reported success, short summary, and optional report.

During auditing, a separate, heavier model checks the execution trace and supporting evidence. The summary object stores the auditor's output, including the outcome, reason, test steps, decision factors, findings, and report. The auditor can also correct result.success.

Capabilities

Browser agents can use these main capabilities:

  • Browser interaction. Agents can navigate, read pages, take screenshots, inspect accessibility data, and use common page controls.
  • Low-level input. Agents can use pointer actions, keyboard actions, drag actions, key combinations, and scroll gestures.
  • HTTP requests. Agents can send HTTP requests without using the browser.
  • File workspace. Each agent has an isolated workspace. It can manage files and upload them through page controls.
  • JavaScript diagnostics. Agents can run read-only JavaScript to inspect browser state. They cannot use it to perform page actions.
  • Console and network inspection. Agents can inspect browser console messages and network events.
  • Human handoff. Agents can pause and give browser control to a user. They resume after the user returns control.
GET /api/v1/agents

List agents

Returns tenant-owned runs in descending ID order.

Parameters

ParameterTypeInRequiredDescription
limitintegerqueryNoMaximum agents to return.
cursoruuidqueryNoContinue agent pagination below this run ID.
project_iduuidqueryNoRestrict runs to one owning project.
sourcestringqueryNoFilter by run source.
failure_sourcestringqueryNoFilter by classified failure source.

Example Request

curl
curl "http://app.aiqaramba.com/api/v1/agents" \
  -H "Authorization: Bearer $AIQA_API_KEY"

Status Codes

CodeDescription
200Tenant agents.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
500The server could not complete the request.

Response Fields (200)

FieldTypeDescription
agentsobject[]
agents[].iduuid
agents[].tenant_iduuid
agents[].project_iduuid
agents[].role_iduuid
agents[].statusstringValues: pending, running, waiting, auditing, completed, failed, stopped.
agents[].namestring
agents[].promptstring
agents[].modelstring
agents[].thinking_levelstring
agents[].auditor_thinking_levelstring
agents[].auditor_modelstring
agents[].browser_typestring
agents[].devicestring
agents[].kindstring
agents[].is_discoveryboolean
agents[].is_benchmarkboolean
agents[].messagesobject[]
agents[].iterationinteger
agents[].max_iterationsinteger
agents[].tokens_usedinteger
agents[].cached_tokensinteger
agents[].auditor_tokens_usedinteger
agents[].auditor_cached_tokensinteger
agents[].browser_urluri
agents[].tunnel_urluri
agents[].session_idstring
agents[].wait_conditionobject
agents[].resultobject
agents[].summaryobject
agents[].test_iduuid
agents[].discovery_iduuid
agents[].variablesobject
agents[].sourcestring
agents[].parent_agent_iduuid
agents[].test_plan_node_run_iduuid
agents[].schedule_iduuid
agents[].app_artifact_iduuid
agents[].issue_urluri
agents[].finding_iduuid
agents[].gh_ownerstring
agents[].gh_repostring
agents[].gh_base_branchstring
agents[].gh_base_shastring
agents[].error_classificationstring
agents[].error_explanationstring
agents[].failure_sourcestring
agents[].completion_nudgesobject
agents[].created_by_automatedboolean
agents[].created_atdate-time
agents[].updated_atdate-time
agents[].started_atdate-time
agents[].completed_atdate-time
agents[].interaction_urluri
agents[].warningsstring[]
next_cursoruuid
POST /api/v1/agents

Create an agent

Creates and queues an agent from inline instructions.

Request Body (application/json)

FieldTypeRequiredDescription
project_iduuidYesID of the project this agent belongs to
role_iduuidNoOptional role for prompt injection context
namestringNoHuman-readable agent name
entry_urlstringNoAbsolute http(s) URL the agent starts at. Required for a browser run; must be omitted or empty for an android run.
instructionsstringYesPlain-language brief of the task the agent performs.
validationsstring[]NoOptional list of things the agent must verify and explicitly resolve (passed or failed) before it may complete. A run with a failed validation cannot complete successfully. Omit for tasks with nothing to check off.
modelstringNoLLM model to use
thinking_levelstringNoOverride the executor model's reasoning depth for this run: MINIMAL, LOW, MEDIUM, or HIGH. Higher = more reasoning tokens (more thorough, more expensive). Omit to use the model's configured default.
auditor_thinking_levelstringNoSame as thinking_level but for the auditor that reviews this run after it finishes (MINIMAL, LOW, MEDIUM, HIGH). Lets you give the review more or less reasoning independently of the run itself.
auditor_modelstringNoLLM model for the auditor that reviews this run after it finishes. Lets you pick the review model independently of the run itself.
devicestringNoExecution device: browser or android
browser_typestringNoBrowser to use for a browser agent: chrome, firefox, or edge
app_artifact_iduuidNoMobile app ID to install for an Android run
max_iterationsintegerNoMaximum number of model iterations before the agent stops
file_pathsstring[]NoPaths of tenant files to copy into the agent workspace
mailbox_namesstring[]NoMailbox names to attach to this agent. The agent can read each attached inbox.
tunnelstringNoHostname of a live tunnel owned by this tenant. The agent starts at the entry URL rewritten onto this host, and is instructed to substitute this host for any other URL the instructions mention.

Example Request

curl
curl -X POST "http://app.aiqaramba.com/api/v1/agents" \
  -H "Authorization: Bearer $AIQA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "project_id": "<uuid>",
    "instructions": "<string>"
  }'

Status Codes

CodeDescription
201Agent created and queued.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
402The tenant has exhausted its run allowance.
404The requested resource does not exist.
500The server could not complete the request.
503The requested feature is not configured on this server.

Response Fields (201)

FieldTypeDescription
iduuid
tenant_iduuid
project_iduuid
role_iduuid
statusstringValues: pending, running, waiting, auditing, completed, failed, stopped.
namestring
promptstring
modelstring
thinking_levelstring
auditor_thinking_levelstring
auditor_modelstring
browser_typestring
devicestring
kindstring
is_discoveryboolean
is_benchmarkboolean
messagesobject[]
iterationinteger
max_iterationsinteger
tokens_usedinteger
cached_tokensinteger
auditor_tokens_usedinteger
auditor_cached_tokensinteger
browser_urluri
tunnel_urluri
session_idstring
wait_conditionobject
resultobject
summaryobject
test_iduuid
discovery_iduuid
variablesobject
sourcestring
parent_agent_iduuid
test_plan_node_run_iduuid
schedule_iduuid
app_artifact_iduuid
issue_urluri
finding_iduuid
gh_ownerstring
gh_repostring
gh_base_branchstring
gh_base_shastring
error_classificationstring
error_explanationstring
failure_sourcestring
completion_nudgesobject
created_by_automatedboolean
created_atdate-time
updated_atdate-time
started_atdate-time
completed_atdate-time
interaction_urluri
warningsstring[]
GET /api/v1/agents/{id}

Get an agent

Parameters

ParameterTypeInRequiredDescription
iduuidpathYesAgent ID.

Example Request

curl
curl "http://app.aiqaramba.com/api/v1/agents/<id>" \
  -H "Authorization: Bearer $AIQA_API_KEY"

Status Codes

CodeDescription
200Agent found.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
404The requested resource does not exist.
500The server could not complete the request.

Response Fields (200)

FieldTypeDescription
iduuid
tenant_iduuid
project_iduuid
role_iduuid
statusstringValues: pending, running, waiting, auditing, completed, failed, stopped.
namestring
promptstring
modelstring
thinking_levelstring
auditor_thinking_levelstring
auditor_modelstring
browser_typestring
devicestring
kindstring
is_discoveryboolean
is_benchmarkboolean
messagesobject[]
iterationinteger
max_iterationsinteger
tokens_usedinteger
cached_tokensinteger
auditor_tokens_usedinteger
auditor_cached_tokensinteger
browser_urluri
tunnel_urluri
session_idstring
wait_conditionobject
resultobject
summaryobject
test_iduuid
discovery_iduuid
variablesobject
sourcestring
parent_agent_iduuid
test_plan_node_run_iduuid
schedule_iduuid
app_artifact_iduuid
issue_urluri
finding_iduuid
gh_ownerstring
gh_repostring
gh_base_branchstring
gh_base_shastring
error_classificationstring
error_explanationstring
failure_sourcestring
completion_nudgesobject
created_by_automatedboolean
created_atdate-time
updated_atdate-time
started_atdate-time
completed_atdate-time
interaction_urluri
warningsstring[]
DELETE /api/v1/agents/{id}

Delete an agent

Parameters

ParameterTypeInRequiredDescription
iduuidpathYesAgent ID.

Example Request

curl
curl -X DELETE "http://app.aiqaramba.com/api/v1/agents/<id>" \
  -H "Authorization: Bearer $AIQA_API_KEY"

Status Codes

CodeDescription
204Agent deleted.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
404The requested resource does not exist.
500The server could not complete the request.
POST /api/v1/agents/{id}/clarification

Respond to an agent clarification

Appends a function response and resumes an agent waiting for human clarification.

Parameters

ParameterTypeInRequiredDescription
iduuidpathYesAgent ID.

Request Body (application/json)

FieldTypeRequiredDescription
responsestringYesThe user's response to the clarification request

Example Request

curl
curl -X POST "http://app.aiqaramba.com/api/v1/agents/<id>/clarification" \
  -H "Authorization: Bearer $AIQA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "response": "<string>"
  }'

Status Codes

CodeDescription
200Clarification accepted and agent queued to resume.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
402The tenant has exhausted its run allowance.
404The requested resource does not exist.
500The server could not complete the request.

Response Fields (200)

FieldTypeDescription
iduuid
tenant_iduuid
project_iduuid
role_iduuid
statusstringValues: pending, running, waiting, auditing, completed, failed, stopped.
namestring
promptstring
modelstring
thinking_levelstring
auditor_thinking_levelstring
auditor_modelstring
browser_typestring
devicestring
kindstring
is_discoveryboolean
is_benchmarkboolean
messagesobject[]
iterationinteger
max_iterationsinteger
tokens_usedinteger
cached_tokensinteger
auditor_tokens_usedinteger
auditor_cached_tokensinteger
browser_urluri
tunnel_urluri
session_idstring
wait_conditionobject
resultobject
summaryobject
test_iduuid
discovery_iduuid
variablesobject
sourcestring
parent_agent_iduuid
test_plan_node_run_iduuid
schedule_iduuid
app_artifact_iduuid
issue_urluri
finding_iduuid
gh_ownerstring
gh_repostring
gh_base_branchstring
gh_base_shastring
error_classificationstring
error_explanationstring
failure_sourcestring
completion_nudgesobject
created_by_automatedboolean
created_atdate-time
updated_atdate-time
started_atdate-time
completed_atdate-time
interaction_urluri
warningsstring[]
POST /api/v1/agents/{id}/files

Upload files to an agent workspace

Delivers files to a pending, running, or waiting agent workspace.

Parameters

ParameterTypeInRequiredDescription
iduuidpathYesAgent ID.

Request Body (multipart/form-data)

FieldTypeRequiredDescription
pathstringNoDirectory prefix inside the workspace to place files under
filesfile[]YesOne or more files (multipart form field name: 'files'). Max 50MB per request.

Example Request

curl
curl -X POST "http://app.aiqaramba.com/api/v1/agents/<id>/files" \
  -H "Authorization: Bearer $AIQA_API_KEY" \
  -F 'files=@./files'

Status Codes

CodeDescription
200Files delivered.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
404The requested resource does not exist.
413The request body or uploaded artifact is too large.
500The server could not complete the request.
507The tenant does not have enough storage quota.

Response Fields (200)

FieldTypeDescription
uploadedobject[]
uploaded[].pathstring
uploaded[].sizeinteger
POST /api/v1/agents/{id}/retry

Retry an agent

Clones a terminal or recoverable run and queues the clone while preserving the original.

Parameters

ParameterTypeInRequiredDescription
iduuidpathYesAgent ID.

Request Body (application/json)

FieldTypeRequiredDescription
modelstringNoOverride LLM model
max_iterationsintegerNoOverride max iterations
browser_typestringNoOverride browser (chrome, firefox, edge)

Example Request

curl
curl -X POST "http://app.aiqaramba.com/api/v1/agents/<id>/retry" \
  -H "Authorization: Bearer $AIQA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "<string>",
    "max_iterations": 1,
    "browser_type": "<string>"
  }'

Status Codes

CodeDescription
201Cloned agent created and queued.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
402The tenant has exhausted its run allowance.
404The requested resource does not exist.
500The server could not complete the request.

Response Fields (201)

FieldTypeDescription
iduuid
tenant_iduuid
project_iduuid
role_iduuid
statusstringValues: pending, running, waiting, auditing, completed, failed, stopped.
namestring
promptstring
modelstring
thinking_levelstring
auditor_thinking_levelstring
auditor_modelstring
browser_typestring
devicestring
kindstring
is_discoveryboolean
is_benchmarkboolean
messagesobject[]
iterationinteger
max_iterationsinteger
tokens_usedinteger
cached_tokensinteger
auditor_tokens_usedinteger
auditor_cached_tokensinteger
browser_urluri
tunnel_urluri
session_idstring
wait_conditionobject
resultobject
summaryobject
test_iduuid
discovery_iduuid
variablesobject
sourcestring
parent_agent_iduuid
test_plan_node_run_iduuid
schedule_iduuid
app_artifact_iduuid
issue_urluri
finding_iduuid
gh_ownerstring
gh_repostring
gh_base_branchstring
gh_base_shastring
error_classificationstring
error_explanationstring
failure_sourcestring
completion_nudgesobject
created_by_automatedboolean
created_atdate-time
updated_atdate-time
started_atdate-time
completed_atdate-time
interaction_urluri
warningsstring[]
POST /api/v1/agents/{id}/stop

Stop an agent

Cancels active jobs and atomically finalizes a pending, running, or waiting agent as stopped.

Parameters

ParameterTypeInRequiredDescription
iduuidpathYesAgent ID.

Example Request

curl
curl -X POST "http://app.aiqaramba.com/api/v1/agents/<id>/stop" \
  -H "Authorization: Bearer $AIQA_API_KEY"

Status Codes

CodeDescription
200Agent stopped.
400The request is malformed or failed validation.
401Authentication is missing or invalid.
404The requested resource does not exist.
500The server could not complete the request.

Response Fields (200)

FieldTypeDescription
iduuid
tenant_iduuid
project_iduuid
role_iduuid
statusstringValues: pending, running, waiting, auditing, completed, failed, stopped.
namestring
promptstring
modelstring
thinking_levelstring
auditor_thinking_levelstring
auditor_modelstring
browser_typestring
devicestring
kindstring
is_discoveryboolean
is_benchmarkboolean
messagesobject[]
iterationinteger
max_iterationsinteger
tokens_usedinteger
cached_tokensinteger
auditor_tokens_usedinteger
auditor_cached_tokensinteger
browser_urluri
tunnel_urluri
session_idstring
wait_conditionobject
resultobject
summaryobject
test_iduuid
discovery_iduuid
variablesobject
sourcestring
parent_agent_iduuid
test_plan_node_run_iduuid
schedule_iduuid
app_artifact_iduuid
issue_urluri
finding_iduuid
gh_ownerstring
gh_repostring
gh_base_branchstring
gh_base_shastring
error_classificationstring
error_explanationstring
failure_sourcestring
completion_nudgesobject
created_by_automatedboolean
created_atdate-time
updated_atdate-time
started_atdate-time
completed_atdate-time
interaction_urluri
warningsstring[]