import BaseSDK from '../base-sdk'; import { QelosSDKOptions } from '../types'; import ChatSDK from './chat'; import { IAgent, IAgentChatOptions, IChatCompletionResponse, ICreateAgentRequest, ISSEStreamProcessor, IUpdateAgentRequest } from '.'; export default class AgentsSDK extends BaseSDK { private chatSdk; private relativePath; constructor(options: QelosSDKOptions, chatSdk: ChatSDK); /** * List available AI agents for the current tenant */ list(query?: { active?: boolean; kind?: string; limit?: number; page?: number; sort?: string; [key: string]: string | number | boolean; }): Promise; /** * Get a specific agent by ID (model, tools, system prompt, etc.) */ get(agentId: string): Promise; /** * Create a new agent (chat-completion integration) */ create(data: ICreateAgentRequest): Promise; /** * Update agent configuration */ update(agentId: string, data: IUpdateAgentRequest): Promise; /** * Delete an agent */ remove(agentId: string): Promise<{ success: boolean; message?: string; }>; /** * Send messages to an agent (non-streaming). The service creates a thread unless `threadId` is passed. */ chat(agentId: string, message: string, options?: IAgentChatOptions): Promise; /** * Stream a response via GET + SSE (`/api/ai/agents/:id/chat`). */ streamChat(agentId: string, message: string, options?: IAgentChatOptions): Promise; /** * Continue in an existing thread (non-streaming) */ chatInThread(agentId: string, threadId: string, message: string, options?: IAgentChatOptions): Promise; /** * Stream within an existing thread (GET + SSE) */ streamChatInThread(agentId: string, threadId: string, message: string, options?: IAgentChatOptions): Promise; private openAgentChatStream; }