AiRunReadResult ai.run-read-result@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- ai
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/ai/run-read-result.v1.json
ai.run-read-result@1: answers of ai.run.read on OpenVibe.AI (the caller's own runs; usage readers may ask for all). GET /api/v1/runs?status=&workflow=&target=&limit=&before= → { runs }; GET /api/v1/runs/:id → { run, citations, requests } (the request log is metadata only: hashes, tokens, cost, latency, never prompts); GET /api/v1/runs/:id/citations → { citations }. Someone else's run is 404 run.not_found.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: list
{
"runs": [
{
"id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"status": "succeeded",
"workflow": {
"key": "news.summarize_story",
"version": 2
},
"template": {
"key": "news.summarize_story",
"version": 3
},
"route": {
"key": "default.text",
"version": 1
},
"requester": {
"type": "service",
"id": "news"
},
"on_behalf_of": null,
"attribution": null,
"source_service": "news",
"target": {
"service": "news",
"type": "story",
"id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"input": {
"topic": "Transit strike",
"sources": [
{
"source_type": "news.item",
"source_id": "itm_42"
}
]
},
"output": {
"headline": "Transit strike begins",
"summary": "Workers walked out.",
"citations": [
0
],
"gaps": []
},
"error": null,
"synthetic": false,
"provenance": {
"origin": "ai",
"workflow": "news.summarize_story",
"workflow_version": 2,
"template_version": 3,
"route": "default.text",
"route_version": 1,
"provider": "anthropic",
"model": "claude-sonnet",
"fallback_used": true,
"run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"cached_from": null,
"synthetic": false
},
"usage": {
"tokens_in": 1200,
"tokens_out": 300,
"cost_usd": 0.0081,
"attempts": 2
},
"citations_count": 1,
"retry_of": null,
"idempotency_key": null,
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"created_at": "2026-09-23T10:00:00.000Z",
"started_at": "2026-09-23T10:00:00.050Z",
"finished_at": "2026-09-23T10:00:04.200Z"
}
]
}Valid: one
{
"run": {
"id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"status": "succeeded",
"workflow": {
"key": "news.summarize_story",
"version": 2
},
"template": {
"key": "news.summarize_story",
"version": 3
},
"route": {
"key": "default.text",
"version": 1
},
"requester": {
"type": "service",
"id": "news"
},
"on_behalf_of": null,
"attribution": null,
"source_service": "news",
"target": {
"service": "news",
"type": "story",
"id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"input": {
"topic": "Transit strike",
"sources": [
{
"source_type": "news.item",
"source_id": "itm_42"
}
]
},
"output": {
"headline": "Transit strike begins",
"summary": "Workers walked out.",
"citations": [
0
],
"gaps": []
},
"error": null,
"synthetic": false,
"provenance": {
"origin": "ai",
"workflow": "news.summarize_story",
"workflow_version": 2,
"template_version": 3,
"route": "default.text",
"route_version": 1,
"provider": "anthropic",
"model": "claude-sonnet",
"fallback_used": true,
"run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"cached_from": null,
"synthetic": false
},
"usage": {
"tokens_in": 1200,
"tokens_out": 300,
"cost_usd": 0.0081,
"attempts": 2
},
"citations_count": 1,
"retry_of": null,
"idempotency_key": null,
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"created_at": "2026-09-23T10:00:00.000Z",
"started_at": "2026-09-23T10:00:00.050Z",
"finished_at": "2026-09-23T10:00:04.200Z"
},
"citations": [
{
"id": 55,
"run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPS",
"ordinal": 0,
"source_type": "sources.item",
"source_id": "itm_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"url": "https://news.example.com/a",
"title": "A story",
"author": null,
"published_at": "2026-09-25",
"retrieved_at": "2026-09-25T18:00:00Z",
"snippet": null,
"content_hash": null,
"trust": {},
"provenance": {},
"attached_by": "workflow",
"created_at": "2026-09-25T18:00:02.000Z"
}
],
"requests": [
{
"id": 7,
"seq": 1,
"operation": "chat",
"provider_key": "anthropic",
"model_key": "claude-sonnet-4-5",
"status": "succeeded",
"fallback": 0,
"tokens_in": 812,
"tokens_out": 140,
"cost_usd": 0.0045,
"latency_ms": 2310
}
]
}Rejected: partial-run
{
"runs": [
{
"id": "run_1"
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('ai.run-read-result@1', value); // { valid, errors: [{ path, message }] }