Skip to Content
The Ngamia platform API is in preview. Endpoints may change before general availability.
ConceptsRuns and end users

Runs and end users

A run is one request to an agent: the input, every model reply and tool call, and the result. Runs are stored durably and can be read and streamed later.

Statuses

StatusMeaning
runningAccepted and in progress (when started with wait: false).
completedFinished; output holds the answer.
failedEnded with an error; error says why (for example a limit was reached).
cancelledStopped by a cancel request.
waiting_approvalPaused before a tool that needs approval (not used for platform agents in this release).

Conversations

Each run is one turn. To continue a conversation, start a new run with previous_run_id set to the last run’s ID. The runtime carries the earlier user messages and final answers into the new run.

End users

Every run belongs to exactly one subject:

CallerRuns as
A personthemselves
An API key with userthat end user of yours (user is 1–128 characters of A-Z a-z 0-9 . _ : @ -)
An API key without userthe key itself

Reading, streaming, resuming and cancelling a run must use the same subject, so one customer can never read another customer’s runs. People cannot pass user. Always pass a stable user from your server, such as your own customer ID.

Waiting or streaming

  • wait: true (default): the call returns when the run ends.
  • wait: false: the call returns running at once. Read GET /v1/runs/{run_id}/events (Server-Sent Events) or poll GET /v1/runs/{run_id}.

Retries

Send an Idempotency-Key header with each new message. A retried request with the same key does not start a second run.