UNPKG

@just-every/ensemble

Version:

LLM provider abstraction layer with unified streaming interface

48 lines 2.4 kB
import { ToolCall, ResponseInput, ResponseThinkingMessage, ResponseOutputMessage, ModelSettings, ToolFunction, ResponseJSONSchema, ModelClassID, AgentDefinition, AgentExportDefinition, WorkerFunction, ToolParameterMap, ProviderStreamEvent, type ToolCallResult } from '../types/types.js'; export declare const agentToolCache: Map<string, ToolFunction[]>; export declare function exportAgent(agent: any, model?: string): AgentExportDefinition; export declare function getAgentSpecificTools(agent_id: string): ToolFunction[]; export declare function cloneAgent(agent: Agent): AgentDefinition; export declare class Agent implements AgentDefinition { agent_id?: string; name?: string; description?: string; instructions?: string; parent_id?: string; workers?: WorkerFunction[]; tools?: ToolFunction[]; model?: string; modelClass?: ModelClassID; modelSettings?: ModelSettings; intelligence?: 'low' | 'standard' | 'high'; maxToolCalls?: number; maxToolCallRoundsPerTurn?: number; verifier?: AgentDefinition; maxVerificationAttempts?: number; args?: any; jsonSchema?: ResponseJSONSchema; historyThread?: ResponseInput | undefined; cwd?: string; modelScores?: Record<string, number>; disabledModels?: string[]; onToolCall?: (toolCall: ToolCall) => Promise<void>; processToolCall?: (toolCalls: ToolCall[]) => Promise<Record<string, any>>; onToolResult?: (toolCallResult: ToolCallResult) => Promise<void>; onToolError?: (toolCallResult: ToolCallResult) => Promise<void>; onRequest?: (agent: AgentDefinition, messages: ResponseInput) => Promise<[any, ResponseInput]>; onResponse?: (message: ResponseOutputMessage) => Promise<void>; onThinking?: (message: ResponseThinkingMessage) => Promise<void>; onToolEvent?: (event: ProviderStreamEvent) => void | Promise<void>; params?: ToolParameterMap; processParams?: (agent: AgentDefinition, params: Record<string, any>) => Promise<{ prompt: string; intelligence?: 'low' | 'standard' | 'high'; }>; constructor(definition: AgentDefinition); asTool(): ToolFunction; getTools(): Promise<ToolFunction[]>; private processDynamicToolParameters; export(): AgentExportDefinition; } export declare function getToolsFromAgent(agent: AgentDefinition | Agent): Promise<ToolFunction[]>; //# sourceMappingURL=agent.d.ts.map