UNPKG

automagik-cli

Version:

Automagik CLI - A powerful command-line interface for interacting with Automagik Hive multi-agent AI systems

64 lines (63 loc) 2.17 kB
import { GaxiosOptions } from 'gaxios'; export interface LocalAPIResponse<T = any> { data: T; error?: string; session_id?: string; } export interface StreamingResponse { content: string; done: boolean; session_id?: string; metadata?: Record<string, any>; } export interface AgentRequest { agent_id: string; message: string; session_id?: string; user_id?: string; user_name?: string; phone_number?: string; cpf?: string; } export interface TeamRequest { team_id: string; message: string; session_id?: string; user_id?: string; user_name?: string; phone_number?: string; cpf?: string; } export interface WorkflowRequest { workflow_id: string; params: Record<string, any>; session_id?: string; user_id?: string; user_name?: string; phone_number?: string; cpf?: string; } export declare class LocalAPIClient { private baseUrl; private timeout; private retryAttempts; constructor(); private getDefaultHeaders; setBaseUrl(url: string): void; setApiKey(apiKey: string): void; private makeRequest; getSchema(): Promise<LocalAPIResponse<any>>; listAgents(): Promise<LocalAPIResponse<any[]>>; listTeams(): Promise<LocalAPIResponse<any[]>>; listWorkflows(): Promise<LocalAPIResponse<any[]>>; invokeAgent(request: AgentRequest): Promise<LocalAPIResponse<any>>; invokeTeam(request: TeamRequest): Promise<LocalAPIResponse<any>>; executeWorkflow(request: WorkflowRequest): Promise<LocalAPIResponse<any>>; streamAgent(request: AgentRequest, onMessage: (data: StreamingResponse) => void, onError: (error: Error) => void, onComplete: () => void, abortSignal?: AbortSignal): Promise<void>; streamTeam(request: TeamRequest, onMessage: (data: StreamingResponse) => void, onError: (error: Error) => void, onComplete: () => void, abortSignal?: AbortSignal): Promise<void>; healthCheck(): Promise<LocalAPIResponse<{ status: string; }>>; apiCall<T = any>(endpoint: string, options?: Partial<GaxiosOptions>): Promise<LocalAPIResponse<T>>; } export declare const localAPIClient: LocalAPIClient;