---
title: "openvibe-sdk/agents/router · OpenVibe.Services"
canonical: "https://openvibe.services/docs/sdk/agents-router"
updated: null
---

# openvibe-sdk/agents/router · OpenVibe.Services

HTML: [openvibe-sdk/agents/router · OpenVibe.Services](https://openvibe.services/docs/sdk/agents-router)

# `openvibe-sdk/agents/router`

Generated at 2026-11-14 06:36:17 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.168.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.168.0).

From `types/agents-router.d.ts` (both). Declarations are shown verbatim.

## interface Outcome

~~~~
export interface Outcome { p: number; strong?: boolean; ok?: boolean; usd?: number; }
~~~~

## export export function question(step: { text?: string; task?: strin

~~~~
export function question(step: { text?: string; task?: string }): object;
~~~~

## export export function probability(answer: unknown): number | null;

~~~~
export function probability(answer: unknown): number | null;
~~~~

## export export function route<T>(o: { p: number | null; threshold?:

~~~~
export function route<T>(o: { p: number | null; threshold?: number; small: T; strong: T }): { choice: T; strong: boolean; why: string };
~~~~

## export export function calibrate(history: Outcome\[\], options?: { st

~~~~
export function calibrate(history: Outcome[], options?: { strongShare?: number }): { threshold: number; samples: number };
~~~~

## export export function outcomes(history: Outcome\[\], shares?: number

~~~~
export function outcomes(history: Outcome[], shares?: number[]): Array<{ share: number; threshold: number; steps: number; quality: number | null; usd_per_step: number | null }>;
~~~~

## export export function chain<T>(step: { text?: string; task?: strin

~~~~
export function chain<T>(step: { text?: string; task?: string }, options?: { pick?: T | null; pin?: T | null; ask?: ((body: object) => Promise<unknown>) | null; threshold?: number; small: T; strong: T }): Promise<{ choice: T; strong: boolean | null; why: string }>;
~~~~
