Agents
Agent runs reference
Every command, flag, field, status, exit code, error and HTTP route of Revyl's agent runs.
This page describes agent runs completely: the revyl agent commands that
start and follow them, the run object they print, how a run ends, what it can
check out and create, and the HTTP routes behind the commands. To start your
first run, see Run Revyl's agent. The MCP tools are listed in
MCP tools.
Terms
| Term | Meaning |
|---|---|
| Agent conversation | The transcript that holds a run and its follow-ups. Its ID is agent_conversation_id. |
| Agent run | One turn of a conversation: one prompt in, one final message out, in a fresh sandbox. Its ID is agent_run_id. A conversation has at most one active run at a time. |
| Root run, subagent, tree | A run that a person, CI, an automation or an outside agent starts is a root run. A run that another run starts from its sandbox is a subagent of that run, and its parent_agent_run_id names that run. A tree is a root run and every subagent under it. |
| Agent template | A named purpose that Revyl defines, with its own inputs and limits. A run with no template runs Revyl's base agent. |
| Resource | Anything a run creates, such as a test execution, a device session, an exploration or a build. |
| Active | Not finished yet. A run is finished exactly when its finished_at is set. |
What a run acts as and who sees it
- A run acts as its credential. A run you start with
revyl auth loginor an API key acts as you, and can do in Revyl what you can, except create API keys. A run an automation starts acts as the automation's run-as: a member, or the organization at Admin level (Run Revyl agent from an automation). A subagent never gets more than the run that started it. - A run can't turn a device session into a test with
revyl test create --from-session, because Revyl can't record that work under the run. It writes the test as Revyl test YAML and saves it withrevyl test create --from-file <file>, which Revyl records under the run. - Every member of your organization can see every run of Revyl's base agent,
which includes every run that
revyl agent run, the HTTP API and automations start. Anyone who can see a run can read it and stop it. Only whoever started the conversation, or a run in its tree, can add a follow-up turn. - Each turn starts in a fresh sandbox. Files and processes from earlier turns are gone; the conversation's transcript carries over.
- A root run ends 24 hours after it's created, and a run that reaches its
deadline fails with
deadline_exceeded.--max-durationcan only shorten the deadline. A run that reaches another limit Revyl sets on its tree fails withrun_limit_reached. - When a run ends on its own, Revyl stops the device sessions and computer sessions it started that are still up. The tests, workflows, explorations and builds it started run to their own end. When a root run ends, every subagent still active under it is stopped.
- When you stop a run, Revyl stops it, every subagent under it, and everything those runs started that is still active.
Commands
Every command takes the CLI's global --json. Progress goes to stderr; with
--json, stdout holds exactly one JSON value, errors included.
revyl agent run
Starts a turn of Revyl's agent and waits for it to end. Without
--conversation-id it starts a new conversation; with one it adds a follow-up
turn.
revyl agent run (--prompt <text> | --prompt-file <path>) [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--prompt | string | none | The turn's message, at most 256 KiB of UTF-8. |
--prompt-file | path | none | Reads the message from a file, or from stdin with -. Pass at most one of the two prompt flags. |
--conversation-id | UUID | none | Adds a follow-up turn to this conversation. A follow-up always takes a prompt. |
--template | string | none | Starts the new conversation on this template (Templates). |
--input | key=value | none | One template input. Repeat it for more. |
--inputs-file | path | none | Template inputs as one JSON object, from a file or stdin with -, at most 256 KiB. --input wins for a key both set. |
--repository-url | URL | none | Clones this connected repository into the sandbox before the agent starts (Repository checkout). Only when a conversation starts. |
--repository-branch | string | the default branch | Checks out this branch's newest commit, resolved once when Revyl accepts the run. Needs --repository-url. |
--repository-commit-sha | 40 lowercase hex characters | none | Checks out exactly this commit. Needs --repository-url; not with --repository-branch. |
--max-duration | duration, at least 1m | the root run's deadline | Ends the run after this long, for example 45m. It can only shorten the limit. |
--idempotency-key | string, 1 to 255 characters | one the CLI makes up | The same key with the same request returns the run Revyl already accepted instead of starting another. |
--no-wait | bool | false | Returns as soon as Revyl accepts the run. |
--wait-timeout | duration | until the run ends; 110m inside an agent sandbox | Stops waiting after this long and exits 124. The run keeps going. Not with --no-wait. |
What it prints:
| Mode | stdout | stderr |
|---|---|---|
| Waiting | The agent's final message | The run ID and conversation ID as soon as Revyl accepts the run, the run's URL, each status change, then how it ended |
Waiting, --json | The run object as it ended, or as it stands when the wait timed out | The same progress |
--no-wait | The new run's ID | The run ID, conversation ID and URL |
--no-wait --json | The run object as accepted | nothing |
- A retry with the same
--idempotency-keyand the same request returns the run already accepted, in whatever state it's in now. The key the CLI makes up is reused only for its own network retries, so running the command again starts a new run. When a start fails with no answer, the error prints the command to run again with the key it used. - Ctrl-C stops waiting, exits 130 and leaves the run going. Stop a run with
revyl agent stop <agent-run-id>. - After exit 124 or 130, pick the wait back up with
revyl agent wait <agent-run-id>. Runningrevyl agent runagain starts a second run. - Exit codes are in Exit codes.
revyl agent run --prompt "Which tests failed on last night's staging build, and why?"
revyl agent run --prompt-file prompt.md --json
git diff | revyl agent run --prompt-file - --no-wait
revyl agent run --repository-url https://github.com/acme/notes --repository-branch fix/note-title --prompt "Why does the note title test fail on this branch?"
revyl agent run --conversation-id <agent-conversation-id> --prompt "Now check it on iOS."revyl agent wait
Waits until every listed run has ended, or with --children until everything
the calling run started has ended. It holds nothing on the server, so running
it again re-attaches.
revyl agent wait (<agent-run-id>... | --children) [--wait-timeout <duration>]| Argument or flag | Type | Default | Description |
|---|---|---|---|
<agent-run-id>... | UUIDs | none | The runs to wait for. |
--children | bool | false | Waits for the calling run's subagents and for the test executions, workflow executions, explorations and builds it started directly. Works only inside an agent run, where REVYL_AGENT_RUN_ID is set. Device and computer sessions are left out, because they stay up while the run is going. |
--wait-timeout | duration | until everything ends; 110m inside an agent sandbox | Stops waiting after this long and exits 124. 0s checks once and returns. |
- Without
--json, stdout has one line per item:agent_runor the resource type, its ID and its status. - With
--json, stdout is{ "wait_timed_out": ..., "agent_runs": [...], "agent_resources": [...] }: every run waited for as a full run object, and the other things--childrenwaited for as resource rows.agent_resourcesis empty when you pass run IDs. - The exit code comes from the runs waited for, and the highest code among them wins (Exit codes). Resources never change it: a failed test is a result to read in its row.
- A read that fails with a network error, 429 or 5xx is retried for up to 5 minutes. After that the command exits 1 and prints the command that re-attaches. Nothing is stopped.
revyl agent wait <agent-run-id>
revyl agent wait <agent-run-id> <agent-run-id> --json
revyl agent wait <agent-run-id> --wait-timeout 0s
revyl agent wait --children --jsonrevyl agent get
revyl agent get <agent-run-id>Reads one run: its status, prompt, final message, output and limits. With
--json, stdout is the run object. It exits 0
whenever the read worked, whatever the run's outcome; to turn a run's outcome
into an exit code, use revyl agent wait <agent-run-id> --wait-timeout 0s.
revyl agent list
Lists the runs you can see, newest first.
| Flag | Type | Default | Description |
|---|---|---|---|
--conversation-id | UUID | none | Only the turns of this conversation. |
--root-agent-run-id | UUID | none | Every run in this run's tree, the root included. |
--parent-agent-run-id | UUID | none | Only the direct subagents of this run. |
--agent-run-status | status | none | Only runs in this status. Repeat for more. |
--template | string | none | Only runs of this template. |
--limit | int | 25 | Runs per page, 1 to 100. |
--cursor | string | none | The next_cursor of the page before. |
The table shows each run's ID, status, template, repository, creation time and
the first line of its prompt, and stderr prints the --cursor for the next
page when there is one. With --json, stdout is
{ "agent_runs": [...], "next_cursor": ... }.
revyl agent list
revyl agent list --conversation-id <agent-conversation-id> --json
revyl agent list --root-agent-run-id <agent-run-id>
revyl agent list --agent-run-status running --agent-run-status queuedrevyl agent stop
revyl agent stop <agent-run-id>Stops the run, every subagent under it, and everything those runs started that is
still active. It returns as soon as Revyl accepts the stop and prints the run,
now stopping. The run reports stopped once everything under it has
stopped, so revyl agent wait <agent-run-id> after a stop returns when the
whole subtree is down. Stopping a subagent leaves the rest of the tree running.
Stopping a run that already finished changes nothing and exits 0.
revyl agent resources
Lists the subagents and resources that a run and every subagent under it created, newest first.
revyl agent resources (<agent-run-id> | --conversation-id <agent-conversation-id>) [flags]| Argument or flag | Type | Default | Description |
|---|---|---|---|
<agent-run-id> | UUID | none | Resources of this run and every subagent under it. Pass a root run to see the whole tree. |
--conversation-id | UUID | none | Resources of every turn of this conversation and every subagent under them. Pass exactly one of a run ID and --conversation-id. |
--resource-type | resource type | none | Only this kind. Repeat for more. |
--only-active | bool | false | Only resources still queued, running or held open. |
--only-this-run | bool | false | Leaves out its subagents. |
--limit | int | 25 | Rows per page, 1 to 100. |
--cursor | string | none | The next_cursor of the page before. |
With --json, stdout is { "agent_resources": [...], "next_cursor": ... }.
It lists only what agent runs created, never every resource in your
organization.
revyl agent resources <agent-run-id>
revyl agent resources <agent-run-id> --resource-type test_execution --json
revyl agent resources "$REVYL_AGENT_RUN_ID" --only-this-run --only-active
revyl agent resources --conversation-id <agent-conversation-id>revyl agent evidence
Resolves the resource a revyl: reference names, so you can look at it before
you cite it.
revyl agent evidence <reference>| Argument | Type | Default | Description |
|---|---|---|---|
<reference> | evidence reference | none | revyl:report_action/<report-action-id> or revyl:observation/<observation-id>. |
It prints a download link that lasts an hour, the resource's content type and
size, and the report and device session it came from. With --json, stdout is
{ "evidence_kind", "evidence_id", "download_url", "content_type", "size_bytes", "report_id", "device_session_id" }.
A reference to something outside your organization, or with nothing stored,
fails with agent_evidence_not_found (Errors).
revyl agent evidence revyl:report_action/<report-action-id>
revyl agent evidence revyl:observation/<observation-id> --jsonrevyl agent templates
revyl agent templatesLists the templates your organization can start with
revyl agent run --template <agent-template-name>. With --json, stdout is
{ "agent_templates": [...] } (Templates).
Proof runs
revyl agent proof, status and cancel start and follow proof runs,
which are different runs from agent runs: status and cancel take a proof
run's ID, and get and stop an agent run's. Given the other kind's ID,
each command exits 1 and names the command to use instead. See
Proof of changes.
The agent run object
revyl agent get, run, stop, list and wait all print this
shape with --json, and the HTTP routes return it.
| Field | Type | Meaning |
|---|---|---|
agent_run_id | UUID | This run. |
agent_conversation_id | UUID | The conversation it's a turn of. Pass it to --conversation-id to follow up. |
parent_agent_run_id | UUID or null | The run that started this one. Null for a root run. |
root_agent_run_id | UUID | The root of this run's tree. Equal to agent_run_id for a root run. |
agent_conversation_owner_user_id | UUID or null | The person who started the conversation; for one an API key started, the key's user. |
agent_conversation_owner_automation_id | UUID or null | The automation that started the conversation. At most one of the two owner fields is set, and both are null for a subagent. |
agent_run_credential_principal_kind | user or organization_runtime_principal | Whom the run acts as: a user, or the organization. |
agent_run_credential_user_id | UUID or null | The user the run acts as. Null when it acts as the organization. |
agent_run_requested_by_user_id | UUID or null | The person who asked for this turn: the sender, the key's user, or whoever pressed an automation's Run now. Null for a subagent and for a turn a schedule, webhook or pull request started. |
agent_run_started_from | ui, cli, mcp, api, automation, agent_run or null | Where the turn was started from. agent_run is a subagent. It's a label, never a security or billing fact, and null for runs started before Revyl recorded it. |
agent_run_status | string | See Statuses. |
agent_template_name, agent_template_inputs | string or null, object or null | The conversation's template and inputs. Null for the base agent. |
repository_url, repository_branch, repository_commit_sha | string or null | What the sandbox checked out: the repository, the branch the run asked for, and the commit frozen when the run was accepted. All null when the run has no checkout. |
prompt | string | The turn's message, exactly as sent. |
final_message | string or null | The agent's last message of the turn. Null until the run ends. |
agent_run_output | object or null | The run's structured output (Output). |
agent_run_error_code, agent_run_error_message | string or null | Why a failed run failed (Run error codes). Null otherwise, a stopped run included. |
created_at, started_at, finished_at | ISO 8601 UTC or null | finished_at is set exactly when the run has finished. |
deadline_at | ISO 8601 UTC | When Revyl ends the run if it's still going. Never later than the root run's. |
agent_run_url | string or null | The run's page in Revyl. |
Statuses
agent_run_status | Finished | Meaning |
|---|---|---|
queued, running | no | Accepted and on its way. |
stopping | no | A stop was accepted, and the run and everything under it are being stopped. |
completed | yes | The agent ended its turn itself. When it ended the turn to ask for something, the question is in final_message. |
stopped | yes | Someone stopped it, or stopped a run above it. |
failed | yes | It couldn't finish. agent_run_error_code says why. |
A program that meets a status it doesn't know goes by finished_at.
Run error codes
agent_run_error_code | Meaning |
|---|---|
deadline_exceeded | The run reached its deadline. |
run_limit_reached | The run reached a limit Revyl sets on its tree. |
repository_checkout_failed | The repository checkout failed before the agent started. |
output_invalid | The run ended without the valid output its template requires. |
dispatch_or_deadline_exhausted | The run couldn't start before its deadline. |
runtime_failed, runtime_exited, runtime_heartbeat_stale | The agent's runtime hit an error, exited before the run finished, or stopped responding. |
launch_unconfirmed, supervisor_failed, callback_failed | The run's sandbox never confirmed it started, Revyl lost track of it, or it couldn't report back. |
model_failed, tool_failed, checkpoint_failed | The model failed to answer, a tool the agent relied on failed, or the conversation's state couldn't be saved. |
cancelled | The run was cancelled before it finished. |
agent_run_error_message holds the sentence the table paraphrases. Start
the turn again for a failure in the last three rows; for the others, change
what the code names first.
Exit codes
revyl agent run (when it waits) and revyl agent wait exit with how the
run ended:
| Code | Meaning |
|---|---|
| 0 | The run completed. |
| 1 | The command itself failed, for example bad usage, not signed in, a run you can't see, a busy conversation, or an API or network error. |
| 2 | The run was stopped. |
| 3 | The run failed. |
| 124 | --wait-timeout passed first. The run keeps going. |
| 130 | Interrupted. The run keeps going. |
Every other command, and revyl agent run --no-wait, exits 0 when it did
what you asked and 1 when it couldn't. No exit code depends on what the agent
found: read that from final_message or agent_run_output.
Output
Every run can attach one JSON object to itself as agent_run_output. The
agent submits it with its submit_output tool: any JSON object of at most
256 KiB, and the last one it submits wins. A run with no template submits one
only when you ask for structured data, so ask for it in the prompt and name
the keys you want:
revyl agent run --json \
--prompt "List the tests that failed in the last day. Submit them as output: {\"failed_tests\": [{\"name\": ..., \"reason\": ...}]}" \
| jq '.agent_run_output'agent_run_outputis null until the agent submits one, and it can stay null on acompletedrun. Astoppedorfailedrun has one only if the agent submitted it before the run ended, so check the status first.final_messagestays the agent's free text on every run, and Revyl never reads a result from it.
Repository checkout
A run that starts a conversation can name a repository, and Revyl clones it into the sandbox before the agent starts.
- The repository must be one your organization connected to Revyl: a GitHub
repository the Revyl GitHub App can see
(GitHub integration), or a GitLab project your
GitLab connection can see (GitLab integration).
Pass its URL, for example
https://github.com/acme/notes. - The run checks out one commit, frozen when Revyl accepts the run.
--repository-branchresolves to that branch's newest commit, and the run checks out that commit even if the branch moves on.--repository-commit-shachecks out exactly that commit. With neither, the repository's default branch. - A conversation checks out once. Every follow-up checks out the same commit, and
a follow-up that names a repository fails with
repository_checkout_fixed_for_conversation. Newer code needs a new conversation. - The agent never sees the repository token. Revyl hands a read-only token only to the
checkout command, which runs before the agent starts. A checkout that fails
fails the run with
repository_checkout_failed. - The run object shows what was checked out in
repository_url,repository_branchandrepository_commit_sha.
Templates
revyl agent templates lists the templates your organization can start
through the CLI and the API, each with its inputs
(agent_template_inputs_json_schema), output schema
(agent_template_output_json_schema) and max_duration_seconds. No
template is available today, so the command prints that a run without
--template uses Revyl's base agent, and
--json prints { "agent_templates": [] }. A run with no --template
runs the base agent.
Resources
A resource row is something a run created, or that Revyl made as part of something a run created.
| Field | Meaning |
|---|---|
resource_type, resource_id | Which resource. The ID is the one that kind's own commands take. |
agent_run_id | The run that created it. Null for a conversation's own turns. |
parent_resource_type, parent_resource_id | Set when Revyl made this resource as part of another, such as a test execution inside a workflow execution, or its device session and report. |
resource_name | The resource's name, where it has one. For a run, its prompt's opening words. |
resource_status | That kind's own status value. Null for kinds with no status. |
is_resource_active | True while the resource is queued, running or held open. |
resource_url | Its page in Revyl, where it has one. |
resource_created_at | When it was created. |
<resource-id> below is the row's resource_id.
resource_type | Read it with |
|---|---|
agent_run | revyl agent get <resource-id> |
test | revyl test inspect <resource-id> |
test_execution | revyl run summary <resource-id> |
workflow, workflow_execution | The workflow's page in Revyl, from resource_url |
device_session | The session's page in Revyl, from resource_url |
exploration_run | revyl explore status <resource-id> |
build_job | revyl build status <resource-id> |
build_version, app | revyl build list and revyl app list |
computer_session | The computer run's page in Revyl, from resource_url |
module | revyl module get <resource-id> |
script | revyl script get <resource-id> |
report | Its parent device session or test execution |
comment_thread, comment | The comment thread in Atlas |
proof_run | revyl agent status <resource-id> |
automation | revyl automation get <resource-id> |
Evidence references
A run cites an image or a canvas it made by a revyl: reference instead of a
file link, which expires.
| Reference | Names | Where a run gets it |
|---|---|---|
revyl:report_action/<report-action-id> | A report action's screenshot: the one taken just after the action, or before it when there is none after. A frame taken just after an action can still show the screen from before the action took effect. | screenshot_reference on each action with a screenshot in revyl run inspect --section actions, revyl device report --json and revyl test report --json, beside screenshot_reference_taken: after_action or before_action |
revyl:observation/<observation-id> | An Atlas capture. | The reference of each capture an Atlas read returns in a hosted run |
revyl:artifact/<artifact-id> | A canvas the run published. | The result of publishing it |
revyl agent evidence <reference> reads either image reference. A run writes
an image into its answer as  and links a canvas
as [its title](revyl:artifact/<artifact-id>). On the run's page, the answer
shows each image it cites inline, or the image's name when it can't be shown.
Errors
A refused request answers with an HTTP status and a stable code. With
--json, the CLI prints it on stdout as
{ "code", "error", "status_code", "detail", "errors", "next_step" } and
exits 1; without it, the CLI prints the error and its next step on stderr.
| HTTP | code | Cause | Fix |
|---|---|---|---|
| 404 | agent_run_not_found | No run with that ID is visible to you. | Check the ID and that your API key belongs to the run's organization; list runs with revyl agent list. Given a proof run's ID, the message names revyl agent status. |
| 404 | agent_conversation_not_found | No conversation with that ID is visible to you. | Pass the agent_conversation_id that revyl agent get <agent-run-id> prints. |
| 404 | agent_evidence_not_found | No image with that reference is visible to you: the action or capture is in another organization, or has no screenshot. | Check the reference against the screenshot_reference or reference a tool returned. |
| 404 | agent_template_not_found | No template with that name is available to your organization. | Pick one from revyl agent templates, or leave out --template. |
| 404 | repository_not_connected | The repository isn't one your organization connected to Revyl, or its connection can't see it. | Connect it (Repository checkout), then run the command again. |
| 404 | repository_branch_not_found | The repository has no branch with that name, or no default branch. | Check the branch name. |
| 404 | repository_commit_not_found | The repository has no such commit. | Check the commit SHA. |
| 403 | agent_conversation_write_forbidden | Only whoever started the conversation, or a run in its tree, can add a turn to it. | Start a new conversation: leave out --conversation-id. |
| 403 | agent_run_start_not_recordable | A run tried to start work Revyl can't record under it, such as compiling a device session into a test. | Follow detail.next_step. To save a test, write it as Revyl test YAML and run revyl test create --from-file <file>. |
| 409 | agent_conversation_busy | The conversation already has an active run. detail.active_agent_run_id names it. | Wait for it with revyl agent wait <agent-run-id> and send the turn again, or stop it with revyl agent stop <agent-run-id>. |
| 409 | idempotency_key_reused_with_different_input | The idempotency key was already used for a different request. | Pass a new key, or send exactly the request that first used it. |
| 409 | root_agent_run_not_active | A run tried to start a subagent after its root ended or began stopping. | Start a new root run. |
| 422 | agent_prompt_required | The run needs a prompt. | Pass --prompt or --prompt-file. |
| 422 | agent_prompt_too_large | The prompt is over 256 KiB. | Shorten it. |
| 422 | agent_template_input_invalid | The template inputs are invalid. errors lists each problem with its json_pointer. A run without a template takes no inputs. | Fix each input listed. |
| 422 | agent_template_inputs_too_large | The template inputs are over 256 KiB. | Send fewer inputs. |
| 422 | agent_template_fixed_for_conversation | A follow-up tried to set a template or its inputs. | Leave out --template, --input and --inputs-file on a follow-up. |
| 422 | agent_template_not_available_through_agent_runs_api | The template starts only from its own product in Revyl. | Leave out --template, or pick one from revyl agent templates. |
| 422 | repository_checkout_fixed_for_conversation | A follow-up tried to name a repository, branch or commit. | Leave out the repository flags on a follow-up, or start a new conversation. |
| 422 | invalid_agent_run_cursor, invalid_resource_cursor | The cursor isn't one this list returned. | Pass the page's next_cursor unchanged, or leave out --cursor. |
| 503 | repository_provider_unavailable | GitHub or GitLab didn't answer, so the run wasn't started. | Run the command again shortly. |
| 422 | none | The request failed validation, such as max_duration_seconds under 60. The body is { "message": "Validation error", "errors": [...] }. | Fix each field listed. |
The CLI adds two of its own. not_called_from_agent_run means
--children was used where REVYL_AGENT_RUN_ID isn't set: pass run IDs
instead. agent runs are not available to your organization on this Revyl server means the server answered as one without agent runs does, with a 404
that has no code or a 405. Check that the Backend and Organization lines
of revyl auth status name the Revyl server and organization you meant.
Environment variable
| Name | Set by | Purpose |
|---|---|---|
REVYL_AGENT_RUN_ID | Revyl, inside every agent sandbox | The ID of the run the sandbox belongs to, for revyl agent wait --children and reads such as revyl agent resources "$REVYL_AGENT_RUN_ID". |
HTTP API
The commands call these routes on https://backend.revyl.ai, authenticated
with an API key as Authorization: Bearer $REVYL_API_KEY
(Authentication). Field and query names are the JSON names
above.
| Route | Body or query | Returns |
|---|---|---|
POST /api/v1/agent-runs | prompt, agent_conversation_id, agent_template_name, agent_template_inputs, repository_url, repository_branch, repository_commit_sha, max_duration_seconds (at least 60), and an optional Idempotency-Key header of 1 to 255 characters | 201 and the run. 200 and the run already accepted when the key and request were seen before. |
GET /api/v1/agent-runs/{agent_run_id} | none | The run. |
GET /api/v1/agent-runs | agent_conversation_id, root_agent_run_id, parent_agent_run_id, agent_run_status (repeatable), agent_template_name, limit (1 to 100, default 25), cursor | { "agent_runs": [...], "next_cursor": ... } |
POST /api/v1/agent-runs/{agent_run_id}/stop | none | 202 and the run, now stopping. 200 and the run when it had already finished. |
GET /api/v1/agent-resources | exactly one of agent_run_id and agent_conversation_id, then resource_type (repeatable), is_resource_active, only_this_run, limit (1 to 100, default 25), cursor | { "agent_resources": [...], "next_cursor": ... } |
GET /api/v1/agent-evidence/{evidence_kind}/{evidence_id} | evidence_kind is report_action or observation | { "evidence_kind", "evidence_id", "download_url", "content_type", "size_bytes", "report_id", "device_session_id" }, where download_url lasts an hour. |
GET /api/v1/agent-templates | none | { "agent_templates": [...] } |
No route blocks until a run ends. To wait over HTTP, poll
GET /api/v1/agent-runs/{agent_run_id} until finished_at is set. An error
body is { "code", "error", "detail", "errors" } (Errors).
curl -X POST "https://backend.revyl.ai/api/v1/agent-runs" \
-H "Authorization: Bearer $REVYL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: <idempotency-key>" \
-d '{"prompt": "Which tests failed on last night'\''s staging build, and why?"}'