AiAdvice ai.advice@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- ai
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/ai/advice.v1.json
One advisor use on a run (ai.advisor@1): the advice run it made, the model consulted, its effort, the tokens and the cost. The advice text itself is answered to the caller and not kept on the receipt.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
run_id | string | yes | The executor run the advice was asked for. |
|
use | integer | yes | This use's number on the run, from 1. |
|
advice_run_id | string | yes | The run of workflow ai.chat that made the advice call; its own receipt carries the price. |
|
model | string | yes | The advisor model that answered, provider/model. |
|
effort | ai.effort | yes | ||
tokens_in | integer | yes |
| |
tokens_out | integer | yes |
| |
cost_usd | number | yes | What this advice call cost, on the same price basis as the run's own cost. |
|
words | integer | How many words of advice came back. |
| |
created_at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"run_id": "run_01JQ8Z3K4M5N6P7Q8R9S0T1V2W",
"use": 1,
"advice_run_id": "run_01JQ8Z3K4M5N6P7Q8R9S0T1V2X",
"model": "deepseek/deepseek-v4-pro",
"effort": "high",
"tokens_in": 1200,
"tokens_out": 80,
"cost_usd": 0.00216,
"words": 61,
"created_at": "2026-11-10T09:30:00Z"
}Rejected: missing-cost
{
"run_id": "run_01JQ8Z3K4M5N6P7Q8R9S0T1V2W",
"use": 1,
"advice_run_id": "run_01JQ8Z3K4M5N6P7Q8R9S0T1V2X",
"model": "deepseek/deepseek-v4-pro",
"effort": "high",
"tokens_in": 1200,
"tokens_out": 80,
"created_at": "2026-11-10T09:30:00Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('ai.advice@1', value); // { valid, errors: [{ path, message }] }