UNPKG

@elevenlabs/convai-cli

Version:

CLI tool to manage ElevenLabs conversational AI agents

89 lines 4.2 kB
import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js'; /** * Retrieves the ElevenLabs API key from config or environment variables and returns an API client. * * @throws {Error} If no API key is found * @returns An instance of the ElevenLabs client */ export declare function getElevenLabsClient(): Promise<ElevenLabsClient>; /** * Creates a new agent using the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param name - The name of the agent * @param conversationConfigDict - A dictionary for ConversationalConfig * @param platformSettingsDict - An optional dictionary for AgentPlatformSettings * @param tags - An optional list of tags * @returns Promise that resolves to the agent_id of the newly created agent */ export declare function createAgentApi(client: ElevenLabsClient, name: string, conversationConfigDict: Record<string, unknown>, platformSettingsDict?: Record<string, unknown>, tags?: string[]): Promise<string>; /** * Updates an existing agent using the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param agentId - The ID of the agent to update * @param name - Optional new name for the agent * @param conversationConfigDict - Optional new dictionary for ConversationalConfig * @param platformSettingsDict - Optional new dictionary for AgentPlatformSettings * @param tags - Optional new list of tags * @returns Promise that resolves to the agent_id of the updated agent */ export declare function updateAgentApi(client: ElevenLabsClient, agentId: string, name?: string, conversationConfigDict?: Record<string, unknown>, platformSettingsDict?: Record<string, unknown>, tags?: string[]): Promise<string>; /** * Lists all agents from the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param pageSize - Maximum number of agents to return per page (default: 30, max: 100) * @param search - Optional search string to filter agents by name * @returns Promise that resolves to a list of agent metadata objects */ export declare function listAgentsApi(client: ElevenLabsClient, pageSize?: number, search?: string): Promise<unknown[]>; /** * Gets detailed configuration for a specific agent from the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param agentId - The ID of the agent to retrieve * @returns Promise that resolves to an object containing the full agent configuration */ export declare function getAgentApi(client: ElevenLabsClient, agentId: string): Promise<unknown>; /** * Creates a new tool using the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param toolConfig - The tool configuration object * @returns Promise that resolves to the created tool object */ export declare function createToolApi(client: ElevenLabsClient, toolConfig: unknown): Promise<unknown>; /** * Updates an existing tool using the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param toolId - The ID of the tool to update * @param toolConfig - The updated tool configuration object * @returns Promise that resolves to the updated tool object */ export declare function updateToolApi(client: ElevenLabsClient, toolId: string, toolConfig: unknown): Promise<unknown>; /** * Gets a specific tool from the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @param toolId - The ID of the tool to retrieve * @returns Promise that resolves to the tool object */ export declare function getToolApi(client: ElevenLabsClient, toolId: string): Promise<unknown>; /** * Lists all tools from the ElevenLabs API. * * @param client - An initialized ElevenLabs client * @returns Promise that resolves to a list of tool objects */ export declare function listToolsApi(client: ElevenLabsClient): Promise<unknown[]>; /** * Gets agents that depend on a specific tool. * * @param client - An initialized ElevenLabs client * @param toolId - The ID of the tool * @returns Promise that resolves to a list of dependent agents */ export declare function getToolDependentAgentsApi(client: ElevenLabsClient, toolId: string): Promise<unknown[]>; //# sourceMappingURL=elevenlabs-api.d.ts.map