UNPKG

daggerai

Version:

A simple and powerful Typescript based agent framework to help businesses thrive in the AI Agent revolution.

51 lines 1.98 kB
import { LLM } from '../llm/base'; import { Agent } from './agent'; import { Node } from './node'; import { AgentAction } from './parser'; import { Squad } from './squad'; import { Tool, ToolResponse } from './tool'; export declare class Task extends Node { type: string; agent: Agent; name: string; description: string; expectedOutput: string; tools: Tool[]; memories: string[]; inputs: TaskInput[]; llm: LLM; maxAttempts: number; constructor(params: TaskParams); execute(squad: Squad): Promise<string>; shouldContinue(iterations: number): boolean; getToolsPrompt(): string; buildIntermediateStepsPrompt(intermediateSteps: [AgentAction | null, ToolResponse | undefined][]): string; getUserInputsPrompt(): string; getNoToolsPrompt(): "To give my best complete final answer to the task use the exact following format:\n\nThought: I now can give a great answer\nFinal Answer: my best complete final answer to the task.\nYour final answer must be the great and the most complete as possible, it must be outcome described.\n\nI MUST use these formats, my job depends on it!\n\n"; getExpectedOutputPrompt(): string; getTaskKickoffPrompt(): "\n\nBegin! This is VERY important to you, use the tools available and give your best Final Answer, your job depends on it!\n"; getCurrentTaskPrompt(squad: Squad): string; getAdditionalInstructions(squad: Squad): string; /** * Builds the initial prompt for the LLM. * It uses different prompts if there are tools involved in the task. */ buildInitialPrompt(squad: Squad): string; nodeOutput(): string; } export interface TaskParams { id?: string; name: string; description: string; expectedOutput: string; agent: Agent; llm: LLM; tools?: Tool[]; inputs?: TaskInput[]; memories?: string[]; } export interface TaskInput { label: string; value: string; } //# sourceMappingURL=task.d.ts.map