UNPKG

@xynehq/jaf

Version:

Juspay Agent Framework - A purely functional agent framework with immutable state and composable tools

20 lines 904 B
import { Agent, RunState, Tool } from './types.js'; type AgentAsToolOptions<Ctx, Out> = { readonly toolName?: string; readonly toolDescription?: string; readonly customOutputExtractor?: (output: Out, finalState: RunState<Ctx>) => string | Promise<string>; readonly maxTurns?: number; readonly registry?: ReadonlyMap<string, Agent<Ctx, any>>; readonly propagateEvents?: 'summary' | 'all' | 'none'; readonly memoryMode?: 'none' | 'inherit'; }; /** * Wrap an Agent as a Tool so it can be invoked by another agent. * The child agent runs in an isolated sub-run, receives only the input text, * and returns its final output as a string (or via custom extractor). */ export declare function agentAsTool<Ctx, Out = any>(childAgent: Agent<Ctx, Out>, options?: AgentAsToolOptions<Ctx, Out>): Tool<{ input: string; }, Ctx>; export {}; //# sourceMappingURL=agent-as-tool.d.ts.map