import type { Record } from '@servicenow/sdk-core/db';
import type { AiAgentAgentType, AiAgentChannelType, AiAgentMemoryCategory, AiAgentRecordType } from './constants';
import type { DataAccessConfigType } from './data-access-config';
import type { SecurityAclUserAccessConfig } from './security-acl-config';
import type { AiAgentToolDetailsType } from './tool-config';
import type { AiAgentTriggerConfigType } from './trigger-config';
import type { AiAgentVersionDetailsType } from './version-config';
/**
 * Type representing the properties of an AI Agent (sn_aia_agent).
 */
type AiAgentType = Now.Internal.WithID<{
    /** Automatically generates sys_security_acl and sys_security_acl_role records for this agent */
    securityAcl: SecurityAclUserAccessConfig;
    /** Controls whether the agent is available for use. Inactive agents are hidden from selection but not deleted. Defaults to true */
    active?: boolean;
    /** Enables advanced configuration options and features for power users. Defaults to false */
    advancedMode?: boolean;
    /** Reference to overrides for agent config (another agent config) */
    agentConfigSysOverrides?: string | Record<'sn_aia_agent_config'>;
    /** Allows the agent to learn from interactions and improve over time. When enabled, the agent stores feedback for training. Defaults to false */
    agentLearning?: boolean;
    /** Describes the agent's role or purpose in the system (e.g., 'IT Support Assistant', 'HR Onboarding Guide'). Used for categorization and discovery */
    agentRole: string;
    /** Specifies whether this is an internal ServiceNow agent or integrates with an external AI service. Defaults to 'internal' */
    agentType?: AiAgentAgentType;
    /** Determines where the agent is available: 'nap' (Now Assist Panel only) or 'nap_and_va' (both Now Assist and Virtual Agent). Defaults to 'nap_and_va' */
    channel?: AiAgentChannelType;
    /** Condition table reference */
    condition?: string;
    /** Compiled handbook for the agent */
    compiledHandbook?: string;
    /** Server-side script that transforms or enriches the context before the agent executes. Use this to add data, filter information, or prepare inputs. Can be a function or Now.include() reference */
    contextProcessingScript?: ((context: any, ...dependencies: any[]) => any) | string;
    /** Configures which roles can access data through this agent. Required when runAsUser is not specified. Use roleList to restrict access to specific roles */
    dataAccess?: DataAccessConfigType;
    /** Brief explanation of what this agent does and when to use it. Shown in agent selection interfaces and documentation */
    description: string;
    /** Link to external documentation or help content for this agent. Shown to users who need more information about capabilities and usage */
    docUrl?: string;
    /** Whether the agent is external */
    external?: boolean;
    /** Reference to an external agent configuration */
    externalAgentConfiguration?: string | Record<'sn_aia_external_agent_configuration'>;
    /** URL to a custom icon image that represents this agent in the UI. Use for visual identification and branding */
    iconUrl?: string;
    /** Human-readable name shown in the UI and used to identify the agent. Must be unique within the scope */
    name: string;
    /** Reference to the parent AI Agent */
    parent?: string | Record<'sn_aia_agent'>;
    /** Message shown to users after the agent finishes execution. Use to provide next steps, summarize results, or offer additional guidance */
    postProcessingMessage?: string;
    /** Message shown to users while the agent is working. Use to set expectations about wait time or explain what's happening */
    processingMessage?: string;
    /** Controls whether the agent appears in public catalogs and can be discovered by all users. Private agents are only visible to specific roles. Defaults to false */
    public?: boolean;
    /** Classifies the agent's lifecycle stage: 'template' (reusable pattern), 'aia_internal' (system agent), 'custom' (user-created), or 'promoted' (elevated from custom). Defaults to 'template' */
    recordType?: AiAgentRecordType;
    /** Specifies which user's permissions the agent uses when accessing data. Provide a sys_user sys_id or Record reference. When set, dataAccess configuration is optional */
    runAsUser?: string | Record<'sys_user'>;
    /** Reference to the source agent (for cloned agents) */
    sourceId?: string | Record<'sn_aia_agent'>;
    /** Domain ID */
    sysDomain?: string;
    /** Categories of long-term memory the agent is allowed to access. Each category maps to a ServiceNow AI Agent Memory Category record */
    memoryCategories?: AiAgentMemoryCategory[];
    /** Array of tools and capabilities available to the agent. Tools enable actions like web search, CRUD operations, subflow execution, and custom scripts */
    tools?: AiAgentToolDetailsType[];
    /** Defines conditions and schedules for automatic agent execution. Use triggers to run agents on record changes, time schedules, or business events */
    triggerConfig?: AiAgentTriggerConfigType[] | undefined;
    /** Manages multiple versions of agent instructions. Each version can have different prompts, conditions, and states (draft/published). Enables A/B testing and gradual rollouts */
    versionDetails?: AiAgentVersionDetailsType[];
}>;
/**
 * Creates an AI Agent definition for ServiceNow's AI Agent Studio.
 */
export declare function AiAgent(config: AiAgentType): AiAgentType;
export {};
