UNPKG

@mastra/core

Version:

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

71 lines 2.33 kB
/** * Options for creating a durable agentic workflow */ export interface DurableAgenticWorkflowOptions { /** Maximum number of agentic loop iterations */ maxSteps?: number; } /** * Create a durable agentic workflow. * * This workflow implements the agentic loop pattern in a durable way: * * 1. LLM Execution Step - Calls the LLM and gets response/tool calls * 2. Tool Call Steps (foreach) - Executes each tool call in parallel * 3. LLM Mapping Step - Merges tool results back into state * 4. Loop - Continues if more tool calls are needed (dowhile) * * All state flows through workflow input/output, making it durable across * process restarts and execution engine replays. */ export declare function createDurableAgenticWorkflow(options?: DurableAgenticWorkflowOptions): import("../../../workflows").Workflow<import("../../../workflows").DefaultEngineType, import("../../../workflows").Step<string, unknown, unknown, unknown, unknown, unknown, any, unknown>[], "durable-agentic-loop", unknown, { __workflowKind: "durable-agent"; runId: string; agentId: string; messageListState: any; toolsMetadata: any[]; modelConfig: { provider: string; modelId: string; specificationVersion?: string | undefined; settings?: Record<string, any> | undefined; providerOptions?: Record<string, any> | undefined; }; options: any; state: any; messageId: string; agentName?: string | undefined; modelList?: { id: string; config: { provider: string; modelId: string; specificationVersion?: string | undefined; originalConfig?: string | Record<string, any> | undefined; providerOptions?: Record<string, any> | undefined; }; maxRetries: number; enabled: boolean; }[] | undefined; }, { messageListState: any; messageId: string; stepResult: any; output: { usage: any; steps: any[]; text?: string | undefined; }; state: any; }, { messageListState: any; messageId: string; stepResult: any; output: { usage: any; steps: any[]; text?: string | undefined; }; state: any; }, unknown>; //# sourceMappingURL=create-durable-agentic-workflow.d.ts.map