ArchAstro. V1. Agents. WorkItems
(archastro v0.2.0)
Copy Markdown
AgentWorkItem API resource.
Summary
Functions
Claim or resume workflow work for an agent
List active workflow work available to the viewer
Functions
@spec claim( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PostApiV1AgentsAgentWorkItemsClaim.Input.t() ) :: {:ok, ArchAstro.Types.WorkflowWorkItemClaim.t()} | {:error, ArchAstro.Error.reason()}
Claim or resume workflow work for an agent
Atomically claims the oldest queued or lease-expired item. To resume after a
harness restart, pass both the saved work_item and the same lease_owner;
the server refreshes that active lease without incrementing its attempt.
Returns data: null when no eligible item exists, including when another
lease owns the explicitly requested item.
Successful response
@spec list( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.GetApiV1AgentsAgentWorkItems.Params.t() ) :: {:ok, ArchAstro.Types.WorkflowWorkItemList.t()} | {:error, ArchAstro.Error.reason()}
List active workflow work available to the viewer
Lists queued, claimed, and running external work yielded by durable workflows. The top-level collection includes work for every agent the viewer can execute; the agent-nested collection limits results to that agent. This discovery response never includes lease tokens. Use the agent claim endpoint to acquire new work or resume a saved lease.
Successful response