Retrieve a build
Returns the build with its messages. Only its flow's owner (or an admin) can read it.
BearerAuthAuthorizationBearer <JWT>Admin token, API token issued via /api-tokens, or an OIDC JWT access token issued by the configured OIDC provider.
build*stringBuild identifier (UUID).
uuidThe build.
application/json- response
A build of a flow: a conversation with the build agent, which writes the flow's code in a project of the build's own.
name*stringUnique resource name.
flow*stringThe flow built.
state*stringRUNNING while the agent works on a prompt or an answer; AWAITING_INPUT when it asked question; IDLE once it ended otherwise, ready for the next prompt.
"RUNNING""AWAITING_INPUT""IDLE"question?The agent's question (Flash's ask_user_question): up to four questions, answered together.
deploy?stringThe deploy of the code the build's last clean prompt wrote: the agent's job indexes that code as a bundle PATCH /flows/{flow} would be, and the deploy has already succeeded once the build leaves RUNNING, so the flow has the code from then on. Code that can't be indexed is not deployed: the build's error says why. Absent before one, and once the deploy is no longer kept. A stale build deploys nothing more.
stale*booleanWhether the flow was deployed from elsewhere (an upload, another build) since the build started from its code, or since the build's own code last went live. A stale build edits outdated code, so it takes no more prompts or answers (409) and deploys nothing more; start a new build. A deploy that makes a build stale stops the prompt it is running.
error?Why the build's last prompt failed.
messages?array<>The conversation, as AI SDK UI messages (UIMessage): the user's prompts (a text part) and answers (a data-answer part), and the agent's message of each prompt or answer, made of the chunk events of GET /builds/{build}/events. Only GET /builds/{build} returns them.
createTime*stringTime at which the build was started.
date-timeupdateTime*stringTime at which the build last changed.
date-timecurl -X GET 'https://example.com/api/hub/builds/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "name": "builds/0190f5a2-7c3e-7b1a-9d4e-2f6a8b0c1d3e", "flow": "flows/550e8400-e29b-41d4-a716-446655440000", "state": "RUNNING", "question": { "toolCallId": "string", "questions": [ { "question": "string", "header": "string", "options": [ { "label": "string", "description": "string" } ], "multiSelect": true } ] }, "deploy": "deploys/0190f5a2-7c3e-7b1a-9d4e-2f6a8b0c1d3e", "stale": true, "error": { "reason": "INPUT", "message": "string" }, "messages": [ {} ], "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z"}