---
title: "ai.run.succeeded@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/ai.run.succeeded"
updated: null
---

# ai.run.succeeded@1 · OpenVibe.Services

HTML: [ai.run.succeeded@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/ai.run.succeeded)

# AiRunSucceededPayload `ai.run.succeeded@1`

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: 1.0.0
- Owner: ai
- Visibility: first-party
- Status: planned
- Compatibility: backward
- Decision: [ADR-015](/docs/adr/ADR-015)
- Schema: [`https://openvibe.network/contracts/events/payloads/ai.run.succeeded.v1.json`](/docs/contracts/ai.run.succeeded.json)

ai.run.succeeded v1 (OpenVibe.AI server/runs.js execute). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run finished with output that matched the workflow output schema. The output itself is not in the event: a consumer that needs it reads GET /api/v1/runs/:id with ai.run.read (own runs only). A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run\_id> }, visibility internal, priority important, actor service:ai.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `run_id` | string | yes |  | - `pattern ^run_[0-9A-HJKMNP-TV-Z]{26}$` |
| `status` | const | yes |  | - `= "succeeded"` |
| `workflow` | object | yes |  | - `no other fields` |
| `workflow.key` | string | yes |  |  |
| `workflow.version` | integer | yes |  | - `minimum 1` |
| `requester` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `on_behalf_of` | one of | yes |  |  |
| `target` | one of | yes |  |  |
| `attribution` | one of | yes |  |  |
| `provider` | string \| null | yes | Provider that produced the output; null before a provider call and for cached runs. |  |
| `model` | string \| null | yes |  |  |
| `fallback_used` | boolean | yes |  |  |
| `synthetic` | boolean | yes | Stub provider output. |  |
| `cached_from` | null | yes |  |  |
| `usage` | object | yes |  | - `no other fields` |
| `usage.tokens_in` | integer | yes |  | - `minimum 0` |
| `usage.tokens_out` | integer | yes |  | - `minimum 0` |
| `usage.cost_usd` | number | yes |  | - `minimum 0` |
| `usage.attempts` | integer | yes |  | - `minimum 0` |
| `error` | null | yes |  |  |
| `citations_count` | integer | yes |  | - `minimum 0` |
| `retry_of` | string \| null | yes |  | - `pattern ^run_[0-9A-HJKMNP-TV-Z]{26}$` |
| `created_at` | string | yes |  | - `format date-time` |
| `finished_at` | string | yes |  | - `format date-time` |

## Examples

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

 Valid: news

~~~~
{
  "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "status": "succeeded",
  "workflow": {
    "key": "news.summarize_story",
    "version": 2
  },
  "requester": {
    "type": "service",
    "id": "news"
  },
  "on_behalf_of": null,
  "target": {
    "service": "news",
    "type": "story",
    "id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "attribution": null,
  "provider": "anthropic",
  "model": "claude-sonnet",
  "fallback_used": true,
  "synthetic": false,
  "cached_from": null,
  "usage": {
    "tokens_in": 1200,
    "tokens_out": 300,
    "cost_usd": 0.0081,
    "attempts": 2
  },
  "error": null,
  "citations_count": 1,
  "retry_of": null,
  "created_at": "2026-09-23T10:00:00.000Z",
  "finished_at": "2026-09-23T10:00:04.200Z"
}
~~~~

Rejected: carries-output

~~~~
{
  "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "status": "succeeded",
  "workflow": {
    "key": "news.summarize_story",
    "version": 2
  },
  "requester": {
    "type": "service",
    "id": "news"
  },
  "on_behalf_of": null,
  "target": {
    "service": "news",
    "type": "story",
    "id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "attribution": null,
  "provider": "anthropic",
  "model": "claude-sonnet",
  "fallback_used": true,
  "synthetic": false,
  "cached_from": null,
  "usage": {
    "tokens_in": 1200,
    "tokens_out": 300,
    "cost_usd": 0.0081,
    "attempts": 2
  },
  "error": null,
  "citations_count": 1,
  "retry_of": null,
  "created_at": "2026-09-23T10:00:00.000Z",
  "finished_at": "2026-09-23T10:00:04.200Z",
  "output": {
    "summary": "x"
  }
}
~~~~

Rejected: has-error

~~~~
{
  "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "status": "succeeded",
  "workflow": {
    "key": "news.summarize_story",
    "version": 2
  },
  "requester": {
    "type": "service",
    "id": "news"
  },
  "on_behalf_of": null,
  "target": {
    "service": "news",
    "type": "story",
    "id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "attribution": null,
  "provider": "anthropic",
  "model": "claude-sonnet",
  "fallback_used": true,
  "synthetic": false,
  "cached_from": null,
  "usage": {
    "tokens_in": 1200,
    "tokens_out": 300,
    "cost_usd": 0.0081,
    "attempts": 2
  },
  "error": {
    "code": "run.internal",
    "detail": "internal error"
  },
  "citations_count": 1,
  "retry_of": null,
  "created_at": "2026-09-23T10:00:00.000Z",
  "finished_at": "2026-09-23T10:00:04.200Z"
}
~~~~

## Validate

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