Skip to main content
POST
/
agent-workers
/
workers
/
{worker_id}
/
claim
Claim the next runnable agent run
curl --request POST \
  --url https://api.veryfront.com/agent-workers/workers/{worker_id}/claim \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "lease_duration_seconds": 152
}
'
{
  "run": {
    "run_id": "<string>",
    "conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agent_id": "<string>",
    "status": "pending",
    "request_snapshot": {
      "messages": [
        {
          "id": "<string>",
          "role": "<string>",
          "parts": [],
          "metadata": {},
          "createdAt": "<string>"
        }
      ],
      "tools": [],
      "context": [],
      "forwardedProps": {},
      "traceContext": {
        "traceId": "<string>",
        "spanId": "<string>",
        "traceFlags": 127
      }
    },
    "latest_event_id": 1,
    "latest_external_event_sequence": 1,
    "lease_owner": "<string>",
    "lease_expires_at": "<string>",
    "worker_session": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "run_id": "<string>",
      "implementation_kind": "<string>",
      "worker_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "session_key": "<string>",
      "status": "active",
      "created_at": "<string>",
      "updated_at": "<string>",
      "ended_at": "<string>",
      "metadata": null
    },
    "source_target_kind": "project",
    "source_target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "source_target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "source_target_release_version": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

worker_id
string<uuid>
required

Body

application/json
lease_duration_seconds
integer
Required range: 5 <= x <= 300

Response

200 - application/json

Claim result

run
object
required