braiin
Version:
Behavioral Reasoning AI for Intelligent Navigation
28 lines (27 loc) • 1.14 kB
TypeScript
import { LLMMessage, LLMResponse, TaskResult, ToolTrace } from "../model/llm";
import { LLMService } from "../service/llm.service";
import { Agent } from "./agent";
export type LLMBackend = 'openai' | 'claude-code';
export interface OrchestratorConfig {
backend?: LLMBackend;
optionalPrompt?: string;
stepsInterval?: number;
maxSteps?: number;
timeoutMs?: number;
signal?: AbortSignal;
llmService?: LLMService;
apiKey?: string;
serverUrl?: string;
model?: string;
temperature?: number;
maxTokens?: number;
enablePromptCaching?: boolean;
enforceJsonOutput?: boolean;
sessionId?: string;
cliPath?: string;
}
export interface Orchestrator {
executeTask: (prompt: string, history?: LLMMessage[], toolTraces?: ToolTrace[], logCallback?: (log: string) => void, onToken?: (token: string) => void) => Promise<TaskResult>;
askLLM: (systemPrompt: string, prompt: string, history?: LLMMessage[], logCallback?: (log: string) => void) => Promise<LLMResponse | undefined>;
}
export declare const createOrchestrator: (agents: Agent[], config: OrchestratorConfig) => Orchestrator;