/** * Agno Adapter (formerly Phidata) * * Integrates Agno agents and teams with the SwarmOrchestrator. * Agno is a lightweight framework for building multi-agent systems with * tool use, memory, knowledge bases, and structured outputs. * * Usage: * const adapter = new AgnoAdapter(); * adapter.registerAgent("researcher", myAgnoAgent); * adapter.registerTeam("dev-team", myAgnoTeam); * await registry.addAdapter(adapter); * * Then in the orchestrator: * delegateTask({ targetAgent: "agno:researcher", ... }) * * @module AgnoAdapter * @version 1.0.0 */ import { BaseAdapter } from './base-adapter'; import type { AdapterCapabilities, AgentPayload, AgentContext, AgentResult } from '../types/agent-adapter'; /** Matches Agno's Agent class */ export interface AgnoAgent { /** Agent name */ name?: string; /** Run the agent with a message */ run(message: string, options?: AgnoRunOptions): Promise; /** Print-friendly run (optional) */ printResponse?(message: string): Promise; /** Stream response (optional) */ runStream?(message: string): AsyncIterable; } /** Matches Agno's Team class */ export interface AgnoTeam { /** Team name */ name?: string; /** Run the team */ run(message: string, options?: AgnoRunOptions): Promise; /** Members of the team */ members?: Array<{ name: string; role?: string; }>; } /** Run options */ export interface AgnoRunOptions { /** Stream the response */ stream?: boolean; /** Additional context */ context?: Record; /** Structured output schema */ responseModel?: unknown; /** Max iterations for reasoning */ maxIterations?: number; } /** Agno response */ export interface AgnoResponse { /** The content of the response */ content?: string; /** Messages from the conversation */ messages?: Array<{ role: string; content: string; }>; /** Tool calls made */ toolCalls?: Array<{ name: string; args: Record; result?: unknown; }>; /** Structured output (if responseModel was used) */ structuredOutput?: unknown; /** Token usage */ usage?: { input_tokens?: number; output_tokens?: number; }; /** Which agent responded (in team mode) */ respondingAgent?: string; } /** Stream chunk */ export interface AgnoStreamChunk { content?: string; done?: boolean; } /** A simple function-based agent (for lightweight usage) */ export type AgnoFunction = (message: string, context?: Record) => Promise; export declare class AgnoAdapter extends BaseAdapter { readonly name = "agno"; readonly version = "1.0.0"; private entries; get capabilities(): AdapterCapabilities; registerAgent(agentId: string, agent: AgnoAgent, metadata?: { description?: string; capabilities?: string[]; }): void; registerTeam(agentId: string, team: AgnoTeam, metadata?: { description?: string; capabilities?: string[]; }): void; registerFunction(agentId: string, fn: AgnoFunction, metadata?: { description?: string; capabilities?: string[]; }): void; executeAgent(agentId: string, payload: AgentPayload, context: AgentContext): Promise; private buildMessage; private executeAgnoAgent; private executeAgnoTeam; private executeAgnoFunction; private normalizeResponse; } //# sourceMappingURL=agno-adapter.d.ts.map