---
title: "agents.event@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/agents.event"
updated: null
---

# agents.event@1 · OpenVibe.Services

HTML: [agents.event@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/agents.event)

# AgentsEvent `agents.event@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

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

agents.event@1 (agent-engine.md, 2026-11-12): one event of a run's stream, GET /api/v1/runs/{id}/events (and /api/frame/runs/{ref}/events), as server-sent events whose event name is TYPE and whose id is the newest step's seq, so Last-Event-ID resumes after it. run: the run changed; RUN is its new snapshot. step: a step was appended; STEP is it, whole. delta: more TEXT for the step SEQ that is still being written (its STATUS is running); a reader appends it. approval: an approval was asked or answered; APPROVAL is it. end: the run reached an end status; the stream closes after it. A reader ignores a type it does not know.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `type` | enum | yes |  | - `one of "run", "step", "delta", "approval", "end"` |
| `run` | [agents.run](/docs/contracts/agents.run) |  |  |  |
| `step` | [agents.step](/docs/contracts/agents.step) |  |  |  |
| `approval` | [agents.approval](/docs/contracts/agents.approval) |  |  |  |
| `run_id` | string |  |  | - `minLength 1`<br>- `maxLength 160` |
| `seq` | integer |  |  | - `minimum 1` |
| `text` | string |  |  | - `maxLength 65536` |
| `status` | enum |  |  | - `one of "done", "failed", "stopped"` |

## Examples

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

 Valid: a-step

~~~~
{
  "type": "step",
  "step": {
    "run_id": "tsk_01K9R2V6M8Q4T0B7C3D5E9F2GH",
    "seq": 4,
    "kind": "tool",
    "text": "Ran the test suite",
    "tool_call": {
      "name": "terminal",
      "input": {
        "command": "npm test",
        "cwd": "/home/person/app"
      }
    },
    "result": "124 checks passed",
    "cost": {
      "usd": 0.002,
      "tokens": 310,
      "seconds": 18
    },
    "started_at": "2026-11-12T10:00:10Z",
    "ended_at": "2026-11-12T10:00:28Z",
    "child_run": null
  }
}
~~~~

Valid: more-text

~~~~
{
  "type": "delta",
  "run_id": "c_8f3k2m",
  "seq": 4,
  "text": " the Keychron K2 is the best value"
}
~~~~

Valid: the-end

~~~~
{
  "type": "end",
  "run_id": "tsk_01K9R2V6M8Q4T0B7C3D5E9F2GH",
  "status": "done"
}
~~~~

Valid: the-run-changed

~~~~
{
  "type": "run",
  "run": {
    "id": "c_8f3k2m",
    "ref": "chat:c_8f3k2m",
    "kind": "chat",
    "title": "Keyboard Scout",
    "owner": {
      "type": "user",
      "id": "usr_01K9R2V6M8Q4T0B7C3D5E9F2GH"
    },
    "agent": {
      "id": "vibe",
      "name": "Keyboard Scout",
      "product": "chat",
      "glyph": "search",
      "hue": 212,
      "harness": "openvibe"
    },
    "status": "waiting",
    "waiting": {
      "for": "message",
      "since": "2026-11-12T10:02:00Z"
    },
    "preview": {
      "text": "Three picks under $90, with sources.",
      "from": "agent",
      "at": "2026-11-12T10:02:00Z"
    },
    "model": {
      "id": "openvibe/auto",
      "source": "openvibe",
      "name": "Auto"
    },
    "where": {
      "kind": "openvibe"
    },
    "context": {
      "site": "deals",
      "url": "https://openvibe.deals/",
      "title": "Deals"
    },
    "url": "https://openvibe.chat/vibe/c_8f3k2m",
    "counts": {
      "steps": 6,
      "unread": 1
    },
    "visibility": "private",
    "created_at": "2026-11-12T10:00:00Z",
    "updated_at": "2026-11-12T10:02:00Z"
  }
}
~~~~

Rejected: an-end-without-its-status

~~~~
{
  "type": "end",
  "run_id": "c_8f3k2m"
}
~~~~

Rejected: more-text-for-no-step

~~~~
{
  "type": "delta",
  "run_id": "c_8f3k2m",
  "text": "…"
}
~~~~

## Validate

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