---
title: "actor.task-event@2 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/actor.task-event"
updated: null
---

# actor.task-event@2 · OpenVibe.Services

HTML: [actor.task-event@2 · OpenVibe.Services](https://openvibe.services/docs/contracts/actor.task-event)

# ActorTaskEvent `actor.task-event@2`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 2.2.0
- Owner: actor
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-044](/docs/adr/ADR-044)
- Schema: [`https://openvibe.network/contracts/actor/task-event.v2.json`](/docs/contracts/actor.task-event.json)

actor.task-event@2: one event on a task's live stream (GET /api/v1/tasks/:id/events, text/event-stream; the SSE id is SEQ, so a reader resumes with Last-Event-ID). Every field of actor.task-event@1 keeps its meaning and shape: KIND is run.job-stream-event@1's three, as platform.task@1 progress names them: state (the task moved to STATE), output (one step of the agent's work: AGENT says what it is doing in TEXT, calls TOOL with a short INPUT summary, or a tool answered), end (the task ended in STATE; nothing follows). v2 adds ARTIFACTS to a tool\_result: the files and charts that tool made, stored on OpenVibe.Media, private to the task's requester, each with a stable Actor link the task page and a shared session can open. v2.1 adds the trigger step: a trigger card made, edited, paused, resumed, undone or deleted in the conversation carries the whole actor.trigger@1 in TRIGGER, so a reader renders the live card from the event itself. Events are best-effort; the task record (GET /api/v1/tasks/:id) and its result (which carries every artifact of the run) are the source of truth.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `task_id` | string | yes |  | - `pattern ^tsk_[0-9A-HJKMNP-TV-Z]{26}$` |
| `seq` | integer | yes |  | - `minimum 1` |
| `kind` | enum | yes |  | - `one of "state", "output", "end"` |
| `at` | string | yes |  | - `format date-time` |
| `state` | enum |  |  | - `one of "queued", "running", "verifying", "succeeded", "failed", "cancelled"` |
| `agent` | string |  |  | - `pattern ^[a-z][a-z0-9-]{1,63}$` |
| `step` | enum |  |  | - `one of "plan", "text", "tool_call", "tool_result", "check", "handoff", "trigger", "trigger-run"` |
| `trigger_id` | string |  | The trigger this run belongs to, on a step: "trigger-run". | - `pattern ^trg_[0-9A-HJKMNP-TV-Z]{26}$` |
| `run` | object |  | The routine run this event reports, on a step: "trigger-run". It is posted into the conversation that made the trigger, under its card: the run's answer and sources when it finished, and one line saying why when it did not. | - `no other fields` |
| `run.task_id` | string | yes |  | - `pattern ^tsk_[0-9A-HJKMNP-TV-Z]{26}$` |
| `run.state` | enum | yes |  | - `one of "ok", "failed", "needs_you"` |
| `run.at` | string | yes |  | - `format date-time` |
| `sources` | array of string |  | The addresses the run read, on a step: "trigger-run". | - `maxItems 8`<br>- `items: maxLength 4000` |
| `assignment_id` | string |  | The assignment node this step belongs to (actor.assignment@1): the work tree the Dock may draw later. Older events and work with no assignment have none. | - `pattern ^asg_[0-9A-HJKMNP-TV-Z]{26}$` |
| `trigger` | [actor.trigger](/docs/contracts/actor.trigger) |  | The trigger card this event is about (actor.trigger@1), on a step: "trigger". |  |
| `text` | string |  |  | - `maxLength 8000` |
| `tool` | string |  |  | - `maxLength 128` |
| `input` | string |  |  | - `maxLength 2000` |
| `is_error` | boolean |  |  |  |
| `computer` | `https://openvibe.network/contracts/platform/task.v1.json#/$defs/computer` |  |  |  |
| `artifacts` | array of object |  | The files and charts this tool made, in the order it made them. They belong to the task's requester on OpenVibe.Media; URL is Actor's stable link (GET /api/v1/tasks/:id/artifacts/:mediaId), which signs a fresh Media URL for the requester when it is opened, never an expiring signed URL. A public-chat task has no requester and makes none. | - `maxItems 20`<br>- `items: no other fields` |
| `artifacts[].kind` | enum | yes |  | - `one of "file", "chart"` |
| `artifacts[].name` | string | yes |  | - `pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$` |
| `artifacts[].mime` | string | yes |  | - `minLength 1`<br>- `maxLength 128` |
| `artifacts[].url` | string | yes |  | - `format uri` |
| `artifacts[].size` | integer | yes |  | - `minimum 0` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: end

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 9,
  "kind": "end",
  "at": "2026-10-08T19:00:09.000Z",
  "state": "succeeded"
}
~~~~

Valid: state

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 1,
  "kind": "state",
  "at": "2026-10-08T19:00:00.000Z",
  "state": "running",
  "agent": "openvibe-runtime"
}
~~~~

Valid: tool-call

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 2,
  "kind": "output",
  "at": "2026-10-08T19:00:01.000Z",
  "agent": "openvibe-runtime",
  "step": "tool_call",
  "tool": "tools.mx",
  "input": "openvibe.network"
}
~~~~

Valid: tool-result-with-artifacts

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 5,
  "kind": "output",
  "at": "2026-10-30T12:00:00.000Z",
  "agent": "openvibe-runtime",
  "step": "tool_result",
  "tool": "make_chart",
  "text": "Drew a bar chart and attached it as revenue.svg.",
  "artifacts": [
    {
      "kind": "chart",
      "name": "revenue.svg",
      "mime": "image/svg+xml",
      "url": "https://openvibe.actor/api/v1/tasks/tsk_01JAB2C3D4E5F6G7H8J9K0MNPS/artifacts/med_01JAB2C3D4E5F6G7H8J9K0MNP",
      "size": 1840
    },
    {
      "kind": "file",
      "name": "revenue.csv",
      "mime": "text/csv",
      "url": "https://openvibe.actor/api/v1/tasks/tsk_01JAB2C3D4E5F6G7H8J9K0MNPS/artifacts/med_01JAB2C3D4E5F6G7H8J9K0MNPR",
      "size": 34
    }
  ]
}
~~~~

Valid: trigger-run

~~~~
{
  "task_id": "tsk_01M6VNTQD7VN1GGME3XGPJ048Z",
  "seq": 12,
  "kind": "output",
  "at": "2026-11-09T10:30:20.000Z",
  "step": "trigger-run",
  "trigger_id": "trg_01M6VNTQD7NB3QH8K4R2S9T6VW",
  "run": {
    "task_id": "tsk_01M6VNTQD7VN1GGME3XGPJ048Z",
    "state": "ok",
    "at": "2026-11-09T10:30:20.000Z"
  },
  "text": "The Framework 13 is €134 on the maker's store, so it has not dropped under €120 yet.",
  "sources": [
    "https://frame.work/de/en/products/laptop13"
  ]
}
~~~~

Valid: trigger

~~~~
{
  "task_id": "tsk_01M6VNTQD7VN1GGME3XGPJ048Z",
  "seq": 7,
  "kind": "output",
  "at": "2026-11-09T08:00:01.000Z",
  "agent": "openvibe-runtime",
  "step": "trigger",
  "text": "Every weekday at 09:00 (Europe/Berlin): summarise my inbox",
  "trigger": {
    "id": "trg_01M6VNTQD7NB3QH8K4R2S9T6VW",
    "owner": "usr_01M6VNTQD7MRZDETZ39NB969XD",
    "agent_id": "agt_01M6VNTQD7WHPRX74687KCER4S",
    "agent_name": "Inbox",
    "task": "summarise my inbox",
    "kind": "schedule",
    "when": {
      "words": "Every weekday at 09:00 (Europe/Berlin)",
      "cron": "0 9 * * 1-5",
      "timezone": "Europe/Berlin",
      "event": null
    },
    "next_run_at": "2026-11-10T08:00:00.000Z",
    "last_run": {
      "task_id": "tsk_01M6VNTQD7VN1GGME3XGPJ048Z",
      "state": "ok",
      "at": "2026-11-09T08:00:12.000Z"
    },
    "state": "active",
    "paused_reason": null,
    "failures": 0,
    "watch": {
      "id": "wch_01M6VNTQD796C68VF8B182VAGS",
      "status": "active",
      "last_state": "condition_met",
      "consecutive_failures": 0,
      "next_due_at": "2026-11-10T08:00:00.000Z"
    },
    "undo_until": "2026-11-09T08:10:00.000Z",
    "created_at": "2026-11-09T08:00:00.000Z",
    "updated_at": "2026-11-09T08:00:00.000Z"
  }
}
~~~~

Valid: with-assignment

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 6,
  "kind": "output",
  "at": "2026-11-07T10:00:02.000Z",
  "agent": "openvibe-runtime",
  "step": "tool_call",
  "tool": "computer_run",
  "input": "npm test",
  "assignment_id": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS"
}
~~~~

Rejected: artifacts-on-text

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 5,
  "kind": "output",
  "at": "2026-10-30T12:00:00.000Z",
  "agent": "openvibe-runtime",
  "step": "text",
  "text": "Here is your chart.",
  "artifacts": [
    {
      "kind": "chart",
      "name": "revenue.svg",
      "mime": "image/svg+xml",
      "url": "https://openvibe.actor/api/v1/tasks/tsk_01JAB2C3D4E5F6G7H8J9K0MNPS/artifacts/med_01JAB2C3D4E5F6G7H8J9K0MNP",
      "size": 1840
    }
  ]
}
~~~~

Rejected: end-without-state

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 9,
  "kind": "end",
  "at": "2026-10-08T19:00:09.000Z"
}
~~~~

Rejected: output-without-step

~~~~
{
  "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "seq": 2,
  "kind": "output",
  "at": "2026-10-08T19:00:01.000Z"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('actor.task-event@2', value);   // { valid, errors: [{ path, message }] }
~~~~
