UNPKG

openai-swarmjs

Version:

Agentic framework inspired from OpenAI's swarm framework for TS, JS

13 lines (12 loc) 512 B
import { Agent, AgentFunction } from './types'; export declare abstract class BaseAgent { protected agent: Agent; protected goal: string; protected functions: AgentFunction[]; constructor(goal: string, functions: AgentFunction[], agent: Agent); abstract shouldTransferManually(): boolean; abstract nextAgent(): Promise<Agent | null>; getAgent(): Agent; static sanitizeFunctionName(name: string): string; static buildFunctionDescriptions(functions: AgentFunction[]): string; }