UNPKG

taskforce-aiagent

Version:

TaskForce is a modular, open-source, production-ready TypeScript agent framework for orchestrating AI agents, LLM-powered autonomous agents, task pipelines, dynamic toolchains, RAG workflows and memory/retrieval systems.

23 lines (22 loc) 1.48 kB
import { ChatMessage } from "../llm/aiClient.js"; import { Agent } from "./agent.js"; import { Task } from "../tasks/task.js"; export declare function buildUserMessage(inputs: Record<string, string>, agent: Agent, taskDescription: string, inputFromPrevious?: string, retryReason?: string, delegateReason?: string, outputFormat?: string, rePlanReason?: string): string; export declare function buildSystemMessage(inputs: Record<string, string>, agent: Agent, isTraining?: boolean): string; export declare function toolWorker(output: string, agent: Agent, taskDescription: string, outputFormat: string, context: Record<string, any>): Promise<ChatMessage[] | undefined>; export declare function recursiveToolWorker(output: string, agent: Agent, taskDescription: string, outputFormat: string, context: Record<string, any>, depth?: number, maxDepth?: number): Promise<ChatMessage[] | undefined>; export declare function delegateTo(agent: Agent, output: string, inputs: Record<string, string>, currentDepth?: number, maxDepth?: number): Promise<{ delegateTo: string; task: string; } | null>; export declare function truncateMessagesToFitModelLimit(modelName: string, messages: ChatMessage[]): Promise<ChatMessage[]>; export declare function generateDynamicPlan({ inputs, agents, model, verbose, }: { inputs: Record<string, any>; agents: any[]; model?: string; verbose?: boolean; }): Promise<{ tasks: Task[]; agents: any[]; executionMode: string; }>;