/** * LangChain / LangGraph Adapter * * Allows LangChain agents, chains, and LangGraph workflows to plug into * the SwarmOrchestrator. Agents are registered as callable functions * or LangChain Runnable objects. * * Usage: * const adapter = new LangChainAdapter(); * adapter.registerAgent("research", myLangChainAgent); * adapter.registerAgent("summarizer", myChain); * await registry.addAdapter(adapter); * * Then in the orchestrator: * delegateTask({ targetAgent: "lc:research", ... }) * * @module LangChainAdapter * @version 1.0.0 */ import { BaseAdapter } from './base-adapter'; import type { AdapterCapabilities, AgentPayload, AgentContext, AgentResult } from '../types/agent-adapter'; /** * A LangChain-compatible callable. * This matches LangChain's Runnable interface: anything with .invoke() * Also supports plain async functions for flexibility. */ export type LangChainRunnable = { invoke: (input: unknown, config?: unknown) => Promise; getName?: () => string; } | ((input: unknown) => Promise); export declare class LangChainAdapter extends BaseAdapter { readonly name = "langchain"; readonly version = "1.0.0"; private runnables; get capabilities(): AdapterCapabilities; /** * Register a LangChain agent, chain, or LangGraph graph. * * @param agentId - Unique identifier for this agent * @param runnable - A LangChain Runnable (agent, chain, graph) or async function * @param metadata - Optional metadata (description, capabilities) */ registerAgent(agentId: string, runnable: LangChainRunnable, metadata?: { description?: string; capabilities?: string[]; }): void; executeAgent(agentId: string, payload: AgentPayload, context: AgentContext): Promise; private buildInput; private normalizeResult; } //# sourceMappingURL=langchain-adapter.d.ts.map