import * as _algolia_client_common from '@algolia/client-common'; import { CreateClientOptions, RequestOptions, AlgoliaHttpResponse, ServerSentEvent, StreamEvent, ClientOptions } from '@algolia/client-common'; type AlgoliaRecommendToolIndexConfig = { index: string; modelName: string; description?: string | undefined; }; /** * Configuration for the Algolia Recommend tool. Allows specifying recommend models and related parameters. */ type AlgoliaRecommendToolConfig = { name: string; type: string; allowedConfigs?: Array | undefined; predefinedRecommendParameters?: { [key: string]: any; } | undefined; }; /** * A boolean search parameter with exposure control. */ type BooleanParam = { exposed: boolean; _default?: boolean | null | undefined; }; /** * A facets parameter that is always hidden from the LLM. */ type FacetsParam = { exposed?: boolean | undefined; _default?: Array | null | undefined; }; /** * Constraints for a number parameter. */ type NumberParamConstraint = { min?: number | null | undefined; max?: number | null | undefined; }; /** * A number search parameter with exposure control and optional constraints. */ type NumberParam = { exposed: boolean; _default?: number | null | undefined; constraint?: NumberParamConstraint | null | undefined; }; /** * Constraints for a string array parameter. */ type StringArrayParamConstraint = { values?: Array | null | undefined; }; /** * A string array search parameter with exposure control, constraints, and merge behavior. */ type StringArrayParam = { exposed: boolean; _default?: Array | null | undefined; constraint?: StringArrayParamConstraint | null | undefined; merge?: boolean | null | undefined; }; /** * A text search parameter with exposure control. */ type TextParam = { exposed: boolean; _default?: string | null | undefined; }; /** * Structured search parameters configuration for an Algolia index. Each parameter controls whether it is exposed to the LLM, its default value, optional constraints, and merge behavior. */ type IndexSearchParameters = { query?: TextParam | null | undefined; hitsPerPage?: NumberParam | undefined; page?: NumberParam | undefined; attributesToRetrieve?: StringArrayParam | undefined; responseFields?: StringArrayParam | undefined; distinct?: BooleanParam | null | undefined; facets?: FacetsParam | null | undefined; custom?: { [key: string]: any; } | null | undefined; }; /** * AdvancedSyntaxFeatures. */ type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords'; /** * AlternativesAsExact. */ type AlternativesAsExact = 'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym' | 'ignoreConjugations'; type AroundPrecisionUnion = number | Array<{ [key: string]: number; }>; type AroundRadiusUnion = number | string; type DistinctUnion = boolean | number; /** * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. - `attribute`. The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". - `none`. The Exact ranking criterion is ignored on single-word searches. - `word`. The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. Only exact matches will be highlighted, partial and prefix matches won\'t. */ type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word'; type FacetFiltersUnion = Array | string; /** * Order of facet names. */ type Facets = Record & { order?: Array | null | undefined; }; type FacetsUnion = Array | Facets; /** * ISO code for a supported language. */ type SupportedLanguage = 'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt' | 'pt-br' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh'; type IgnorePluralsUnion = boolean | Array; type InsideBoundingBoxUnion = string | Array>; type InsidePolygonUnion = string | Array>; type NumericFiltersUnion = string | Array; type OptionalFiltersUnion = string | Array; type OptionalWordsUnion = string | Array; /** * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). */ type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone'; type ReRankingApplyFilterUnion = string | Array<{ [key: string]: any; }>; type RemoveStopWordsUnion = boolean | Array; /** * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results). */ type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional'; type TagFiltersUnion = string | Array; /** * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. */ type TypoToleranceEnum = 'min' | 'strict' | 'true' | 'false'; type TypoToleranceUnion = boolean | TypoToleranceEnum; /** * Algolia Search API parameters that can be predefined for the search tool. Reference: https://www.algolia.com/doc/api-reference/search-api-parameters/ The search tool supports the relevant subset of search parameters in the context of agentic interactions. */ type SearchParameters = { queryType?: QueryType | null | undefined; similarQuery?: string | null | undefined; queryLanguages?: Array | null | undefined; advancedSyntax?: boolean | null | undefined; advancedSyntaxFeatures?: Array | null | undefined; alternativesAsExact?: Array | null | undefined; decompoundQuery?: boolean | null | undefined; typoTolerance?: TypoToleranceUnion | null | undefined; allowTyposOnNumericTokens?: boolean | null | undefined; minWordSizeFor1Typo?: number | null | undefined; minWordSizeFor2Typos?: number | null | undefined; disableTypoToleranceOnAttributes?: Array | null | undefined; filters?: string | null | undefined; facetFilters?: FacetFiltersUnion | null | undefined; facets?: FacetsUnion | null | undefined; maxValuesPerFacet?: number | null | undefined; maxFacetHits?: number | null | undefined; facetingAfterDistinct?: boolean | null | undefined; sortFacetValuesBy?: string | null | undefined; numericFilters?: NumericFiltersUnion | null | undefined; tagFilters?: TagFiltersUnion | null | undefined; sumOrFiltersScores?: boolean | null | undefined; aroundLatLng?: string | null | undefined; aroundLatLngViaIp?: boolean | null | undefined; aroundRadius?: AroundRadiusUnion | null | undefined; aroundPrecision?: AroundPrecisionUnion | null | undefined; minimumAroundRadius?: number | null | undefined; insideBoundingBox?: InsideBoundingBoxUnion | null | undefined; insidePolygon?: InsidePolygonUnion | null | undefined; attributesToRetrieve?: Array | null | undefined; attributesToSnippet?: Array | null | undefined; snippetEllipsisText?: string | null | undefined; restrictHighlightAndSnippetArrays?: boolean | null | undefined; page?: number | null | undefined; offset?: number | null | undefined; hitsPerPage?: number | null | undefined; length?: number | null | undefined; getRankingInfo?: boolean | null | undefined; relevancyStrictness?: number | null | undefined; minProximity?: number | null | undefined; attributeCriteriaComputedByMinProximity?: boolean | null | undefined; distinct?: DistinctUnion | null | undefined; enableRules?: boolean | null | undefined; enablePersonalization?: boolean | null | undefined; personalizationImpact?: number | null | undefined; enableAbTest?: boolean | null | undefined; enableReRanking?: boolean | null | undefined; reRankingApplyFilter?: ReRankingApplyFilterUnion | null | undefined; ruleContexts?: Array | null | undefined; removeStopWords?: RemoveStopWordsUnion | null | undefined; ignorePlurals?: IgnorePluralsUnion | null | undefined; removeWordsIfNoResults?: RemoveWordsIfNoResults | null | undefined; optionalWords?: OptionalWordsUnion | null | undefined; optionalFilters?: OptionalFiltersUnion | null | undefined; synonyms?: boolean | null | undefined; replaceSynonymsInHighlight?: boolean | null | undefined; analytics?: boolean | null | undefined; analyticsTags?: Array | null | undefined; clickAnalytics?: boolean | null | undefined; userToken?: string | null | undefined; restrictSearchableAttributes?: Array | null | undefined; disableExactOnAttributes?: Array | null | undefined; exactOnSingleWordQuery?: ExactOnSingleWordQuery | null | undefined; naturalLanguages?: Array | null | undefined; percentileComputation?: boolean | null | undefined; explain?: Array | null | undefined; }; type AlgoliaSearchToolIndexConfig = { index: string; description: string; enhancedDescription?: string | undefined; searchParameters?: SearchParameters | null | undefined; searchControls?: IndexSearchParameters | null | undefined; }; type ModeEnum = 'static' | 'dynamic'; type AlgoliaSearchToolConfig = { name: string; type: string; indices: Array; mode?: ModeEnum | undefined; allowUnlistedIndices?: boolean | undefined; }; type ClientToolsArgsSchema = { type?: string | undefined; properties?: { [key: string]: any; } | undefined; required?: Array | undefined; }; type ClientSideToolConfig = { name: string; type: string; description: string; inputSchema: ClientToolsArgsSchema; /** * Server-side declaration that this tool is display/render-only: a resolved result ends the turn and the model is not re-invoked on it (CR-11753). The client\'s terminal claim on a tool result is honored only when this agrees; leave false for data tools whose result the model must reason about. */ isTerminal?: boolean | undefined; }; type McpToolConfig = { requiresApproval?: boolean | null | undefined; alias?: string | null | undefined; }; type ToolConfigOrBooleanUnion = McpToolConfig | boolean; type McpServerToolConfig = { url: string; transport?: string | undefined; headers: { [key: string]: string; }; name: string; type: string; /** * Stable unique identifier for this MCP tool. */ id?: string | null | undefined; allowedTools?: { [key: string]: ToolConfigOrBooleanUnion; } | null | undefined; }; /** * A tool configuration that this version of the API does not recognize. */ type UnknownToolConfig = Record & { name: string; type: string; }; type ToolConfigInput = ClientSideToolConfig | AlgoliaSearchToolConfig | AlgoliaRecommendToolConfig | McpServerToolConfig | UnknownToolConfig; type AgentConfigCreate = { name: string; description?: string | undefined; providerId?: string | undefined; model?: string | undefined; /** * The agent prompt: defines the agent\'s role, tone, and goals. Guides how it answers using the provided context. Corresponds to the \'Agent prompt\' field in the dashboard. */ instructions: string; /** * The system prompt: defines system-level rules and constraints. Guides how the agent uses tools, features, and generates context. Prepended before `instructions` in the final prompt sent to the LLM. Typically injected by an agent template — modify with caution, as changes may affect behavior, tool usage, or response accuracy. Corresponds to the \'System prompt\' field in the dashboard. */ systemPrompt?: string | undefined; templateType?: string | undefined; config?: { [key: string]: any; } | undefined; tools?: Array | undefined; }; type AgentStatus = 'draft' | 'published'; type ToolConfigOutput = ClientSideToolConfig | AlgoliaSearchToolConfig | AlgoliaRecommendToolConfig | McpServerToolConfig | UnknownToolConfig; type AgentWithVersionResponse = { id: string; name: string; description: string | null; status: AgentStatus; providerId: string | null; model?: string | null | undefined; instructions: string; systemPrompt?: string | null | undefined; config: { [key: string]: any; }; tools?: Array | undefined; templateType?: string | null | undefined; createdAt: string; updatedAt: string | null; lastUsedAt: string | null; }; /** * Single allowed domain in API responses. */ type AllowedDomainResponse = { id: string; appId: string; agentId: string; domain: string; createdAt: string; updatedAt: string; }; /** * List of allowed domains for an application. */ type AllowedDomainListResponse = { domains: Array; }; type ApplicationConfigPatch = { /** * Maximum number of days to retain data. Valid values: [0, 30, 60, 90]. */ maxRetentionDays?: number | null | undefined; }; type ApplicationConfigResponse = { maxRetentionDays: number; }; type ReasoningPartV4 = { type?: string | undefined; reasoning: string; }; type StepStartPartV4 = { type?: string | undefined; }; type TextPartV4 = { type?: string | undefined; text: string; }; /** * A tool invocation in a message. */ type ToolInvocationV4 = { toolCallId: string; toolName: string; args?: { [key: string]: any; } | undefined; result?: { [key: string]: any; } | null | undefined; step?: number | null | undefined; state?: string | null | undefined; providerOptions?: { [key: string]: any; } | null | undefined; requiresApproval?: boolean | null | undefined; description?: string | null | undefined; argsHash?: string | null | undefined; }; type ToolInvocationPartV4 = { type?: string | undefined; toolInvocation: ToolInvocationV4; }; type AssistantPartV4 = StepStartPartV4 | ReasoningPartV4 | TextPartV4 | ToolInvocationPartV4; type AssistantMessageV4 = { id?: string | null | undefined; role: string; content: string; parts?: Array | undefined; toolInvocations?: Array | null | undefined; }; type UserMessageV4 = { id?: string | null | undefined; role: string; content: string; parts?: Array | undefined; annotations?: Array<{ [key: string]: any; }> | null | undefined; }; type MessageV4 = UserMessageV4 | AssistantMessageV4; /** * Payload of a persisted ``data-guardrail-violation`` part. The response stream sends the same fields: ``category``, ``guardrailType``, and ``fallbackResponse``. Unknown keys are tolerated so a newer client that carries extra violation detail still round-trips without a 422. */ type GuardrailViolationDataV5 = Record & { category: string; guardrailType?: string | null | undefined; fallbackResponse?: string | null | undefined; }; /** * A ``data-guardrail-violation`` part that an AI SDK v5 client sends back. Send this part to tell the completions endpoint that a guardrail blocked the previous turn. */ type DataGuardrailViolationPartV5 = { type?: string | undefined; data: GuardrailViolationDataV5; }; /** * AI SDK v5 transient data part (``type`` prefixed with ``data-``). We emit these on the streamed assistant response (e.g. ``data-suggestions``, ``data-tool-approval``, ``data-*-usage``, etc.). The client echoes the whole assistant message back as history on the next turn, so the inbound schema must tolerate them or the entire request 422s. They carry UI payload only (not model context) and are dropped on conversion to internal messages. */ type DataPartV5 = { type: string; data?: { [key: string]: any; } | undefined; }; type ReasoningPartV5 = { type?: string | undefined; text: string; }; type StepStartPartV5 = { type?: string | undefined; }; type TextPartV5 = { type?: string | undefined; text: string; }; type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error'; /** * A tool invocation in a message. */ type ToolPartV5 = { type: string; toolCallId: string; state?: ToolState | undefined; input?: { [key: string]: any; } | null | undefined; rawInput?: { [key: string]: any; } | null | undefined; output?: { [key: string]: any; } | null | undefined; outputMetadata?: { [key: string]: any; } | null | undefined; errorText?: string | null | undefined; terminal?: boolean | null | undefined; providerOptions?: { [key: string]: any; } | null | undefined; requiresApproval?: boolean | null | undefined; description?: string | null | undefined; argsHash?: string | null | undefined; }; type AssistantPartV5 = StepStartPartV5 | TextPartV5 | ReasoningPartV5 | DataGuardrailViolationPartV5 | DataPartV5 | ToolPartV5; type AssistantMessageV5 = { id?: string | null | undefined; role: string; parts?: Array | undefined; }; /** * Client-supplied metadata on a v5 user message. `turn_context` is namespaced so other callers can use `metadata` for unrelated purposes without collision. Unknown keys are preserved and ignored by this pipeline. `turn_context` accepts any JSON object (arbitrarily nested values, no size caps). A value that cannot be serialized as JSON is rejected with a 422. */ type UserMessageMetadataV5 = Record & { turnContext?: { [key: string]: any; } | null | undefined; }; type UserMessageV5 = { id?: string | null | undefined; role: string; parts?: Array | undefined; metadata?: UserMessageMetadataV5 | null | undefined; }; type MessageV5 = UserMessageV5 | AssistantMessageV5; type MessagesUnion = Array | Array; /** * LLM-summarization request. Your provider runs the summary, so the provider adds the cost to your account. */ type ContextCompactRequest = { /** * Provider UUID for LLM credentials. */ providerID: string; /** * Model name (e.g., gpt-4o-mini). */ model: string; messages: MessagesUnion; /** * Number of trailing messages kept verbatim; everything older is summarized. */ keepLastMessages?: number | undefined; /** * Extra guidance for the summarizer (e.g. \'keep every product reference\'). Appended inside the server-owned prompt frame, so it steers the summary without the model echoing your wording back into it. */ instructions?: string | undefined; /** * Desired size of the final summary, in tokens. Translated into word-count guidance for the summarizer (best-effort, not a hard cap). Omit to let the summarizer default to a concise summary. */ targetTokensEstimate?: number | undefined; }; /** * Compaction-specific telemetry, returned only by ``/context/compact``. ``compacted`` makes the short-conversation passthrough detectable: without it a caller cannot tell a no-op from a summary that happened to be short. */ type CompactionStats = { /** * Whether a summary was actually produced. `false` means the payload passed through untouched (nothing older than the kept tail, or no summarizable text). */ compacted: boolean; /** * Number of transcript chunks summarized in the map phase. 0 on passthrough, 1 when the transcript fit in a single summarizer call. */ chunksProcessed?: number | undefined; /** * Number of summarizer rounds. 1 for a direct summary; 2+ when chunk summaries had to be merged (map-reduce). */ passes?: number | undefined; /** * Provider-reported input tokens summed across every summarizer call. Null when the provider reported no usage metadata. */ summarizerPromptTokens?: number | null | undefined; /** * Provider-reported output tokens summed across every summarizer call. Null when the provider reported no usage metadata. */ summarizerCompletionTokens?: number | null | undefined; /** * The requested output budget, echoed back when `targetTokensEstimate` was set. */ targetTokensEstimate?: number | null | undefined; }; /** * Before/after accounting for a context operation. ``tokens*Estimate`` fields are heuristic, not an authoritative provider count. ``messages_dropped`` is the net reduction in message count (``messages_before - messages_after``); for compaction the summarized tail is replaced by a single summary message, so this reflects the net change rather than a raw delete count. */ type ContextStats = { /** * Message count before the operation. */ messagesBefore: number; /** * Message count after the operation. */ messagesAfter: number; /** * Estimated token count before the operation. */ tokensBeforeEstimate: number; /** * Estimated token count after the operation. */ tokensAfterEstimate: number; /** * Net reduction in message count (before - after). */ messagesDropped: number; }; /** * Result of a context operation, ready to feed to ``/completions``. */ type ContextResponse = { messages: MessagesUnion; stats: ContextStats; compaction?: CompactionStats | null | undefined; }; /** * Deterministic trim request (no LLM calls). */ type ContextTrimRequest = { messages: MessagesUnion; /** * Keep only the last N messages, dropping older ones. Applied before the token budget. */ keepLastMessages?: number | undefined; /** * Drop oldest messages until the estimated token total fits this budget (heuristic). */ maxTokensEstimate?: number | undefined; /** * Strip tool-invocation/result parts from the messages that are kept. Applied before the token budget, so the budget counts only surviving content. */ dropToolParts?: boolean | undefined; }; /** * Public metadata exposed on conversation responses. */ type ConversationMetadata = { cachedAt?: string | null | undefined; }; type FeedbackResponse = { id: string; agentId: string; messageId: string; vote: number; tags: Array; notes?: string | null | undefined; model?: string | null | undefined; createdAt: string; updatedAt: string; }; /** * Views, clicks, and conversions attributed to the conversation. Returned only when ``includeImpactAnalytics=true``. ``null`` means the API could not supply the data -- NOT that there are zero outcomes -- and the response sets ``analyticsDegraded`` to ``true``. Render that case as a data-load error rather than as zero-value badges. */ type ImpactAnalytics = { hasView: boolean; hasClick: boolean; hasConversion: boolean; hasAlgoliaSearch: boolean; }; type OneOfEnum = 'input' | 'output'; /** * Minimal record of a guardrail decision, persisted on a blocked assistant message. Present only when a guardrail blocks a turn (the persisted parts are then just the fallback text); ``null`` on ordinary messages. Lets a blocked turn be told apart from a short reply using conversation data alone. */ type GuardrailOutcome = { blocked: boolean; category: string; guardrailType?: OneOfEnum | null | undefined; }; /** * An Insights event attributed to an assistant message. */ type MessageEvent = { eventType: string; eventName: string; objectId?: string | null | undefined; }; type ReasoningPart = { type: string; text: string; }; type StartPart = { type: string; }; type StartStepPart = { type: string; }; type TextPart = { type: string; text: string; }; type ToolApprovalRequestPart = { type: string; toolCallId: string; toolName: string; args: any | null; description?: string | null | undefined; providerOptions?: { [key: string]: any; } | null | undefined; argsHash?: string | null | undefined; appId?: string | null | undefined; conversationId?: string | null | undefined; }; type ToolCallPart = { type: string; toolCallId: string; toolName: string; args: any | null; rawArgs?: { [key: string]: any; } | null | undefined; requiresApproval?: boolean | null | undefined; providerOptions?: { [key: string]: any; } | null | undefined; }; /** * The valid \'type\' of tool results. */ type ToolResultOutputType = 'text' | 'json' | 'error-text' | 'error-json' | 'content'; type ToolResultOutput = { type: ToolResultOutputType; value: any | null; }; type ToolResultPart = { type: string; toolCallId: string; toolName: string; output: ToolResultOutput; providerOptions?: { [key: string]: any; } | null | undefined; mcpConfigId?: string | null | undefined; mcpConfigName?: string | null | undefined; isTerminal?: boolean | null | undefined; outputMetadata?: { [key: string]: any; } | null | undefined; }; type MessagePart = TextPart | ToolCallPart | ToolResultPart | StartPart | StartStepPart | ReasoningPart | ToolApprovalRequestPart; /** * Role of a message in the conversation. */ type MessageRole = 'user' | 'assistant'; /** * Response model for a message. */ type MessageResponse = { id: string; conversationId: string; role: MessageRole; parts: Array; createdAt: string; updatedAt: string; model?: string | null | undefined; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; reasoningTokens?: number | null | undefined; inputTokenDetails?: { [key: string]: number; } | null | undefined; outputTokenDetails?: { [key: string]: number; } | null | undefined; isCacheHit?: boolean | null | undefined; turnContext?: { [key: string]: any; } | null | undefined; events?: Array | undefined; guardrail?: GuardrailOutcome | null | undefined; }; /** * Response model for a conversation with all its messages. */ type ConversationFullResponse = { id: string; agentId: string; title?: string | null | undefined; createdAt: string; updatedAt: string; lastActivityAt?: string | null | undefined; userToken?: string | null | undefined; isFromDashboard?: boolean | undefined; messageCount?: number | undefined; totalInputTokens?: number | undefined; totalOutputTokens?: number | undefined; totalTokens?: number | undefined; conversationMetadata?: ConversationMetadata | null | undefined; feedback?: Array | null | undefined; impactAnalytics?: ImpactAnalytics | null | undefined; messages: Array; analyticsDegraded?: boolean | undefined; }; type VoteEnum = 0 | 1; /** * Request model for creating a feedback entry. */ type FeedbackCreationRequest = { messageId: string; agentId: string; vote: VoteEnum; tags?: Array | undefined; notes?: string | undefined; }; /** * Request model for updating an existing feedback entry. */ type FeedbackUpdateRequest = { messageId: string; agentId: string; vote?: VoteEnum | null | undefined; tags?: Array | null | undefined; notes?: string | null | undefined; }; type PaginationMetadata = { page: number; limit: number; totalCount: number; totalPages: number; }; type PaginatedAgentsResponse = { data: Array; pagination: PaginationMetadata; }; /** * Lightweight response model without its messages. */ type ConversationBaseResponse = { id: string; agentId: string; title?: string | null | undefined; createdAt: string; updatedAt: string; lastActivityAt?: string | null | undefined; userToken?: string | null | undefined; isFromDashboard?: boolean | undefined; messageCount?: number | undefined; totalInputTokens?: number | undefined; totalOutputTokens?: number | undefined; totalTokens?: number | undefined; conversationMetadata?: ConversationMetadata | null | undefined; feedback?: Array | null | undefined; impactAnalytics?: ImpactAnalytics | null | undefined; }; type PaginatedConversationsResponse = { data: Array; pagination: PaginationMetadata; analyticsDegraded?: boolean | undefined; }; /** * Anthropic-specific provider input. */ type AnthropicProviderInput = { apiKey: string; baseUrl?: string | null | undefined; }; /** * Azure OpenAI-specific provider input. */ type AzureOpenAIProviderInput = { apiKey: string; azureEndpoint: string; /** * Azure model deployment name. */ azureDeployment: string; apiVersion?: string | null | undefined; }; /** * Base input that all providers must have. */ type BaseProviderInput = { apiKey: string; }; /** * Response input for the Algolia-hosted provider. Limited by design. */ type ManagedProviderResponseInput = { defaultModel?: string | null | undefined; }; /** * Input for a provider with an OpenAI-compatible API. */ type OpenAICompatibleProviderInput = { apiKey: string; baseUrl: string; /** * Default model for this provider. Used for validation and as fallback when no model is specified at agent level. */ defaultModel: string; }; /** * OpenAI-specific provider input. */ type OpenAIProviderInput = { apiKey: string; baseUrl?: string | null | undefined; }; /** * xAI (Grok)-specific provider input. api_key only, with an optional base_url override (defaults to https://api.x.ai/v1 at completion time). An unusable base_url fails when you create the provider, not at completion. */ type XAIProviderInput = { apiKey: string; baseUrl?: string | null | undefined; }; type InputUnion = OpenAIProviderInput | AzureOpenAIProviderInput | OpenAICompatibleProviderInput | BaseProviderInput | AnthropicProviderInput | XAIProviderInput | ManagedProviderResponseInput; type ProviderAuthenticationResponse = { id: string; name: string; providerName: string; input: InputUnion; createdAt: string; updatedAt: string; lastUsedAt?: string | null | undefined; isAlgoliaManaged?: boolean | undefined; }; type PaginatedProviderAuthenticationsResponse = { data: Array; pagination: PaginationMetadata; }; type SecretKeyResponse = { id: string; name: string; value: string; createdAt: string; updatedAt: string; lastUsedAt: string | null; isDefault?: boolean | undefined; agentIds: Array; }; type PaginatedSecretKeysResponse = { data: Array; pagination: PaginationMetadata; }; type ProviderInput = OpenAIProviderInput | AzureOpenAIProviderInput | OpenAICompatibleProviderInput | BaseProviderInput | AnthropicProviderInput | XAIProviderInput; type ProviderName = 'openai' | 'azure_openai' | 'google_genai' | 'deepseek' | 'openai_compatible' | 'xai' | 'anthropic'; type ProviderAuthenticationCreate = { name: string; providerName: ProviderName; input: ProviderInput; }; /** * Secret key creation payload. */ type SecretKeyCreate = { /** * The name of the secret key. */ name: string; /** * List of agent IDs this secret key is associated with. */ agentIds?: Array | undefined; }; /** * Response body for a completed task run. */ type TaskResponse = { output: { [key: string]: any; }; }; /** * Episodic memory schema following LangMem\'s OTAR pattern: Observation → Thoughts → Action → Result Captures complete interaction experiences for agent learning. See https://langchain-ai.github.io/langmem/concepts/conceptual_guide/#episodic-memory-past-experiences. */ type Episode = { /** * What user wanted + key context (1-2 sentences). Include prior failed attempts if they informed the approach. */ observation: string; /** * WHY this approach was chosen, which constraints/preferences drove decisions (1-3 sentences). Capture reasoning that applies to similar future scenarios. */ thoughts: string; /** * What was done with PRECISE details (1-3 sentences). WITH tool calls: use arrow notation `tool(param:value) → feedback → tool(refined_param:new_value)`. WITHOUT tool calls: capture communication/workflow pattern. */ action: string; /** * Learned pattern + effectiveness (1-3 sentences). What worked and WHY it\'s replicable. Note efficiency: multi-turn refinements, which results were relevant, what made final attempt succeed. Use strict `param:value` syntax for learnings. Format: \'For [context], use [param:value] because [reason]\'. */ result: string; }; /** * The type of the stored memory. */ type MemoryType = 'semantic' | 'episodic'; /** * A stored memory record. */ type MemoryRecord = { memoryType?: MemoryType | undefined; episode?: Episode | null | undefined; /** * Self-contained, first-person memory for long-term recall. */ text: string; /** * Verbatim conversation extract, not paraphrased. */ rawExtract: string; /** * Keywords for retrieval: entities, context, search terms. */ keywords?: Array | undefined; /** * Topics that classify the memory. Each must be one of: [complaints, entertainment, family, feedback, finance, food, goals, health, history, hobbies, learning, praise, preferences, schedule, shopping, technical, travel, work]. */ topics?: Array | undefined; /** * Arbitrary labels/themes for flexible categorization (e.g., \'Q1-goals\', \'paris-trip\', \'vip-customer\'). */ _tags?: Array | undefined; /** * Phrases that cause the API to recall this memory. */ recallTriggers?: Array | undefined; /** * ObjectID of existing memory to update. Leave empty for new memory. */ objectID?: string | null | undefined; /** * Application ID. */ appId?: string | undefined; /** * Agent IDs with access: [\'agent1\'], [\'*\'] for all, [\'*\', \'-agent1\'] to exclude. */ agentIDs?: Array | undefined; /** * User ID. */ userID?: string | undefined; /** * Epoch seconds. */ createdAt?: number | undefined; /** * Epoch seconds. */ updatedAt?: number | undefined; }; type UserDataResponse = { conversations: Array; memories: Array; }; /** * Use `algolia_grouped_results`. */ type AlgoliaGroupedResultsCompatToolConfig = { name?: string | undefined; /** * When true, a successful tool invocation ends the agent graph (no further LLM turn). Use for chat experiences where the tool payload IS the final response. Leave false to let the main LLM produce a concluding assistant message after the tool runs. */ isTerminal?: boolean | undefined; /** * Minimum number of result groups. */ minGroups?: number | undefined; /** * Maximum number of result groups. */ maxGroups?: number | undefined; /** * Minimum hits per group. */ minResultsPerGroup?: number | undefined; /** * Maximum hits per group. */ maxResultsPerGroup?: number | undefined; type: string; }; /** * Configuration for the algolia_grouped_results tool. */ type AlgoliaGroupedResultsToolConfig = { name?: string | undefined; /** * When true, a successful tool invocation ends the agent graph (no further LLM turn). Use for chat experiences where the tool payload IS the final response. Leave false to let the main LLM produce a concluding assistant message after the tool runs. */ isTerminal?: boolean | undefined; /** * Minimum number of result groups. */ minGroups?: number | undefined; /** * Maximum number of result groups. */ maxGroups?: number | undefined; /** * Minimum hits per group. */ minResultsPerGroup?: number | undefined; /** * Maximum hits per group. */ maxResultsPerGroup?: number | undefined; type: string; }; type ItemsUnion = ClientSideToolConfig | AlgoliaSearchToolConfig | AlgoliaRecommendToolConfig | AlgoliaGroupedResultsToolConfig | AlgoliaGroupedResultsCompatToolConfig | McpServerToolConfig | UnknownToolConfig; type FacetFiltersUnionSearchParametersOverrides = string | Array; /** * Algolia Search API parameters that can be predefined for the search tool. Reference: https://www.algolia.com/doc/api-reference/search-api-parameters/ A subset of SearchParameters of specific params we allow for runtime override. */ type SearchParametersOverrides = { filters?: string | undefined; attributesToRetrieve?: Array | undefined; restrictSearchableAttributes?: Array | undefined; distinct?: DistinctUnion | null | undefined; userToken?: string | undefined; enablePersonalization?: boolean | undefined; personalizationImpact?: number | undefined; optionalFilters?: OptionalFiltersUnion | null | undefined; facetFilters?: FacetFiltersUnionSearchParametersOverrides | null | undefined; aroundLatLng?: string | undefined; aroundRadius?: AroundRadiusUnion | null | undefined; aroundPrecision?: AroundPrecisionUnion | null | undefined; minimumAroundRadius?: number | undefined; insideBoundingBox?: InsideBoundingBoxUnion | null | undefined; insidePolygon?: InsidePolygonUnion | null | undefined; }; type AgentCompletionAlgoliaParams = { mcpServers?: { [key: string]: { [key: string]: { [key: string]: string; }; }; } | undefined; searchParameters?: { [key: string]: SearchParametersOverrides; } | null | undefined; /** * Per-request override for the Algolia Search tool\'s indices, honored only when the tool is configured with `mode=\"dynamic\"`. A list of index names; the API looks up each name in the agent\'s static `tool.indices` and reuses that entry, including its description and access-control fields. A name the agent configuration does not list is rejected with HTTP 422 (`index_not_listed_on_tool`) unless the tool sets `allowUnlistedIndices`, in which case the API synthesizes a minimal entry carrying the index name only. Capped at 10 entries. Sending this field against an agent whose tool is in `mode=\"static\"` (the default) is rejected with HTTP 422 — change the tool\'s `mode` in the agent configuration first. Defaults to `null`, which preserves the existing static behavior. */ indices?: Array | undefined; }; /** * Dynamic configuration for testing agents. */ type AgentTestConfiguration = { id?: string | undefined; providerId?: string | undefined; model?: string | undefined; instructions: string; systemPrompt?: string | undefined; config: { [key: string]: any; }; tools: Array; }; /** * Request model for creating a completion for an assistant. */ type AgentCompletionRequest = { configuration?: AgentTestConfiguration | undefined; messages?: MessagesUnion | undefined; /** * Optional conversation id. */ id?: string | undefined; algolia?: AgentCompletionAlgoliaParams | undefined; /** * Approval decisions for pending tool calls keyed by toolCallId. */ toolApprovals?: Record | undefined; }; type StatusEnum = 'resolved' | 'cancelled'; /** * A response to an interrupt emitted by a preceding AG-UI run. */ type AguiResume = { interruptId: string; status: StatusEnum; payload?: { [key: string]: any; } | undefined; }; type ForwardedProps = { algolia?: AgentCompletionAlgoliaParams | undefined; toolApprovals?: { [key: string]: { [key: string]: any; }; } | undefined; configuration?: AgentTestConfiguration | undefined; }; type ReasoningPartAGUI = { type: string; content: string; stepId?: string | undefined; }; type TextPartAGUI = { type: string; content: string; }; type ToolApprovalAGUI = { id: string; needsApproval: boolean; approved?: boolean | undefined; }; type ToolCallPartAGUI = { id: string; type: string; name: string; arguments: string; state: string; output?: { [key: string]: any; } | undefined; approval?: ToolApprovalAGUI | undefined; }; type ToolCallResultPartAGUI = { toolCallId: string; state: string; type: string; content: string; error?: string | undefined; }; type MessagePartAssistantMessageAGUI = TextPartAGUI | ReasoningPartAGUI | ToolCallPartAGUI | ToolCallResultPartAGUI; type FunctionCallAGUI = { name: string; arguments: string; }; type ToolCallAGUI = { id: string; type?: string | undefined; _function: FunctionCallAGUI; encryptedValue?: string | undefined; }; /** * An official AG-UI assistant message or a TanStack ``UIMessage`` extension. Standard AG-UI represents text through ``content`` and tool calls through ``toolCalls``. TanStack sends those fields alongside its authoritative ``parts`` array. A populated ``parts`` array takes precedence during conversion, preventing the redundant fields from duplicating history. Unknown vendor fields are intentionally ignored, matching the other AG-UI message variants; TanStack, for example, attaches its own ``metadata`` object. */ type AssistantMessageAGUI = { id: string; role: string; content?: string | undefined; name?: string | undefined; toolCalls?: Array | null | undefined; encryptedContent?: string | undefined; parts?: Array | undefined; createdAt?: string | undefined; }; type ReasoningMessageAGUI = { id: string; role: string; content: string; encryptedValue?: string | undefined; }; type ToolMessageAGUI = { id: string; role: string; content: string; toolCallId: string; error?: string | undefined; encryptedValue?: string | undefined; }; type UserMessageMetadataAGUI = { turnContext?: { [key: string]: any; } | undefined; }; type UserMessageAGUI = { id: string; role: string; parts?: Array | null | undefined; createdAt?: string | undefined; content: string; metadata?: UserMessageMetadataAGUI | undefined; }; type ItemsUnionAguiCompletionRequest = UserMessageAGUI | AssistantMessageAGUI | ToolMessageAGUI | ReasoningMessageAGUI; type AguiCompletionRequest = { /** * Conversation (thread) id. */ threadId: string; /** * Identifier for the current AG-UI run. */ runId: string; parentRunId?: string | undefined; messages: Array; forwardedProps?: ForwardedProps | undefined; resume?: Array | null | undefined; }; type AgentCompletionRequestUnion = AgentCompletionRequest | AguiCompletionRequest; type AgentConfigUpdate = { name?: string | null | undefined; description?: string | null | undefined; providerId?: string | null | undefined; model?: string | null | undefined; /** * The agent prompt: defines the agent\'s role, tone, and goals. Guides how it answers using the provided context. Corresponds to the \'Agent prompt\' field in the dashboard. */ instructions?: string | null | undefined; /** * The system prompt: defines system-level rules and constraints. Guides how the agent uses tools, features, and generates context. Prepended before `instructions` in the final prompt sent to the LLM. Typically injected by an agent template — modify with caution, as changes may affect behavior, tool usage, or response accuracy. Corresponds to the \'System prompt\' field in the dashboard. */ systemPrompt?: string | null | undefined; config?: { [key: string]: any; } | null | undefined; tools?: Array | null | undefined; templateType?: string | null | undefined; }; /** * Request body for bulk delete by IDs. */ type AllowedDomainBulkDelete = { /** * IDs of allowed domain records to delete. */ domainIds: Array; }; /** * Request body for bulk insert. */ type AllowedDomainBulkInsert = { /** * List of domain patterns to add. */ domains: Array; }; /** * Request body to add a single allowed domain. */ type AllowedDomainCreate = { /** * Domain or pattern, e.g. https://app.example.com or *.example.com. */ domain: string; }; /** * Support Compatibility modes for the completion API. */ type CompatibilityMode = 'ai-sdk-4' | 'ai-sdk-5' | 'ag-ui'; type ProviderInputNullable = OpenAIProviderInput | AzureOpenAIProviderInput | OpenAICompatibleProviderInput | BaseProviderInput | AnthropicProviderInput | XAIProviderInput; type ProviderAuthenticationPatch = { name?: string | null | undefined; input?: ProviderInputNullable | null | undefined; }; /** * Secret key patch payload. */ type SecretKeyPatch = { /** * The new name of the secret key. */ name?: string | null | undefined; /** * Updated list of agent IDs this secret key is associated with. */ agentIds?: Array | null | undefined; }; /** * Supported task behaviors used for default task resolution. */ type TaskKind = 'prompt_suggestions'; /** * Strict request body with a task selector and `input`. Unknown top-level fields are rejected so clients cannot pass trusted configuration fields (prompts, schemas, providers, models, generation settings) at runtime. */ type TaskRequest = { /** * ID of the configured task to run. */ task?: string | undefined; kind?: TaskKind | undefined; /** * Arbitrary JSON input passed to the task as data. */ input: { [key: string]: any; }; configuration?: AgentTestConfiguration | undefined; }; /** * Properties for the `bulkCreateAllowedDomains` method. */ type BulkCreateAllowedDomainsProps = { /** * The agentId. */ agentId: string; allowedDomainBulkInsert: AllowedDomainBulkInsert; }; /** * Properties for the `bulkDeleteAllowedDomains` method. */ type BulkDeleteAllowedDomainsProps = { /** * The agentId. */ agentId: string; allowedDomainBulkDelete: AllowedDomainBulkDelete; }; /** * Properties for the `createAgentAllowedDomain` method. */ type CreateAgentAllowedDomainProps = { /** * The agentId. */ agentId: string; allowedDomainCreate: AllowedDomainCreate; }; /** * Properties for the `createAgentCompletion` method. */ type CreateAgentCompletionProps = { /** * The agentId. */ agentId: string; /** * Compatibility mode for the completion API. */ compatibilityMode: CompatibilityMode; agentCompletionRequest: AgentCompletionRequestUnion; /** * Whether to stream the response or not. */ stream?: boolean | undefined; /** * Use cached responses if available. */ cache?: boolean | undefined; /** * Set to false to disable memory (enabled by default). */ memory?: boolean | undefined; /** * Set to false to skip analytics for this completion (default: true). Disables Agent Studio BigQuery analytics, Algolia search analytics, click analytics, and query-suggestions training. Useful for offline-eval workflows. */ analytics?: boolean | undefined; /** * The X-Algolia-Secure-User-Token. */ xAlgoliaSecureUserToken?: string | undefined; }; /** * Properties for the `createAgentTask` method. */ type CreateAgentTaskProps = { /** * The agentId. */ agentId: string; taskRequest: TaskRequest; /** * Whether to stream the response or not. */ stream?: boolean | undefined; /** * Use cached responses if available. */ cache?: boolean | undefined; /** * Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. */ analytics?: boolean | undefined; }; /** * Properties for the `customDelete` method. */ type CustomDeleteProps = { /** * Path of the endpoint, for example `1/newFeature`. */ path: string; /** * Query parameters to apply to the current query. */ parameters?: { [key: string]: any; } | undefined; }; /** * Properties for the `customGet` method. */ type CustomGetProps = { /** * Path of the endpoint, for example `1/newFeature`. */ path: string; /** * Query parameters to apply to the current query. */ parameters?: { [key: string]: any; } | undefined; }; /** * Properties for the `customPost` method. */ type CustomPostProps = { /** * Path of the endpoint, for example `1/newFeature`. */ path: string; /** * Query parameters to apply to the current query. */ parameters?: { [key: string]: any; } | undefined; /** * Parameters to send with the custom request. */ body?: Record | undefined; }; /** * Properties for the `customPut` method. */ type CustomPutProps = { /** * Path of the endpoint, for example `1/newFeature`. */ path: string; /** * Query parameters to apply to the current query. */ parameters?: { [key: string]: any; } | undefined; /** * Parameters to send with the custom request. */ body?: Record | undefined; }; /** * Properties for the `deleteAgent` method. */ type DeleteAgentProps = { /** * The agentId. */ agentId: string; }; /** * Properties for the `deleteAgentConversations` method. */ type DeleteAgentConversationsProps = { /** * The agentId. */ agentId: string; /** * Filter conversations created after this date (format: YYYY-MM-DD). */ startDate?: string | undefined; /** * Filter conversations created before this date (format: YYYY-MM-DD). */ endDate?: string | undefined; }; /** * Properties for the `deleteAllowedDomain` method. */ type DeleteAllowedDomainProps = { /** * The domainId. */ domainId: string; /** * The agentId. */ agentId: string; }; /** * Properties for the `deleteConversation` method. */ type DeleteConversationProps = { /** * The conversationId. */ conversationId: string; /** * The agentId. */ agentId: string; }; /** * Properties for the `deleteProvider` method. */ type DeleteProviderProps = { /** * The providerId. */ providerId: string; }; /** * Properties for the `deleteSecretKey` method. */ type DeleteSecretKeyProps = { /** * The secretKeyId. */ secretKeyId: string; }; /** * Properties for the `deleteUserData` method. */ type DeleteUserDataProps = { /** * The userToken. */ userToken: string; }; /** * Properties for the `exportConversations` method. */ type ExportConversationsProps = { /** * The agentId. */ agentId: string; /** * Filter conversations created after this date (format: YYYY-MM-DD). */ startDate?: string | undefined; /** * Filter conversations created before this date (format: YYYY-MM-DD). */ endDate?: string | undefined; }; /** * Properties for the `getAgent` method. */ type GetAgentProps = { /** * The agentId. */ agentId: string; }; /** * Properties for the `getAllowedDomain` method. */ type GetAllowedDomainProps = { /** * The domainId. */ domainId: string; /** * The agentId. */ agentId: string; }; /** * Properties for the `getConversation` method. */ type GetConversationProps = { /** * The conversationId. */ conversationId: string; /** * The agentId. */ agentId: string; /** * Include feedback for the conversation. */ includeFeedback?: boolean | undefined; /** * Include Insights events attributed to each assistant message. */ includeMessageEvents?: boolean | undefined; /** * Include outcome signals (hasView, hasClick, hasConversion) for the conversation. */ includeImpactAnalytics?: boolean | undefined; /** * The X-Algolia-Secure-User-Token. */ xAlgoliaSecureUserToken?: string | undefined; }; /** * Properties for the `getProvider` method. */ type GetProviderProps = { /** * The providerId. */ providerId: string; }; /** * Properties for the `getSecretKey` method. */ type GetSecretKeyProps = { /** * The secretKeyId. */ secretKeyId: string; }; /** * Properties for the `getUserData` method. */ type GetUserDataProps = { /** * The userToken. */ userToken: string; }; /** * Properties for the `invalidateAgentCache` method. */ type InvalidateAgentCacheProps = { /** * The agentId. */ agentId: string; /** * Delete entries strictly before this date (exclusive, YYYY-MM-DD). */ before?: string | undefined; }; /** * Properties for the `listAgentAllowedDomains` method. */ type ListAgentAllowedDomainsProps = { /** * The agentId. */ agentId: string; }; /** * Properties for the `listAgentConversations` method. */ type ListAgentConversationsProps = { /** * The agentId. */ agentId: string; /** * Filter conversations created after this date (format: YYYY-MM-DD). */ startDate?: string | undefined; /** * Filter conversations created before this date (format: YYYY-MM-DD). */ endDate?: string | undefined; /** * Include feedback per conversation. */ includeFeedback?: boolean | undefined; /** * Filter by feedback value (requires includeFeedback=true). */ feedbackVote?: number | undefined; /** * Page number. */ page?: number | undefined; /** * Items per page. */ limit?: number | undefined; /** * Include impact analytics (hasView, hasClick, hasConversion) per conversation. */ includeImpactAnalytics?: boolean | undefined; /** * Filter by conversations with at least one item click. */ clicked?: boolean | undefined; /** * Filter by conversations with at least one conversion. */ converted?: boolean | undefined; /** * Filter by conversations where the search tool was used. */ hasAlgoliaSearch?: boolean | undefined; /** * The X-Algolia-Secure-User-Token. */ xAlgoliaSecureUserToken?: string | undefined; }; /** * Properties for the `listAgents` method. */ type ListAgentsProps = { /** * Page number. */ page?: number | undefined; /** * Items per page. */ limit?: number | undefined; /** * Filter by provider id. */ providerId?: string | undefined; }; /** * Properties for the `listProviderModels` method. */ type ListProviderModelsProps = { /** * The providerId. */ providerId: string; }; /** * Properties for the `listProviders` method. */ type ListProvidersProps = { /** * Page number. */ page?: number | undefined; /** * Items per page. */ limit?: number | undefined; }; /** * Properties for the `listSecretKeys` method. */ type ListSecretKeysProps = { /** * Page number. */ page?: number | undefined; /** * Items per page. */ limit?: number | undefined; }; /** * Properties for the `publishAgent` method. */ type PublishAgentProps = { /** * The agentId. */ agentId: string; }; /** * Properties for the `unpublishAgent` method. */ type UnpublishAgentProps = { /** * The agentId. */ agentId: string; }; /** * Properties for the `updateAgent` method. */ type UpdateAgentProps = { /** * The agentId. */ agentId: string; agentConfigUpdate: AgentConfigUpdate; }; /** * Properties for the `updateProvider` method. */ type UpdateProviderProps = { /** * The providerId. */ providerId: string; providerAuthenticationPatch: ProviderAuthenticationPatch; }; /** * Properties for the `updateSecretKey` method. */ type UpdateSecretKeyProps = { /** * The secretKeyId. */ secretKeyId: string; secretKeyPatch: SecretKeyPatch; }; type AgentStudioNodeHelpers = { forgeSecuredUserToken: (opts: { secretKey: string; secretKeyId: string; userId: string; expiresIn?: number; }) => string; }; declare const apiClientVersion = "1.6.0"; declare function createAgentStudioClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): { transporter: _algolia_client_common.TransporterWithHttpInfo; /** * The `appId` currently in use. */ appId: string; /** * The `apiKey` currently in use. */ apiKey: string; /** * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise; /** * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system. */ readonly _ua: string; /** * Adds a `segment` to the `x-algolia-agent` sent with every requests. * * @param segment - The algolia agent (user-agent) segment to add. * @param version - The version of the agent. */ addAlgoliaAgent(segment: string, version?: string | undefined): void; /** * Helper method to switch the API key used to authenticate the requests. * * @param params - Method params. * @param params.apiKey - The new API Key to use. */ setClientApiKey({ apiKey }: { apiKey: string; }): void; /** * Add multiple allowed domain patterns. Duplicates are skipped. * * Required API Key ACLs: * - editSettings * @param bulkCreateAllowedDomains - The bulkCreateAllowedDomains object. * @param bulkCreateAllowedDomains.agentId - The agentId. * @param bulkCreateAllowedDomains.allowedDomainBulkInsert - The allowedDomainBulkInsert object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ bulkCreateAllowedDomains({ agentId, allowedDomainBulkInsert }: BulkCreateAllowedDomainsProps, requestOptions?: RequestOptions): Promise; /** * Add multiple allowed domain patterns. Duplicates are skipped. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param bulkCreateAllowedDomains - The bulkCreateAllowedDomains object. * @param bulkCreateAllowedDomains.agentId - The agentId. * @param bulkCreateAllowedDomains.allowedDomainBulkInsert - The allowedDomainBulkInsert object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see bulkCreateAllowedDomains for the plain version. */ bulkCreateAllowedDomainsWithHTTPInfo({ agentId, allowedDomainBulkInsert }: BulkCreateAllowedDomainsProps, requestOptions?: RequestOptions): Promise>; /** * Delete allowed domains by id list. * * Required API Key ACLs: * - editSettings * @param bulkDeleteAllowedDomains - The bulkDeleteAllowedDomains object. * @param bulkDeleteAllowedDomains.agentId - The agentId. * @param bulkDeleteAllowedDomains.allowedDomainBulkDelete - The allowedDomainBulkDelete object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ bulkDeleteAllowedDomains({ agentId, allowedDomainBulkDelete }: BulkDeleteAllowedDomainsProps, requestOptions?: RequestOptions): Promise; /** * Delete allowed domains by id list. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param bulkDeleteAllowedDomains - The bulkDeleteAllowedDomains object. * @param bulkDeleteAllowedDomains.agentId - The agentId. * @param bulkDeleteAllowedDomains.allowedDomainBulkDelete - The allowedDomainBulkDelete object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see bulkDeleteAllowedDomains for the plain version. */ bulkDeleteAllowedDomainsWithHTTPInfo({ agentId, allowedDomainBulkDelete }: BulkDeleteAllowedDomainsProps, requestOptions?: RequestOptions): Promise>; /** * Summarize the older part of a conversation into a single user message via the caller\'s LLM. Everything except the trailing `keepLastMessages` messages is summarized; the summary is returned as a user-role message followed by the kept tail verbatim. Your provider runs the summary, so the provider adds the cost to your account. A conversation too large for the summarizer\'s context window is split into chunks that each fit, summarized concurrently, then merged in a reduce pass - so payload size alone does not fail the request. When the conversation still cannot be summarized (it needs more chunks than the server allows, or the chunk summaries will not converge), the response is a `400`, not a `500`. Two optional controls shape the output. `instructions` adds caller guidance inside the server-owned prompt frame, so it steers the summary without the model echoing the wording back. `targetTokensEstimate` sets a desired summary size, translated into word-count guidance. The `compaction` block reports what happened: `compacted` is `false` when the payload passed through untouched (nothing older than the kept tail), alongside chunk/pass counts and the summarizer\'s own token usage. * * Required API Key ACLs: * - search * @param contextCompactRequest - The contextCompactRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ compactContext(contextCompactRequest: ContextCompactRequest, requestOptions?: RequestOptions): Promise; /** * Summarize the older part of a conversation into a single user message via the caller\'s LLM. Everything except the trailing `keepLastMessages` messages is summarized; the summary is returned as a user-role message followed by the kept tail verbatim. Your provider runs the summary, so the provider adds the cost to your account. A conversation too large for the summarizer\'s context window is split into chunks that each fit, summarized concurrently, then merged in a reduce pass - so payload size alone does not fail the request. When the conversation still cannot be summarized (it needs more chunks than the server allows, or the chunk summaries will not converge), the response is a `400`, not a `500`. Two optional controls shape the output. `instructions` adds caller guidance inside the server-owned prompt frame, so it steers the summary without the model echoing the wording back. `targetTokensEstimate` sets a desired summary size, translated into word-count guidance. The `compaction` block reports what happened: `compacted` is `false` when the payload passed through untouched (nothing older than the kept tail), alongside chunk/pass counts and the summarizer\'s own token usage. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - search * @param contextCompactRequest - The contextCompactRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see compactContext for the plain version. */ compactContextWithHTTPInfo(contextCompactRequest: ContextCompactRequest, requestOptions?: RequestOptions): Promise>; /** * Create a new agent. * * Required API Key ACLs: * - editSettings * @param agentConfigCreate - The agentConfigCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createAgent(agentConfigCreate: AgentConfigCreate, requestOptions?: RequestOptions): Promise; /** * Create a new agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param agentConfigCreate - The agentConfigCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createAgent for the plain version. */ createAgentWithHTTPInfo(agentConfigCreate: AgentConfigCreate, requestOptions?: RequestOptions): Promise>; /** * Add a single allowed domain pattern (e.g. https://app.example.com or *.example.com). * * Required API Key ACLs: * - editSettings * @param createAgentAllowedDomain - The createAgentAllowedDomain object. * @param createAgentAllowedDomain.agentId - The agentId. * @param createAgentAllowedDomain.allowedDomainCreate - The allowedDomainCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createAgentAllowedDomain({ agentId, allowedDomainCreate }: CreateAgentAllowedDomainProps, requestOptions?: RequestOptions): Promise; /** * Add a single allowed domain pattern (e.g. https://app.example.com or *.example.com). * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param createAgentAllowedDomain - The createAgentAllowedDomain object. * @param createAgentAllowedDomain.agentId - The agentId. * @param createAgentAllowedDomain.allowedDomainCreate - The allowedDomainCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createAgentAllowedDomain for the plain version. */ createAgentAllowedDomainWithHTTPInfo({ agentId, allowedDomainCreate }: CreateAgentAllowedDomainProps, requestOptions?: RequestOptions): Promise>; /** * Create a completion for the specified agent. This endpoint handles two types of requests: 1. Normal completion request: User message -> Agent response 2. Tool approval response: User approval -> Execute tool -> Agent response Tool Approval Flow (for MCP tools with requiresApproval: true): - Request 1: User sends message -> Agent requests tool call -> Return approval request - Request 2: User approves -> Execute tool -> Agent continues with result. * * Required API Key ACLs: * - search * @param createAgentCompletion - The createAgentCompletion object. * @param createAgentCompletion.agentId - The agentId. * @param createAgentCompletion.compatibilityMode - Compatibility mode for the completion API. * @param createAgentCompletion.agentCompletionRequest - The agentCompletionRequest object. * @param createAgentCompletion.stream - Whether to stream the response or not. * @param createAgentCompletion.cache - Use cached responses if available. * @param createAgentCompletion.memory - Set to false to disable memory (enabled by default). * @param createAgentCompletion.analytics - Set to false to skip analytics for this completion (default: true). Disables Agent Studio BigQuery analytics, Algolia search analytics, click analytics, and query-suggestions training. Useful for offline-eval workflows. * @param createAgentCompletion.xAlgoliaSecureUserToken - The X-Algolia-Secure-User-Token. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createAgentCompletion({ agentId, compatibilityMode, agentCompletionRequest, stream, cache, memory, analytics, xAlgoliaSecureUserToken, }: CreateAgentCompletionProps, requestOptions?: RequestOptions): Promise<{ [key: string]: any; }>; /** * Create a completion for the specified agent. This endpoint handles two types of requests: 1. Normal completion request: User message -> Agent response 2. Tool approval response: User approval -> Execute tool -> Agent response Tool Approval Flow (for MCP tools with requiresApproval: true): - Request 1: User sends message -> Agent requests tool call -> Return approval request - Request 2: User approves -> Execute tool -> Agent continues with result. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - search * @param createAgentCompletion - The createAgentCompletion object. * @param createAgentCompletion.agentId - The agentId. * @param createAgentCompletion.compatibilityMode - Compatibility mode for the completion API. * @param createAgentCompletion.agentCompletionRequest - The agentCompletionRequest object. * @param createAgentCompletion.stream - Whether to stream the response or not. * @param createAgentCompletion.cache - Use cached responses if available. * @param createAgentCompletion.memory - Set to false to disable memory (enabled by default). * @param createAgentCompletion.analytics - Set to false to skip analytics for this completion (default: true). Disables Agent Studio BigQuery analytics, Algolia search analytics, click analytics, and query-suggestions training. Useful for offline-eval workflows. * @param createAgentCompletion.xAlgoliaSecureUserToken - The X-Algolia-Secure-User-Token. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createAgentCompletion for the plain version. */ createAgentCompletionWithHTTPInfo({ agentId, compatibilityMode, agentCompletionRequest, stream, cache, memory, analytics, xAlgoliaSecureUserToken, }: CreateAgentCompletionProps, requestOptions?: RequestOptions): Promise>; /** * Create a completion for the specified agent. This endpoint handles two types of requests: 1. Normal completion request: User message -> Agent response 2. Tool approval response: User approval -> Execute tool -> Agent response Tool Approval Flow (for MCP tools with requiresApproval: true): - Request 1: User sends message -> Agent requests tool call -> Return approval request - Request 2: User approves -> Execute tool -> Agent continues with result. (raw streaming version). * * Yields raw {@link ServerSentEvent} objects. Each event's `data` field contains a JSON-encoded `{ [key: string]: any; }` string. * * @see createAgentCompletionStream for the parsed variant. * @see createAgentCompletion for the non-streaming version. */ createAgentCompletionStreamRaw({ agentId, compatibilityMode, agentCompletionRequest, stream, cache, memory, analytics, xAlgoliaSecureUserToken, }: CreateAgentCompletionProps, requestOptions?: RequestOptions): AsyncGenerator; /** * Create a completion for the specified agent. This endpoint handles two types of requests: 1. Normal completion request: User message -> Agent response 2. Tool approval response: User approval -> Execute tool -> Agent response Tool Approval Flow (for MCP tools with requiresApproval: true): - Request 1: User sends message -> Agent requests tool call -> Return approval request - Request 2: User approves -> Execute tool -> Agent continues with result. (streaming version). * * Yields {@link StreamEvent} objects wrapping parsed `{ [key: string]: any; }` payloads. * * @see createAgentCompletionStreamRaw for the raw variant. * @see createAgentCompletion for the non-streaming version. */ createAgentCompletionStream({ agentId, compatibilityMode, agentCompletionRequest, stream, cache, memory, analytics, xAlgoliaSecureUserToken, }: CreateAgentCompletionProps, requestOptions?: RequestOptions): AsyncGenerator>; /** * Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself. * * Required API Key ACLs: * - search * @param createAgentTask - The createAgentTask object. * @param createAgentTask.agentId - The agentId. * @param createAgentTask.taskRequest - The taskRequest object. * @param createAgentTask.stream - Whether to stream the response or not. * @param createAgentTask.cache - Use cached responses if available. * @param createAgentTask.analytics - Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createAgentTask({ agentId, taskRequest, stream, cache, analytics }: CreateAgentTaskProps, requestOptions?: RequestOptions): Promise; /** * Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - search * @param createAgentTask - The createAgentTask object. * @param createAgentTask.agentId - The agentId. * @param createAgentTask.taskRequest - The taskRequest object. * @param createAgentTask.stream - Whether to stream the response or not. * @param createAgentTask.cache - Use cached responses if available. * @param createAgentTask.analytics - Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createAgentTask for the plain version. */ createAgentTaskWithHTTPInfo({ agentId, taskRequest, stream, cache, analytics }: CreateAgentTaskProps, requestOptions?: RequestOptions): Promise>; /** * Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself. (raw streaming version). * * Yields raw {@link ServerSentEvent} objects. Each event's `data` field contains a JSON-encoded `TaskResponse` string. * * @see createAgentTaskStream for the parsed variant. * @see createAgentTask for the non-streaming version. */ createAgentTaskStreamRaw({ agentId, taskRequest, stream, cache, analytics }: CreateAgentTaskProps, requestOptions?: RequestOptions): AsyncGenerator; /** * Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself. (streaming version). * * Yields {@link StreamEvent} objects wrapping parsed `TaskResponse` payloads. * * @see createAgentTaskStreamRaw for the raw variant. * @see createAgentTask for the non-streaming version. */ createAgentTaskStream({ agentId, taskRequest, stream, cache, analytics }: CreateAgentTaskProps, requestOptions?: RequestOptions): AsyncGenerator>; /** * Create new feedback entry. * * Required API Key ACLs: * - search * @param feedbackCreationRequest - The feedbackCreationRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createFeedback(feedbackCreationRequest: FeedbackCreationRequest, requestOptions?: RequestOptions): Promise; /** * Create new feedback entry. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - search * @param feedbackCreationRequest - The feedbackCreationRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createFeedback for the plain version. */ createFeedbackWithHTTPInfo(feedbackCreationRequest: FeedbackCreationRequest, requestOptions?: RequestOptions): Promise>; /** * Create Provider. * * Required API Key ACLs: * - editSettings * @param providerAuthenticationCreate - The providerAuthenticationCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createProvider(providerAuthenticationCreate: ProviderAuthenticationCreate, requestOptions?: RequestOptions): Promise; /** * Create Provider. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param providerAuthenticationCreate - The providerAuthenticationCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createProvider for the plain version. */ createProviderWithHTTPInfo(providerAuthenticationCreate: ProviderAuthenticationCreate, requestOptions?: RequestOptions): Promise>; /** * Create Secret Key. * * Required API Key ACLs: * - admin * @param secretKeyCreate - The secretKeyCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ createSecretKey(secretKeyCreate: SecretKeyCreate, requestOptions?: RequestOptions): Promise; /** * Create Secret Key. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - admin * @param secretKeyCreate - The secretKeyCreate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see createSecretKey for the plain version. */ createSecretKeyWithHTTPInfo(secretKeyCreate: SecretKeyCreate, requestOptions?: RequestOptions): Promise>; /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise>; /** * This method lets you send requests to the Algolia REST API. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * @param customDelete - The customDelete object. * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see customDelete for the plain version. */ customDeleteWithHTTPInfo({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise>>; /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise>; /** * This method lets you send requests to the Algolia REST API. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * @param customGet - The customGet object. * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see customGet for the plain version. */ customGetWithHTTPInfo({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise>>; /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise>; /** * This method lets you send requests to the Algolia REST API. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * @param customPost - The customPost object. * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see customPost for the plain version. */ customPostWithHTTPInfo({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise>>; /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise>; /** * This method lets you send requests to the Algolia REST API. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * @param customPut - The customPut object. * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see customPut for the plain version. */ customPutWithHTTPInfo({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise>>; /** * Delete the specified agent. * * Required API Key ACLs: * - editSettings * @param deleteAgent - The deleteAgent object. * @param deleteAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteAgent({ agentId }: DeleteAgentProps, requestOptions?: RequestOptions): Promise; /** * Delete the specified agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param deleteAgent - The deleteAgent object. * @param deleteAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteAgent for the plain version. */ deleteAgentWithHTTPInfo({ agentId }: DeleteAgentProps, requestOptions?: RequestOptions): Promise>; /** * Deletes the conversations matching the given filters. * * Required API Key ACLs: * - logs * @param deleteAgentConversations - The deleteAgentConversations object. * @param deleteAgentConversations.agentId - The agentId. * @param deleteAgentConversations.startDate - Filter conversations created after this date (format: YYYY-MM-DD). * @param deleteAgentConversations.endDate - Filter conversations created before this date (format: YYYY-MM-DD). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteAgentConversations({ agentId, startDate, endDate }: DeleteAgentConversationsProps, requestOptions?: RequestOptions): Promise; /** * Deletes the conversations matching the given filters. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param deleteAgentConversations - The deleteAgentConversations object. * @param deleteAgentConversations.agentId - The agentId. * @param deleteAgentConversations.startDate - Filter conversations created after this date (format: YYYY-MM-DD). * @param deleteAgentConversations.endDate - Filter conversations created before this date (format: YYYY-MM-DD). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteAgentConversations for the plain version. */ deleteAgentConversationsWithHTTPInfo({ agentId, startDate, endDate }: DeleteAgentConversationsProps, requestOptions?: RequestOptions): Promise>; /** * Remove an allowed domain by id. * * Required API Key ACLs: * - editSettings * @param deleteAllowedDomain - The deleteAllowedDomain object. * @param deleteAllowedDomain.domainId - The domainId. * @param deleteAllowedDomain.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteAllowedDomain({ domainId, agentId }: DeleteAllowedDomainProps, requestOptions?: RequestOptions): Promise; /** * Remove an allowed domain by id. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param deleteAllowedDomain - The deleteAllowedDomain object. * @param deleteAllowedDomain.domainId - The domainId. * @param deleteAllowedDomain.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteAllowedDomain for the plain version. */ deleteAllowedDomainWithHTTPInfo({ domainId, agentId }: DeleteAllowedDomainProps, requestOptions?: RequestOptions): Promise>; /** * Deletes the conversation with the given ID. * * Required API Key ACLs: * - logs * @param deleteConversation - The deleteConversation object. * @param deleteConversation.conversationId - The conversationId. * @param deleteConversation.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteConversation({ conversationId, agentId }: DeleteConversationProps, requestOptions?: RequestOptions): Promise; /** * Deletes the conversation with the given ID. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param deleteConversation - The deleteConversation object. * @param deleteConversation.conversationId - The conversationId. * @param deleteConversation.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteConversation for the plain version. */ deleteConversationWithHTTPInfo({ conversationId, agentId }: DeleteConversationProps, requestOptions?: RequestOptions): Promise>; /** * Delete Provider. * * Required API Key ACLs: * - editSettings * @param deleteProvider - The deleteProvider object. * @param deleteProvider.providerId - The providerId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteProvider({ providerId }: DeleteProviderProps, requestOptions?: RequestOptions): Promise; /** * Delete Provider. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param deleteProvider - The deleteProvider object. * @param deleteProvider.providerId - The providerId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteProvider for the plain version. */ deleteProviderWithHTTPInfo({ providerId }: DeleteProviderProps, requestOptions?: RequestOptions): Promise>; /** * Delete Secret Key. * * Required API Key ACLs: * - admin * @param deleteSecretKey - The deleteSecretKey object. * @param deleteSecretKey.secretKeyId - The secretKeyId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteSecretKey({ secretKeyId }: DeleteSecretKeyProps, requestOptions?: RequestOptions): Promise; /** * Delete Secret Key. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - admin * @param deleteSecretKey - The deleteSecretKey object. * @param deleteSecretKey.secretKeyId - The secretKeyId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteSecretKey for the plain version. */ deleteSecretKeyWithHTTPInfo({ secretKeyId }: DeleteSecretKeyProps, requestOptions?: RequestOptions): Promise>; /** * Permanently deletes all messages for the given user token. Does not delete conversations. * * Required API Key ACLs: * - logs * @param deleteUserData - The deleteUserData object. * @param deleteUserData.userToken - The userToken. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteUserData({ userToken }: DeleteUserDataProps, requestOptions?: RequestOptions): Promise; /** * Permanently deletes all messages for the given user token. Does not delete conversations. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param deleteUserData - The deleteUserData object. * @param deleteUserData.userToken - The userToken. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see deleteUserData for the plain version. */ deleteUserDataWithHTTPInfo({ userToken }: DeleteUserDataProps, requestOptions?: RequestOptions): Promise>; /** * Exports all conversations based on the passed filters. * * Required API Key ACLs: * - logs * @param exportConversations - The exportConversations object. * @param exportConversations.agentId - The agentId. * @param exportConversations.startDate - Filter conversations created after this date (format: YYYY-MM-DD). * @param exportConversations.endDate - Filter conversations created before this date (format: YYYY-MM-DD). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ exportConversations({ agentId, startDate, endDate }: ExportConversationsProps, requestOptions?: RequestOptions): Promise>; /** * Exports all conversations based on the passed filters. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param exportConversations - The exportConversations object. * @param exportConversations.agentId - The agentId. * @param exportConversations.startDate - Filter conversations created after this date (format: YYYY-MM-DD). * @param exportConversations.endDate - Filter conversations created before this date (format: YYYY-MM-DD). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see exportConversations for the plain version. */ exportConversationsWithHTTPInfo({ agentId, startDate, endDate }: ExportConversationsProps, requestOptions?: RequestOptions): Promise>>; /** * Retrieve details of the specified agent. * * Required API Key ACLs: * - settings * @param getAgent - The getAgent object. * @param getAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getAgent({ agentId }: GetAgentProps, requestOptions?: RequestOptions): Promise; /** * Retrieve details of the specified agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param getAgent - The getAgent object. * @param getAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getAgent for the plain version. */ getAgentWithHTTPInfo({ agentId }: GetAgentProps, requestOptions?: RequestOptions): Promise>; /** * Get a single allowed domain by id. * * Required API Key ACLs: * - settings * @param getAllowedDomain - The getAllowedDomain object. * @param getAllowedDomain.domainId - The domainId. * @param getAllowedDomain.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getAllowedDomain({ domainId, agentId }: GetAllowedDomainProps, requestOptions?: RequestOptions): Promise; /** * Get a single allowed domain by id. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param getAllowedDomain - The getAllowedDomain object. * @param getAllowedDomain.domainId - The domainId. * @param getAllowedDomain.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getAllowedDomain for the plain version. */ getAllowedDomainWithHTTPInfo({ domainId, agentId }: GetAllowedDomainProps, requestOptions?: RequestOptions): Promise>; /** * Get Configuration. * * Required API Key ACLs: * - logs * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getConfiguration(requestOptions?: RequestOptions | undefined): Promise; /** * Get Configuration. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getConfiguration for the plain version. */ getConfigurationWithHTTPInfo(requestOptions?: RequestOptions | undefined): Promise>; /** * Retrieves the conversation and its messages for the given ID. * * Required API Key ACLs: * - logs * @param getConversation - The getConversation object. * @param getConversation.conversationId - The conversationId. * @param getConversation.agentId - The agentId. * @param getConversation.includeFeedback - Include feedback for the conversation. * @param getConversation.includeMessageEvents - Include Insights events attributed to each assistant message. * @param getConversation.includeImpactAnalytics - Include outcome signals (hasView, hasClick, hasConversion) for the conversation. * @param getConversation.xAlgoliaSecureUserToken - The X-Algolia-Secure-User-Token. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getConversation({ conversationId, agentId, includeFeedback, includeMessageEvents, includeImpactAnalytics, xAlgoliaSecureUserToken, }: GetConversationProps, requestOptions?: RequestOptions): Promise; /** * Retrieves the conversation and its messages for the given ID. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param getConversation - The getConversation object. * @param getConversation.conversationId - The conversationId. * @param getConversation.agentId - The agentId. * @param getConversation.includeFeedback - Include feedback for the conversation. * @param getConversation.includeMessageEvents - Include Insights events attributed to each assistant message. * @param getConversation.includeImpactAnalytics - Include outcome signals (hasView, hasClick, hasConversion) for the conversation. * @param getConversation.xAlgoliaSecureUserToken - The X-Algolia-Secure-User-Token. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getConversation for the plain version. */ getConversationWithHTTPInfo({ conversationId, agentId, includeFeedback, includeMessageEvents, includeImpactAnalytics, xAlgoliaSecureUserToken, }: GetConversationProps, requestOptions?: RequestOptions): Promise>; /** * Get Provider. * * Required API Key ACLs: * - settings * @param getProvider - The getProvider object. * @param getProvider.providerId - The providerId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getProvider({ providerId }: GetProviderProps, requestOptions?: RequestOptions): Promise; /** * Get Provider. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param getProvider - The getProvider object. * @param getProvider.providerId - The providerId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getProvider for the plain version. */ getProviderWithHTTPInfo({ providerId }: GetProviderProps, requestOptions?: RequestOptions): Promise>; /** * Get Secret Key. * * Required API Key ACLs: * - settings * @param getSecretKey - The getSecretKey object. * @param getSecretKey.secretKeyId - The secretKeyId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getSecretKey({ secretKeyId }: GetSecretKeyProps, requestOptions?: RequestOptions): Promise; /** * Get Secret Key. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param getSecretKey - The getSecretKey object. * @param getSecretKey.secretKeyId - The secretKeyId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getSecretKey for the plain version. */ getSecretKeyWithHTTPInfo({ secretKeyId }: GetSecretKeyProps, requestOptions?: RequestOptions): Promise>; /** * Retrieves all memories, conversations and their messages for the given user token. * * Required API Key ACLs: * - logs * @param getUserData - The getUserData object. * @param getUserData.userToken - The userToken. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getUserData({ userToken }: GetUserDataProps, requestOptions?: RequestOptions): Promise; /** * Retrieves all memories, conversations and their messages for the given user token. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param getUserData - The getUserData object. * @param getUserData.userToken - The userToken. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see getUserData for the plain version. */ getUserDataWithHTTPInfo({ userToken }: GetUserDataProps, requestOptions?: RequestOptions): Promise>; /** * Invalidate cached completions and task outputs for this agent. Filter with `before` (exclusive). * * Required API Key ACLs: * - editSettings * @param invalidateAgentCache - The invalidateAgentCache object. * @param invalidateAgentCache.agentId - The agentId. * @param invalidateAgentCache.before - Delete entries strictly before this date (exclusive, YYYY-MM-DD). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ invalidateAgentCache({ agentId, before }: InvalidateAgentCacheProps, requestOptions?: RequestOptions): Promise; /** * Invalidate cached completions and task outputs for this agent. Filter with `before` (exclusive). * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param invalidateAgentCache - The invalidateAgentCache object. * @param invalidateAgentCache.agentId - The agentId. * @param invalidateAgentCache.before - Delete entries strictly before this date (exclusive, YYYY-MM-DD). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see invalidateAgentCache for the plain version. */ invalidateAgentCacheWithHTTPInfo({ agentId, before }: InvalidateAgentCacheProps, requestOptions?: RequestOptions): Promise>; /** * List all allowed domain patterns for this agent. * * Required API Key ACLs: * - settings * @param listAgentAllowedDomains - The listAgentAllowedDomains object. * @param listAgentAllowedDomains.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listAgentAllowedDomains({ agentId }: ListAgentAllowedDomainsProps, requestOptions?: RequestOptions): Promise; /** * List all allowed domain patterns for this agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param listAgentAllowedDomains - The listAgentAllowedDomains object. * @param listAgentAllowedDomains.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listAgentAllowedDomains for the plain version. */ listAgentAllowedDomainsWithHTTPInfo({ agentId }: ListAgentAllowedDomainsProps, requestOptions?: RequestOptions): Promise>; /** * Retrieves the conversations for the given agent ID. * * Required API Key ACLs: * - logs * @param listAgentConversations - The listAgentConversations object. * @param listAgentConversations.agentId - The agentId. * @param listAgentConversations.startDate - Filter conversations created after this date (format: YYYY-MM-DD). * @param listAgentConversations.endDate - Filter conversations created before this date (format: YYYY-MM-DD). * @param listAgentConversations.includeFeedback - Include feedback per conversation. * @param listAgentConversations.feedbackVote - Filter by feedback value (requires includeFeedback=true). * @param listAgentConversations.page - Page number. * @param listAgentConversations.limit - Items per page. * @param listAgentConversations.includeImpactAnalytics - Include impact analytics (hasView, hasClick, hasConversion) per conversation. * @param listAgentConversations.clicked - Filter by conversations with at least one item click. * @param listAgentConversations.converted - Filter by conversations with at least one conversion. * @param listAgentConversations.hasAlgoliaSearch - Filter by conversations where the search tool was used. * @param listAgentConversations.xAlgoliaSecureUserToken - The X-Algolia-Secure-User-Token. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listAgentConversations({ agentId, startDate, endDate, includeFeedback, feedbackVote, page, limit, includeImpactAnalytics, clicked, converted, hasAlgoliaSearch, xAlgoliaSecureUserToken, }: ListAgentConversationsProps, requestOptions?: RequestOptions): Promise; /** * Retrieves the conversations for the given agent ID. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param listAgentConversations - The listAgentConversations object. * @param listAgentConversations.agentId - The agentId. * @param listAgentConversations.startDate - Filter conversations created after this date (format: YYYY-MM-DD). * @param listAgentConversations.endDate - Filter conversations created before this date (format: YYYY-MM-DD). * @param listAgentConversations.includeFeedback - Include feedback per conversation. * @param listAgentConversations.feedbackVote - Filter by feedback value (requires includeFeedback=true). * @param listAgentConversations.page - Page number. * @param listAgentConversations.limit - Items per page. * @param listAgentConversations.includeImpactAnalytics - Include impact analytics (hasView, hasClick, hasConversion) per conversation. * @param listAgentConversations.clicked - Filter by conversations with at least one item click. * @param listAgentConversations.converted - Filter by conversations with at least one conversion. * @param listAgentConversations.hasAlgoliaSearch - Filter by conversations where the search tool was used. * @param listAgentConversations.xAlgoliaSecureUserToken - The X-Algolia-Secure-User-Token. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listAgentConversations for the plain version. */ listAgentConversationsWithHTTPInfo({ agentId, startDate, endDate, includeFeedback, feedbackVote, page, limit, includeImpactAnalytics, clicked, converted, hasAlgoliaSearch, xAlgoliaSecureUserToken, }: ListAgentConversationsProps, requestOptions?: RequestOptions): Promise>; /** * List all agents with pagination and filtering. * * Required API Key ACLs: * - settings * @param listAgents - The listAgents object. * @param listAgents.page - Page number. * @param listAgents.limit - Items per page. * @param listAgents.providerId - Filter by provider id. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listAgents({ page, limit, providerId }?: ListAgentsProps, requestOptions?: RequestOptions | undefined): Promise; /** * List all agents with pagination and filtering. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param listAgents - The listAgents object. * @param listAgents.page - Page number. * @param listAgents.limit - Items per page. * @param listAgents.providerId - Filter by provider id. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listAgents for the plain version. */ listAgentsWithHTTPInfo({ page, limit, providerId }?: ListAgentsProps, requestOptions?: RequestOptions | undefined): Promise>; /** * Get Provider Models. * * Required API Key ACLs: * - settings * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listModels(requestOptions?: RequestOptions | undefined): Promise<{ [key: string]: Array; }>; /** * Get Provider Models. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listModels for the plain version. */ listModelsWithHTTPInfo(requestOptions?: RequestOptions | undefined): Promise; }>>; /** * Get available models for a specific provider. * * Required API Key ACLs: * - settings * @param listProviderModels - The listProviderModels object. * @param listProviderModels.providerId - The providerId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listProviderModels({ providerId }: ListProviderModelsProps, requestOptions?: RequestOptions): Promise>; /** * Get available models for a specific provider. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param listProviderModels - The listProviderModels object. * @param listProviderModels.providerId - The providerId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listProviderModels for the plain version. */ listProviderModelsWithHTTPInfo({ providerId }: ListProviderModelsProps, requestOptions?: RequestOptions): Promise>>; /** * List Providers. * * Required API Key ACLs: * - settings * @param listProviders - The listProviders object. * @param listProviders.page - Page number. * @param listProviders.limit - Items per page. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listProviders({ page, limit }?: ListProvidersProps, requestOptions?: RequestOptions | undefined): Promise; /** * List Providers. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param listProviders - The listProviders object. * @param listProviders.page - Page number. * @param listProviders.limit - Items per page. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listProviders for the plain version. */ listProvidersWithHTTPInfo({ page, limit }?: ListProvidersProps, requestOptions?: RequestOptions | undefined): Promise>; /** * List Secret Keys. * * Required API Key ACLs: * - settings * @param listSecretKeys - The listSecretKeys object. * @param listSecretKeys.page - Page number. * @param listSecretKeys.limit - Items per page. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listSecretKeys({ page, limit }?: ListSecretKeysProps, requestOptions?: RequestOptions | undefined): Promise; /** * List Secret Keys. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - settings * @param listSecretKeys - The listSecretKeys object. * @param listSecretKeys.page - Page number. * @param listSecretKeys.limit - Items per page. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see listSecretKeys for the plain version. */ listSecretKeysWithHTTPInfo({ page, limit }?: ListSecretKeysProps, requestOptions?: RequestOptions | undefined): Promise>; /** * Publish the specified agent. * * Required API Key ACLs: * - editSettings * @param publishAgent - The publishAgent object. * @param publishAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ publishAgent({ agentId }: PublishAgentProps, requestOptions?: RequestOptions): Promise; /** * Publish the specified agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param publishAgent - The publishAgent object. * @param publishAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see publishAgent for the plain version. */ publishAgentWithHTTPInfo({ agentId }: PublishAgentProps, requestOptions?: RequestOptions): Promise>; /** * Deterministically trim a conversation payload (no LLM calls). Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap \"how big is my context?\" probe (no LLM call, no mutation). * * Required API Key ACLs: * - search * @param contextTrimRequest - The contextTrimRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ trimContext(contextTrimRequest: ContextTrimRequest, requestOptions?: RequestOptions): Promise; /** * Deterministically trim a conversation payload (no LLM calls). Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap \"how big is my context?\" probe (no LLM call, no mutation). * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - search * @param contextTrimRequest - The contextTrimRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see trimContext for the plain version. */ trimContextWithHTTPInfo(contextTrimRequest: ContextTrimRequest, requestOptions?: RequestOptions): Promise>; /** * Unpublish the specified agent. * * Required API Key ACLs: * - editSettings * @param unpublishAgent - The unpublishAgent object. * @param unpublishAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ unpublishAgent({ agentId }: UnpublishAgentProps, requestOptions?: RequestOptions): Promise; /** * Unpublish the specified agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param unpublishAgent - The unpublishAgent object. * @param unpublishAgent.agentId - The agentId. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see unpublishAgent for the plain version. */ unpublishAgentWithHTTPInfo({ agentId }: UnpublishAgentProps, requestOptions?: RequestOptions): Promise>; /** * Update the specified agent. * * Required API Key ACLs: * - editSettings * @param updateAgent - The updateAgent object. * @param updateAgent.agentId - The agentId. * @param updateAgent.agentConfigUpdate - The agentConfigUpdate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ updateAgent({ agentId, agentConfigUpdate }: UpdateAgentProps, requestOptions?: RequestOptions): Promise; /** * Update the specified agent. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param updateAgent - The updateAgent object. * @param updateAgent.agentId - The agentId. * @param updateAgent.agentConfigUpdate - The agentConfigUpdate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see updateAgent for the plain version. */ updateAgentWithHTTPInfo({ agentId, agentConfigUpdate }: UpdateAgentProps, requestOptions?: RequestOptions): Promise>; /** * Patch Configuration. * * Required API Key ACLs: * - logs * @param applicationConfigPatch - The applicationConfigPatch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ updateConfiguration(applicationConfigPatch: ApplicationConfigPatch, requestOptions?: RequestOptions): Promise; /** * Patch Configuration. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - logs * @param applicationConfigPatch - The applicationConfigPatch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see updateConfiguration for the plain version. */ updateConfigurationWithHTTPInfo(applicationConfigPatch: ApplicationConfigPatch, requestOptions?: RequestOptions): Promise>; /** * Update an existing feedback entry. * * Required API Key ACLs: * - search * @param feedbackUpdateRequest - The feedbackUpdateRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ updateFeedback(feedbackUpdateRequest: FeedbackUpdateRequest, requestOptions?: RequestOptions): Promise; /** * Update an existing feedback entry. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - search * @param feedbackUpdateRequest - The feedbackUpdateRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see updateFeedback for the plain version. */ updateFeedbackWithHTTPInfo(feedbackUpdateRequest: FeedbackUpdateRequest, requestOptions?: RequestOptions): Promise>; /** * Update Provider. * * Required API Key ACLs: * - editSettings * @param updateProvider - The updateProvider object. * @param updateProvider.providerId - The providerId. * @param updateProvider.providerAuthenticationPatch - The providerAuthenticationPatch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ updateProvider({ providerId, providerAuthenticationPatch }: UpdateProviderProps, requestOptions?: RequestOptions): Promise; /** * Update Provider. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - editSettings * @param updateProvider - The updateProvider object. * @param updateProvider.providerId - The providerId. * @param updateProvider.providerAuthenticationPatch - The providerAuthenticationPatch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see updateProvider for the plain version. */ updateProviderWithHTTPInfo({ providerId, providerAuthenticationPatch }: UpdateProviderProps, requestOptions?: RequestOptions): Promise>; /** * Patch Secret Key. * * Required API Key ACLs: * - admin * @param updateSecretKey - The updateSecretKey object. * @param updateSecretKey.secretKeyId - The secretKeyId. * @param updateSecretKey.secretKeyPatch - The secretKeyPatch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ updateSecretKey({ secretKeyId, secretKeyPatch }: UpdateSecretKeyProps, requestOptions?: RequestOptions): Promise; /** * Patch Secret Key. * * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call. * * Required API Key ACLs: * - admin * @param updateSecretKey - The updateSecretKey object. * @param updateSecretKey.secretKeyId - The secretKeyId. * @param updateSecretKey.secretKeyPatch - The secretKeyPatch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. * @see updateSecretKey for the plain version. */ updateSecretKeyWithHTTPInfo({ secretKeyId, secretKeyPatch }: UpdateSecretKeyProps, requestOptions?: RequestOptions): Promise>; }; /** * Error. */ type ErrorBase = Record & { message?: string | undefined; }; type LocationItemUnion = string | number; type ValidationError = { loc: Array; msg: string; type: string; }; type HTTPValidationError = { detail?: Array | undefined; }; declare function agentStudioClient(appId: string, apiKey: string, options?: ClientOptions | undefined): AgentStudioClient; type AgentStudioClient = ReturnType; export { type AdvancedSyntaxFeatures, type AgentCompletionAlgoliaParams, type AgentCompletionRequest, type AgentCompletionRequestUnion, type AgentConfigCreate, type AgentConfigUpdate, type AgentStatus, type AgentStudioClient, type AgentStudioNodeHelpers, type AgentTestConfiguration, type AgentWithVersionResponse, type AguiCompletionRequest, type AguiResume, type AlgoliaGroupedResultsCompatToolConfig, type AlgoliaGroupedResultsToolConfig, type AlgoliaRecommendToolConfig, type AlgoliaRecommendToolIndexConfig, type AlgoliaSearchToolConfig, type AlgoliaSearchToolIndexConfig, type AllowedDomainBulkDelete, type AllowedDomainBulkInsert, type AllowedDomainCreate, type AllowedDomainListResponse, type AllowedDomainResponse, type AlternativesAsExact, type AnthropicProviderInput, type ApplicationConfigPatch, type ApplicationConfigResponse, type AroundPrecisionUnion, type AroundRadiusUnion, type AssistantMessageAGUI, type AssistantMessageV4, type AssistantMessageV5, type AssistantPartV4, type AssistantPartV5, type AzureOpenAIProviderInput, type BaseProviderInput, type BooleanParam, type BulkCreateAllowedDomainsProps, type BulkDeleteAllowedDomainsProps, type ClientSideToolConfig, type ClientToolsArgsSchema, type CompactionStats, type CompatibilityMode, type ContextCompactRequest, type ContextResponse, type ContextStats, type ContextTrimRequest, type ConversationBaseResponse, type ConversationFullResponse, type ConversationMetadata, type CreateAgentAllowedDomainProps, type CreateAgentCompletionProps, type CreateAgentTaskProps, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DataGuardrailViolationPartV5, type DataPartV5, type DeleteAgentConversationsProps, type DeleteAgentProps, type DeleteAllowedDomainProps, type DeleteConversationProps, type DeleteProviderProps, type DeleteSecretKeyProps, type DeleteUserDataProps, type DistinctUnion, type Episode, type ErrorBase, type ExactOnSingleWordQuery, type ExportConversationsProps, type FacetFiltersUnion, type FacetFiltersUnionSearchParametersOverrides, type Facets, type FacetsParam, type FacetsUnion, type FeedbackCreationRequest, type FeedbackResponse, type FeedbackUpdateRequest, type ForwardedProps, type FunctionCallAGUI, type GetAgentProps, type GetAllowedDomainProps, type GetConversationProps, type GetProviderProps, type GetSecretKeyProps, type GetUserDataProps, type GuardrailOutcome, type GuardrailViolationDataV5, type HTTPValidationError, type IgnorePluralsUnion, type ImpactAnalytics, type IndexSearchParameters, type InputUnion, type InsideBoundingBoxUnion, type InsidePolygonUnion, type InvalidateAgentCacheProps, type ItemsUnion, type ItemsUnionAguiCompletionRequest, type ListAgentAllowedDomainsProps, type ListAgentConversationsProps, type ListAgentsProps, type ListProviderModelsProps, type ListProvidersProps, type ListSecretKeysProps, type LocationItemUnion, type ManagedProviderResponseInput, type McpServerToolConfig, type McpToolConfig, type MemoryRecord, type MemoryType, type MessageEvent, type MessagePart, type MessagePartAssistantMessageAGUI, type MessageResponse, type MessageRole, type MessageV4, type MessageV5, type MessagesUnion, type ModeEnum, type NumberParam, type NumberParamConstraint, type NumericFiltersUnion, type OneOfEnum, type OpenAICompatibleProviderInput, type OpenAIProviderInput, type OptionalFiltersUnion, type OptionalWordsUnion, type PaginatedAgentsResponse, type PaginatedConversationsResponse, type PaginatedProviderAuthenticationsResponse, type PaginatedSecretKeysResponse, type PaginationMetadata, type ProviderAuthenticationCreate, type ProviderAuthenticationPatch, type ProviderAuthenticationResponse, type ProviderInput, type ProviderInputNullable, type ProviderName, type PublishAgentProps, type QueryType, type ReRankingApplyFilterUnion, type ReasoningMessageAGUI, type ReasoningPart, type ReasoningPartAGUI, type ReasoningPartV4, type ReasoningPartV5, type RemoveStopWordsUnion, type RemoveWordsIfNoResults, type SearchParameters, type SearchParametersOverrides, type SecretKeyCreate, type SecretKeyPatch, type SecretKeyResponse, type StartPart, type StartStepPart, type StatusEnum, type StepStartPartV4, type StepStartPartV5, type StringArrayParam, type StringArrayParamConstraint, type SupportedLanguage, type TagFiltersUnion, type TaskKind, type TaskRequest, type TaskResponse, type TextParam, type TextPart, type TextPartAGUI, type TextPartV4, type TextPartV5, type ToolApprovalAGUI, type ToolApprovalRequestPart, type ToolCallAGUI, type ToolCallPart, type ToolCallPartAGUI, type ToolCallResultPartAGUI, type ToolConfigInput, type ToolConfigOrBooleanUnion, type ToolConfigOutput, type ToolInvocationPartV4, type ToolInvocationV4, type ToolMessageAGUI, type ToolPartV5, type ToolResultOutput, type ToolResultOutputType, type ToolResultPart, type ToolState, type TypoToleranceEnum, type TypoToleranceUnion, type UnknownToolConfig, type UnpublishAgentProps, type UpdateAgentProps, type UpdateProviderProps, type UpdateSecretKeyProps, type UserDataResponse, type UserMessageAGUI, type UserMessageMetadataAGUI, type UserMessageMetadataV5, type UserMessageV4, type UserMessageV5, type ValidationError, type VoteEnum, type XAIProviderInput, agentStudioClient, apiClientVersion };