UNPKG

@openai/agents-realtime

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows. This package contains the logic for building realtime voice agents on the server or in the browser.

15 lines (14 loc) • 852 B
import { FunctionTool, Handoff, HostedMCPTool, Tool } from '@openai/agents-core'; import { RealtimeToolDefinition } from './clientMessages'; export declare const BACKGROUND_RESULT_SYMBOL: unique symbol; type BackgroundResult<T> = { [BACKGROUND_RESULT_SYMBOL]: true; content: T; }; export declare function backgroundResult<T>(content: T): BackgroundResult<T>; export declare function isBackgroundResult<T>(result: unknown): result is BackgroundResult<T>; export type RealtimeTool = FunctionTool<any> | HostedMCPTool<any>; export declare function isValidRealtimeTool(tool: Tool<any>): tool is RealtimeTool; export declare function validateRealtimeToolNames(tools: readonly FunctionTool<any>[], handoffs: readonly Handoff<any, any>[]): void; export declare function toRealtimeToolDefinition(tool: RealtimeTool): RealtimeToolDefinition; export {};