/** * CrewAI Adapter * * Allows CrewAI agents and crews to plug into the SwarmOrchestrator. * CrewAI uses a role-based agent model with tools, so this adapter * maps task payloads to CrewAI's Task/Agent execution model. * * Usage: * const adapter = new CrewAIAdapter(); * adapter.registerAgent("researcher", myCrewAIAgent); * adapter.registerCrew("analysis_crew", myCrew); * await registry.addAdapter(adapter); * * Then in the orchestrator: * delegateTask({ targetAgent: "crewai:researcher", ... }) * spawnParallel({ agentType: "crewai:analysis_crew", ... }) * * @module CrewAIAdapter * @version 1.0.0 */ import { BaseAdapter } from './base-adapter'; import type { AdapterCapabilities, AgentPayload, AgentContext, AgentResult } from '../types/agent-adapter'; /** * CrewAI-compatible agent interface */ export interface CrewAIAgent { role: string; goal: string; backstory?: string; /** Execute a task with this agent */ execute?: (task: string, context?: Record) => Promise; /** Tools available to this agent */ tools?: Array<{ name: string; description: string; }>; } /** * CrewAI-compatible crew interface */ export interface CrewAICrew { agents: CrewAIAgent[]; /** Kick off the crew with a set of inputs */ kickoff?: (inputs?: Record) => Promise; /** Run with a specific task description */ run?: (task: string) => Promise; } export declare class CrewAIAdapter extends BaseAdapter { readonly name = "crewai"; readonly version = "1.0.0"; private agents; private crews; get capabilities(): AdapterCapabilities; /** * Register a single CrewAI agent */ registerAgent(agentId: string, agent: CrewAIAgent, metadata?: { description?: string; capabilities?: string[]; }): void; /** * Register an entire CrewAI crew as a single callable unit */ registerCrew(crewId: string, crew: CrewAICrew, metadata?: { description?: string; }): void; executeAgent(agentId: string, payload: AgentPayload, context: AgentContext): Promise; private executeSingleAgent; private executeCrew; private buildTask; } //# sourceMappingURL=crewai-adapter.d.ts.map