Skip to content
中文

Heartbeat Work Item

POST/anthropic/v1/environments/{environment_id}/work/{work_id}/heartbeat○ Unsupported

Request parameters

  • environment_idstringrequired

    path: Environment ID (path or query parameter).

  • work_idstringrequired

    path: Path parameter: the work item ID.

  • environment_idstringrequired

    query: Environment ID (path or query parameter).

  • desired_ttl_secondsnumberoptional

    query: Desired lease lifetime in seconds.

  • expected_last_heartbeatstringoptional

    query: Expected last heartbeat, guarding against concurrent updates.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Request

curl
curl -X POST https://api.deepraxis.com/anthropic/v1/environments/environment_123/work/work_123/heartbeat \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: managed-agents-2026-04-01"
Python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.deepraxis.com/anthropic",
    api_key="$PRAXIS_API_KEY",
)

# 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
result = client.beta.environments.work.heartbeat("work_123", {"environment_id": "environment_123"})
print(result)
TypeScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.deepraxis.com/anthropic",
  apiKey: "$PRAXIS_API_KEY",
});

// 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
const result = await client.beta.environments.work.heartbeat("work_123", { environment_id: "environment_123" });
console.log(result);

Response 501

{
  "type": "error",
  "error": {
    "type": "not_implemented_error",
    "message": "Not implemented: this Managed Agents operation is not implemented on this platform yet (POST /v1/environments/{environment_id}/work/{work_id}/heartbeat); see the docs for the supported subset."
  },
  "request_id": "b4e1ed6b-a88e-4b24-8b8a-c5e0b7dc045d"
}

Response

HTTP 200

Successful response

application/json

Name Type Description
last_heartbeat string RFC 3339 timestamp of the actual heartbeat from DB
lease_extended boolean Whether the heartbeat succeeded in extending the lease
state string Current state of the work item (active/stopping/stopped)
ttl_seconds number Effective TTL applied to the lease
type string The type of response