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

FieldTypeRequiredDescriptionConstraints
run_idstringyesThe executor run the advice was asked for.
  • pattern ^run_[0-9A-HJKMNP-TV-Z]{26}$
useintegeryesThis use's number on the run, from 1.
  • minimum 1
  • maximum 3
advice_run_idstringyesThe run of workflow ai.chat that made the advice call; its own receipt carries the price.
  • pattern ^run_[0-9A-HJKMNP-TV-Z]{26}$
modelstringyesThe advisor model that answered, provider/model.
  • minLength 1
effortai.effortyes
tokens_inintegeryes
  • minimum 0
tokens_outintegeryes
  • minimum 0
cost_usdnumberyesWhat this advice call cost, on the same price basis as the run's own cost.
  • minimum 0
wordsintegerHow many words of advice came back.
  • minimum 0
  • maximum 100
created_atstringyes
  • format date-time

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 }] }