WorkBuddy

Interact with WorkBuddy API - Field service management

Actions227

Agents → Write an agent run event

AI-generated

Summary

Ingests a lifecycle event for a WorkBuddy agent run, reporting statuses such as progress, completion, or errors. Uses the updated API endpoint under 'extension-runs' replacing the older 'agent-harness' path.

Inputs

  • runId (required) — The ID of the agent run to which the event belongs.
  • eventId (required) — A unique identifier for this event, used for idempotency.
  • eventType (required) — The type of lifecycle event being reported (e.g., message, progress, failed).
  • sequence — An optional monotonically increasing sequence number from the agent.
  • payload — An opaque JSON object containing any additional data supplied by the external agent.
  • requestOptions — Node-level settings including batching, SSL verification, proxy, and timeout.

Output shape

The raw HTTP response from the WorkBuddy API.

The response is typically a 2xx status code indicating success, or a 4xx/5xx status code indicating failure.

Examples

Example 1: Report a progress update

RunId: 'abc-123', EventId: 'evt-001', EventType: 'progress', Payload: { 'percentComplete': 50 }

Example 2: Signal a failure

RunId: 'abc-123', EventId: 'evt-002', EventType: 'failed', Payload: { 'error': 'Connection timeout' }

Links

Discussion