ai

js/ai.ts

fino:ai — first-stop exports for Fino AI applications.

This module gathers the stable, application-facing AI APIs into one import surface. Use it when building agents, tools, sessions, memory-backed conversations, local or remote model calls, and evals. Specialized modules such as fino:ai/model, fino:ai/mcp, and fino:ai/context remain available when an application needs narrower imports or advanced types.

Design

The facade does not add behavior. It re-exports the same symbols from the underlying modules so users can start with one import and later split imports by subsystem without changing runtime semantics. Each symbol is documented in its home module; this page maps which subsystems the facade covers.

What's included

import { agent, openai, streamText, tool } from 'fino:ai';
import { v } from 'fino:validate';

const lookup = tool({
  name: 'lookup',
  description: 'Look up a record by id.',
  parameters: v.object({ id: v.string() }),
  execute: async ({ id }: { id: string }) => `record:${id}`,
});

const bot = agent({
  model: openai({ model: 'gpt-4o' }),
  tools: [lookup],
});

for await (const text of streamText(bot.stream('lookup A-1'))) {
  console.log(text);
}

No exported declarations found.