/** * ThinkHive SDK - Agents Management * * CRUD operations for managing AI agents: * - List, get, create, update, delete agents * - Agent configuration management * * @example * ```typescript * import { agents } from 'thinkhive-js'; * * // List all agents * const allAgents = await agents.list(); * * // Create a new agent * const agent = await agents.create({ * name: 'Support Agent', * description: 'Handles customer support', * agentType: 'customer_support', * primarySuccessMetric: 'Deflection Rate', * }); * * // Update an agent * await agents.update(agent.id, { name: 'Updated Agent' }); * * // Get agent configuration * const config = await agents.getConfig(agent.id); * * // Delete an agent (with dry-run preview) * const impact = await agents.delete(agent.id, { dryRun: true }); * console.log(`Will delete ${impact.cascadeImpact.traces} traces`); * * // Actually delete * await agents.delete(agent.id); * ``` */ export interface Agent { id: string; companyId: string; departmentId?: string | null; createdBy?: string | null; name: string; description: string; industry: string; successMetrics: string[]; agentType?: string | null; agentOwner?: string | null; builtInHouse?: boolean | null; primarySuccessMetric?: string | null; secondaryMetrics?: string[] | null; connectedSystem?: string | null; telemetryMethod?: string | null; autoEvaluate?: boolean | null; evaluationSampleRate?: string | null; defaultCriteriaIds?: string[] | null; defaultGuardrailIds?: string[] | null; createdAt?: string | null; } export interface CreateAgentOptions { name: string; description?: string; industry?: string; agentType?: string; agentOwner?: string; builtInHouse?: boolean; departmentId?: string; successMetrics?: string[]; primarySuccessMetric?: string; secondaryMetrics?: string[]; connectedSystem?: string; autoEvaluate?: boolean; evaluationSampleRate?: number; } export interface UpdateAgentOptions { name?: string; description?: string; agentType?: string; agentOwner?: string; builtInHouse?: boolean; departmentId?: string | null; industry?: string; primarySuccessMetric?: string; secondaryMetrics?: string[]; connectedSystem?: string; autoEvaluate?: boolean; evaluationSampleRate?: number; isActive?: boolean; } export interface AgentConfig { id: string; agentId: string; version: number; name: string; description?: string | null; provider: string; model: string; temperature?: string | null; maxTokens?: number | null; systemPrompt?: string | null; promptTemplate?: string | null; ragEnabled?: boolean | null; ragConfig?: unknown; toolsEnabled?: boolean | null; tools?: unknown; isBaseline?: boolean | null; isActive?: boolean | null; createdAt?: string | null; updatedAt?: string | null; } export interface UpdateAgentConfigOptions { name?: string; provider?: string; model?: string; temperature?: number; maxTokens?: number; systemPrompt?: string; promptTemplate?: string; ragEnabled?: boolean; ragConfig?: Record; toolsEnabled?: boolean; tools?: unknown[]; } export interface DeleteAgentOptions { /** If true, returns cascade impact without actually deleting */ dryRun?: boolean; } export interface CascadeImpact { dryRun: boolean; agentId: string; agentName: string; cascadeImpact: { traces: number; apiKeys: number; runningEvaluations?: number; }; } export declare const agents: { /** * List agents for the authenticated company */ list(options?: { companyId?: string; departmentId?: string; }): Promise; /** * Get a single agent by ID */ get(id: string): Promise; /** * Create a new agent */ create(options: CreateAgentOptions): Promise; /** * Update an existing agent */ update(id: string, options: UpdateAgentOptions): Promise; /** * Delete an agent. Use dryRun option to preview cascade impact. */ delete(id: string, options?: DeleteAgentOptions): Promise; /** * Get agent configuration (baseline) */ getConfig(agentId: string): Promise; /** * Create or update agent configuration */ updateConfig(agentId: string, config: UpdateAgentConfigOptions): Promise; };