import { B as BaseAgent } from '../../agent-zMxIG3gI.mjs'; import { A as AgentType, a as EADKAgentConfig, d as AgentContext, E as EADKAgent, R as RunConfig, b as RunResult, c as RunEvent, G as GraphConfig, C as Checkpointer, H as Handoff, w as HandoffResult } from '../../types-Ks98Z0E_.mjs'; export { r as GraphEdge, s as GraphNode } from '../../types-Ks98Z0E_.mjs'; import 'zod'; /** * Sequential Agent * * Deterministic pipeline that runs sub-agents in order. * Google ADK SequentialAgent pattern. */ interface SequentialAgentConfig extends EADKAgentConfig { name: string; description?: string; instructions: string | ((ctx: AgentContext) => string | Promise); /** Ordered list of agents to run sequentially */ pipeline: EADKAgent[]; /** Whether to pass previous agent output as next agent input */ chainOutputs?: boolean; } declare class SequentialAgent extends BaseAgent { readonly type: AgentType; private readonly pipeline; private readonly chainOutputs; constructor(config: SequentialAgentConfig); run(input: string, runConfig?: RunConfig): Promise; stream(input: string, runConfig?: RunConfig): AsyncIterable; } /** * Parallel Agent * * Concurrent fan-out that runs sub-agents simultaneously. * Google ADK ParallelAgent pattern. */ interface ParallelAgentConfig extends EADKAgentConfig { name: string; description?: string; instructions: string | ((ctx: AgentContext) => string | Promise); /** Agents to run in parallel */ agents: EADKAgent[]; /** How to merge results */ mergeStrategy?: 'concatenate' | 'first' | 'best' | 'custom'; /** Custom merge function */ mergeFn?: (results: RunResult[]) => RunResult; } declare class ParallelAgent extends BaseAgent { readonly type: AgentType; private readonly agents; private readonly mergeStrategy; private readonly mergeFn?; constructor(config: ParallelAgentConfig); run(input: string, runConfig?: RunConfig): Promise; private mergeResults; stream(input: string, runConfig?: RunConfig): AsyncIterable; } /** * Loop Agent * * Iterative refinement with escalation. * Google ADK LoopAgent pattern. */ interface LoopAgentConfig extends EADKAgentConfig { name: string; description?: string; instructions: string | ((ctx: AgentContext) => string | Promise); /** Agent to run in each iteration */ agent: EADKAgent; /** Maximum number of iterations */ maxIterations?: number; /** experience to continue looping (return true to continue) */ shouldContinue: (result: RunResult, iteration: number) => boolean | Promise; /** Transform output between iterations */ transformOutput?: (output: string, iteration: number) => string | Promise; /** Escalation agent (called when maxIterations exceeded) */ escalationAgent?: EADKAgent; } declare class LoopAgent extends BaseAgent { readonly type: AgentType; private readonly agent; private readonly maxIterations; private readonly shouldContinue; private readonly transformOutput?; private readonly escalationAgent?; constructor(config: LoopAgentConfig); run(input: string, runConfig?: RunConfig): Promise; } /** * Graph Agent * * Cyclic directed graph with conditional edges, checkpointing, and time travel. * LangGraph-inspired orchestration engine. */ interface GraphAgentConfig extends EADKAgentConfig { name: string; description?: string; instructions: string | ((ctx: AgentContext) => string | Promise); /** Graph configuration */ graph: GraphConfig; } /** * In-memory checkpointer for graph state persistence. */ declare class InMemoryCheckpointer implements Checkpointer { private store; save(id: string, state: unknown): Promise; load(id: string): Promise; list(): Promise; delete(id: string): Promise; } /** * Special node names for graph control flow. */ declare const END = "__end__"; declare class GraphAgent extends BaseAgent { readonly type: AgentType; private readonly graph; constructor(config: GraphAgentConfig); run(input: string, runConfig?: RunConfig): Promise; /** * Resume graph execution from a checkpoint. */ resumeFrom(checkpointId: string, runConfig?: RunConfig): Promise; } /** * Handoff System * * Agent delegation via handoffs. * OpenAI Agents SDK pattern. */ /** * Create a handoff definition. */ declare function createHandoff(options: { target: EADKAgent; description?: string; contextFilter?: Handoff['contextFilter']; experience?: Handoff['experience']; }): Handoff; /** * Execute a handoff to a target agent. */ declare function executeHandoff(handoff: Handoff, input: string, ctx: AgentContext, runConfig?: RunConfig): Promise; export { Checkpointer, END, GraphAgent, type GraphAgentConfig, GraphConfig, InMemoryCheckpointer, LoopAgent, type LoopAgentConfig, ParallelAgent, type ParallelAgentConfig, SequentialAgent, type SequentialAgentConfig, createHandoff, executeHandoff };