AgentsEvent agents.event@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
network
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-044
Schema
https://openvibe.network/contracts/agents/event.v1.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

FieldTypeRequiredDescriptionConstraints
typeenumyes
  • one of "run", "step", "delta", "approval", "end"
runagents.run
stepagents.step
approvalagents.approval
run_idstring
  • minLength 1
  • maxLength 160
seqinteger
  • minimum 1
textstring
  • maxLength 65536
statusenum
  • 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 }] }