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

# ai.advice@1 · OpenVibe.Services

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

# AiAdvice `ai.advice@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: ai
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/ai/advice.v1.json`](/docs/contracts/ai.advice.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. | - `pattern ^run_[0-9A-HJKMNP-TV-Z]{26}$` |
| `use` | integer | yes | This use's number on the run, from 1. | - `minimum 1`<br>- `maximum 3` |
| `advice_run_id` | string | yes | The run of workflow ai.chat that made the advice call; its own receipt carries the price. | - `pattern ^run_[0-9A-HJKMNP-TV-Z]{26}$` |
| `model` | string | yes | The advisor model that answered, provider/model. | - `minLength 1` |
| `effort` | [ai.effort](/docs/contracts/ai.effort) | yes |  |  |
| `tokens_in` | integer | yes |  | - `minimum 0` |
| `tokens_out` | integer | yes |  | - `minimum 0` |
| `cost_usd` | number | yes | What this advice call cost, on the same price basis as the run's own cost. | - `minimum 0` |
| `words` | integer |  | How many words of advice came back. | - `minimum 0`<br>- `maximum 100` |
| `created_at` | string | yes |  | - `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 }] }
~~~~
