exa-js 2.28.0 → 2.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import fetch from 'cross-fetch';
1
2
  import { z } from 'zod/v3';
2
3
 
3
4
  /**
@@ -29,7 +30,7 @@ type TransportRequestOptions = {
29
30
  timeout?: number | undefined;
30
31
  };
31
32
  /** Query parameter values the SDK can serialize into a URL. */
32
- type QueryParams$5 = Record<string, string | number | boolean | string[] | undefined>;
33
+ type QueryParams$4 = Record<string, string | number | boolean | string[] | undefined>;
33
34
  /**
34
35
  * Per-call options every API method accepts as its trailing argument.
35
36
  *
@@ -57,7 +58,7 @@ type RequestOptions = TransportRequestOptions & {
57
58
  * `stream`. A parameter set to `undefined` is skipped. A `cursor` given to
58
59
  * a helper that pages through a listing selects its first page only.
59
60
  */
60
- query?: QueryParams$5 | undefined;
61
+ query?: QueryParams$4 | undefined;
61
62
  };
62
63
  /**
63
64
  * Base for the API sub-clients (websets, research, agent, monitors).
@@ -84,6 +85,19 @@ declare abstract class RequestScopedClient {
84
85
  * would replace every later cursor and fetch that page forever.
85
86
  */
86
87
  protected forNextPage(): this;
88
+ /**
89
+ * Yields every item of a cursor-paginated listing. `fetchPage` fetches the
90
+ * page at `cursor` with the view it is given: this one for the first page,
91
+ * `forNextPage()` for the rest. Stops after a page without `hasMore` or
92
+ * without a `nextCursor`.
93
+ */
94
+ protected paginate<T>(firstCursor: string | undefined, fetchPage: (view: this, cursor: string | undefined) => Promise<CursorPage<T>>): AsyncGenerator<T>;
95
+ }
96
+ /** One page of a cursor-paginated listing. */
97
+ interface CursorPage<T> {
98
+ data: T[];
99
+ hasMore: boolean;
100
+ nextCursor?: string | null;
87
101
  }
88
102
 
89
103
  /**
@@ -290,18 +304,18 @@ type AgentCreateOptions<T = Record<string, unknown>> = CreateAgentRunParamsTyped
290
304
  * Base client for the Exa Agent API.
291
305
  */
292
306
 
293
- type QueryParams$4 = Record<string, string | number | boolean | string[] | undefined>;
294
- type RequestBody$3 = Record<string, unknown>;
307
+ type QueryParams$3 = Record<string, string | number | boolean | string[] | undefined>;
308
+ type RequestBody$2 = Record<string, unknown>;
295
309
  declare class AgentBaseClient extends RequestScopedClient {
296
310
  protected client: Exa;
297
311
  constructor(client: Exa);
298
- protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody$3, params?: QueryParams$4, headers?: Record<string, string>): Promise<T>;
312
+ protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody$2, params?: QueryParams$3, headers?: Record<string, string>): Promise<T>;
299
313
  /**
300
314
  * Opens a streamed response. `timeout` covers the wait for the stream to
301
315
  * start; the caller's `signal` can cancel it at any point.
302
316
  */
303
- protected rawRequest(endpoint: string, method?: string, data?: RequestBody$3, params?: QueryParams$4, headers?: Record<string, string>): Promise<Response>;
304
- protected buildPaginationParams(pagination?: ListAgentRunsParams | ListAgentRunEventsParams): QueryParams$4;
317
+ protected rawRequest(endpoint: string, method?: string, data?: RequestBody$2, params?: QueryParams$3, headers?: Record<string, string>): Promise<Response>;
318
+ protected buildPaginationParams(pagination?: ListAgentRunsParams | ListAgentRunEventsParams): QueryParams$3;
305
319
  }
306
320
 
307
321
  /**
@@ -586,13 +600,13 @@ interface AgentMonitorBacktestWaitOptions {
586
600
  * Base client for the Exa Agent Monitors API.
587
601
  */
588
602
 
589
- type QueryParams$3 = Record<string, string | number | boolean | string[] | undefined>;
590
- type RequestBody$2 = Record<string, any>;
603
+ type QueryParams$2 = Record<string, string | number | boolean | string[] | undefined>;
604
+ type RequestBody$1 = Record<string, any>;
591
605
  declare class AgentMonitorsBaseClient extends RequestScopedClient {
592
606
  protected client: Exa;
593
607
  constructor(client: Exa);
594
- protected request<T = unknown>(endpoint: string, betas: string[], method?: string, data?: RequestBody$2, params?: QueryParams$3, headers?: Record<string, string>): Promise<T>;
595
- protected buildPaginationParams(pagination?: ListAgentMonitorsParams | ListAgentMonitorEntitiesParams | ListAgentMonitorChangesParams): QueryParams$3;
608
+ protected request<T = unknown>(endpoint: string, betas: string[], method?: string, data?: RequestBody$1, params?: QueryParams$2, headers?: Record<string, string>): Promise<T>;
609
+ protected buildPaginationParams(pagination?: ListAgentMonitorsParams | ListAgentMonitorEntitiesParams | ListAgentMonitorChangesParams): QueryParams$2;
596
610
  }
597
611
 
598
612
  /**
@@ -1012,12 +1026,12 @@ interface TriggerSearchMonitorResponse {
1012
1026
  * Base client for Search Monitors API
1013
1027
  */
1014
1028
 
1015
- type QueryParams$2 = Record<string, string | number | boolean | string[] | undefined>;
1029
+ type QueryParams$1 = Record<string, string | number | boolean | string[] | undefined>;
1016
1030
  declare class SearchMonitorsBaseClient extends RequestScopedClient {
1017
1031
  protected client: Exa;
1018
1032
  constructor(client: Exa);
1019
- protected request<T = unknown>(endpoint: string, method?: string, data?: Record<string, any>, params?: QueryParams$2): Promise<T>;
1020
- protected buildPaginationParams(pagination?: ListSearchMonitorsParams | ListSearchMonitorRunsParams): QueryParams$2;
1033
+ protected request<T = unknown>(endpoint: string, method?: string, data?: Record<string, any>, params?: QueryParams$1): Promise<T>;
1034
+ protected buildPaginationParams(pagination?: ListSearchMonitorsParams | ListSearchMonitorRunsParams): QueryParams$1;
1021
1035
  }
1022
1036
 
1023
1037
  /**
@@ -1622,6 +1636,11 @@ interface ExaErrorEnvelope {
1622
1636
  * Server-side request id for support/debugging
1623
1637
  */
1624
1638
  requestId?: string;
1639
+ /**
1640
+ * Machine-readable error tag from the API's error body, e.g.
1641
+ * "INVALID_REQUEST_BODY"
1642
+ */
1643
+ tag?: string;
1625
1644
  }
1626
1645
  /**
1627
1646
  * Base error class for all Exa API errors
@@ -1655,6 +1674,11 @@ declare class ExaError extends Error {
1655
1674
  * Server-side request id for support/debugging
1656
1675
  */
1657
1676
  requestId?: string;
1677
+ /**
1678
+ * Machine-readable error tag from the API's error body, e.g.
1679
+ * "INVALID_REQUEST_BODY"
1680
+ */
1681
+ tag?: string;
1658
1682
  /**
1659
1683
  * Create a new ExaError
1660
1684
  * @param message Error message
@@ -1702,18 +1726,9 @@ declare class ExaTimeoutError extends ExaError {
1702
1726
  constructor(timeout: number, path?: string, cause?: unknown);
1703
1727
  }
1704
1728
 
1705
- type QueryParams$1 = Record<string, string | number | boolean | string[] | undefined>;
1706
- interface RequestBody$1 {
1707
- [key: string]: unknown;
1708
- }
1709
1729
  declare class ResearchBaseClient extends RequestScopedClient {
1710
1730
  protected client: Exa;
1711
1731
  constructor(client: Exa);
1712
- /** Rejects with `researchRetiredError()`: the Research API has been retired. */
1713
- protected request<T = unknown>(_endpoint: string, _method?: string, _data?: RequestBody$1, _params?: QueryParams$1): Promise<T>;
1714
- /** Rejects with `researchRetiredError()`: the Research API has been retired. */
1715
- protected rawRequest(_endpoint: string, _method?: string, _data?: RequestBody$1, _params?: QueryParams$1): Promise<Response>;
1716
- protected buildPaginationParams(pagination?: ListResearchRequest): QueryParams$1;
1717
1732
  }
1718
1733
 
1719
1734
  /**
@@ -1750,7 +1765,7 @@ declare class ResearchClient extends ResearchBaseClient {
1750
1765
  events?: boolean;
1751
1766
  outputSchema?: ZodSchema<T>;
1752
1767
  }, requestOptions?: RequestOptions): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
1753
- list(options?: ListResearchRequest, requestOptions?: RequestOptions): Promise<ListResearchResponse>;
1768
+ list(_options?: ListResearchRequest, _requestOptions?: RequestOptions): Promise<ListResearchResponse>;
1754
1769
  pollUntilFinished(researchId: string, options?: {
1755
1770
  pollInterval?: number;
1756
1771
  timeoutMs?: number;
@@ -3331,6 +3346,19 @@ interface components {
3331
3346
  canceledAt: string | null;
3332
3347
  /** @description The reason the search was canceled */
3333
3348
  canceledReason: WebsetSearchCanceledReason;
3349
+ /** @description What the search cost, in dollars. Returned once the search has finished, for teams on the pay-as-you-go plan, which is charged for what each search uses. Omitted for teams on other plans. `emails`, `phoneNumbers` and `total` keep growing after the search has finished, as enrichments find contact details for its items. This response value is not an invoice record. */
3350
+ costDollars?: {
3351
+ /** @description Cost of the model usage the search needed, in dollars. */
3352
+ agentCompute: number;
3353
+ /** @description Cost of the emails that enrichments found for the items the search added, in dollars. */
3354
+ emails: number;
3355
+ /** @description Cost of the phone numbers that enrichments found for the items the search added, in dollars. */
3356
+ phoneNumbers: number;
3357
+ /** @description Cost of the Exa searches the search ran, in dollars. */
3358
+ search: number;
3359
+ /** @description Total cost of the search in dollars, including the emails and phone numbers found for its items. */
3360
+ total: number;
3361
+ };
3334
3362
  /** @description The number of results the search will attempt to find. The actual number of results may be less than this number depending on the search complexity. */
3335
3363
  count: number;
3336
3364
  /**
@@ -4378,10 +4406,12 @@ declare function createWebSearchTool(exa: Exa, registry: ToolRegistry, config?:
4378
4406
  * option is configured.
4379
4407
  */
4380
4408
  declare function createGetContentsTool(exa: Exa, registry: ToolRegistry, config?: GetContentsToolConfig): GetContentsTool;
4409
+ /** What running a tool call needs: a tool's name and its runner. */
4410
+ type RunnableTool = Pick<ExaToolSpec, "name" | "run">;
4381
4411
  declare class ToolRegistry {
4382
4412
  private readonly registry;
4383
4413
  register(tool: ExaToolSpec): void;
4384
- resolve(tools?: readonly ExaToolSpec[]): Map<string, ExaToolSpec>;
4414
+ resolve(tools?: readonly RunnableTool[]): Map<string, RunnableTool>;
4385
4415
  }
4386
4416
 
4387
4417
  type AnthropicMessage = {
@@ -4420,7 +4450,7 @@ declare class AnthropicTools {
4420
4450
  * sending the next request.
4421
4451
  */
4422
4452
  handleToolUse(message: AnthropicMessage, options?: {
4423
- tools?: readonly ExaToolSpec[];
4453
+ tools?: readonly RunnableTool[];
4424
4454
  }): Promise<AnthropicToolResult[]>;
4425
4455
  }
4426
4456
 
@@ -4448,7 +4478,7 @@ type OpenAIChatDefinition = {
4448
4478
  parameters: any;
4449
4479
  };
4450
4480
  };
4451
- type OpenAIRunnable = ExaToolSpec & {
4481
+ type OpenAIRunnable = Omit<ExaToolSpec, "definition"> & {
4452
4482
  type: "function";
4453
4483
  function: {
4454
4484
  name: string;
@@ -4476,7 +4506,7 @@ declare class OpenAIResponsesTools {
4476
4506
  private readonly registry;
4477
4507
  private readonly handleResponses;
4478
4508
  constructor(exa: Exa, registry: ToolRegistry, handleResponses: (responseOrOutputItems: ResponsesOutput | readonly unknown[], options?: {
4479
- tools?: readonly ExaToolSpec[];
4509
+ tools?: readonly RunnableTool[];
4480
4510
  }) => Promise<ResponsesFunctionCallOutput[]>);
4481
4511
  /** Responses API `web_search` tool. Defaults to `auto` + highlights. */
4482
4512
  webSearch(config?: WebSearchToolConfig): OpenAIResponsesRunnable;
@@ -4491,7 +4521,7 @@ declare class OpenAIResponsesTools {
4491
4521
  * own results before sending the next request.
4492
4522
  */
4493
4523
  handleToolCalls(responseOrOutputItems: ResponsesOutput | readonly unknown[], options?: {
4494
- tools?: readonly ExaToolSpec[];
4524
+ tools?: readonly RunnableTool[];
4495
4525
  }): Promise<ResponsesFunctionCallOutput[]>;
4496
4526
  }
4497
4527
  declare class OpenAITools {
@@ -4512,7 +4542,7 @@ declare class OpenAITools {
4512
4542
  * own results before sending the next request.
4513
4543
  */
4514
4544
  handleToolCalls(assistantMessage: OpenAIAssistantMessage, options?: {
4515
- tools?: readonly ExaToolSpec[];
4545
+ tools?: readonly RunnableTool[];
4516
4546
  }): Promise<OpenAIToolMessage[]>;
4517
4547
  /**
4518
4548
  * Run the function calls in a Responses API response (or output item array)
@@ -4520,7 +4550,7 @@ declare class OpenAITools {
4520
4550
  * doesn't match a known tool with `Error: unknown tool "<name>"` outputs.
4521
4551
  */
4522
4552
  handleToolCalls(responseOrOutputItems: ResponsesOutput | readonly unknown[], options?: {
4523
- tools?: readonly ExaToolSpec[];
4553
+ tools?: readonly RunnableTool[];
4524
4554
  }): Promise<ResponsesFunctionCallOutput[]>;
4525
4555
  private handleChatToolCalls;
4526
4556
  private handleResponsesToolCalls;
@@ -4535,7 +4565,7 @@ declare const DYNAMIC_HIGHLIGHTS_BETA = "dynamic-highlights-2026-08-28";
4535
4565
  * @property {HighlightsContentsOptions | boolean} [highlights] - Recommended: `true`. Exa dynamically chooses the number of characters based on each document's relevance to your query.
4536
4566
  * @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
4537
4567
  * @property {ContextOptions | boolean} [context] - Deprecated. Use `text` or `highlights`.
4538
- * @property {number} [maxAgeHours] - Maximum age of cached content in hours. If content is older, it will be fetched fresh. Special values: 0 = always fetch fresh content, -1 = never fetch fresh (use cached content only). Example: 168 = fetch fresh for pages older than 7 days.
4568
+ * @property {number} [maxAgeHours] - Maximum age of cached content in hours. If content is older, it will be fetched fresh. A failed fetch may return the latest cached copy instead. Special values: 0 = return live content, fetched within the last 60 seconds, -1 = never fetch fresh (use cached content only). Example: 168 = fetch fresh for pages older than 7 days.
4539
4569
  * @property {string} [snapshotAsOf] - ISO 8601 datetime. Return the newest stored version at or before this instant instead of live content.
4540
4570
  * @property {boolean} [filterEmptyResults] - If true, filters out results with no contents. Default is true.
4541
4571
  * @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result. Deprecated on `search()`; use `getContents()` to crawl subpages.
@@ -4668,9 +4698,17 @@ type ApiWarningContext = {
4668
4698
  */
4669
4699
  type WarningsOption = "log" | "silent" | ((warning: ApiWarning, context: ApiWarningContext) => void);
4670
4700
  /**
4671
- * Client-wide settings, given as the third argument of the `Exa` constructor.
4701
+ * Client-wide settings, given as the second argument of the `Exa`
4702
+ * constructor, or as the third after a base URL.
4672
4703
  */
4673
4704
  type ExaClientOptions = {
4705
+ /**
4706
+ * The base URL of the Exa API, for example `https://api.eu.exa.ai` for the
4707
+ * EU API. Defaults to the `EXA_BASE_URL` environment variable, or
4708
+ * `https://api.exa.ai` when it is not set. Each client keeps its own base
4709
+ * URL and API key.
4710
+ */
4711
+ baseURL?: string | undefined;
4674
4712
  /**
4675
4713
  * Default timeout in milliseconds for every request this client makes. A
4676
4714
  * per-call `timeout` overrides it. Unset by default, in which case the SDK
@@ -4683,7 +4721,34 @@ type ExaClientOptions = {
4683
4721
  * endpoint, code and path. See {@link WarningsOption}.
4684
4722
  */
4685
4723
  warnings?: WarningsOption | undefined;
4724
+ /**
4725
+ * The `fetch` implementation the client sends its requests to the Exa API
4726
+ * with. Defaults to the global `fetch`, or to a bundled implementation
4727
+ * where the runtime has none.
4728
+ */
4729
+ fetch?: typeof fetch | undefined;
4686
4730
  };
4731
+ /**
4732
+ * A function that returns the API key, given as `apiKey` instead of a
4733
+ * string. The client calls it before each request and sends the string it
4734
+ * returns as the API key. It never caches the result, so the function can
4735
+ * return a key that rotates.
4736
+ *
4737
+ * It must return a non-empty string of visible ASCII characters. Anything
4738
+ * else fails the request with a `TypeError`, and the request is not sent.
4739
+ *
4740
+ * The request's `timeout` and `signal` also bound the wait for the function.
4741
+ * The `signal` it receives aborts when the request is cancelled or times
4742
+ * out, so pass it to any request the function makes. The function's
4743
+ * `signal` is `undefined` when the request has neither a `timeout` nor a
4744
+ * `signal`.
4745
+ *
4746
+ * A request that sets its own `x-api-key` header, or removes it with `null`,
4747
+ * does not call the function.
4748
+ */
4749
+ type ApiKeySource = (context: {
4750
+ signal?: AbortSignal | undefined;
4751
+ }) => string | Promise<string>;
4687
4752
  /**
4688
4753
  * Options for performing a search query
4689
4754
  * @typedef {Object} SearchOptions
@@ -5436,6 +5501,10 @@ type SummaryContentsOptionsTyped<T> = Omit<SummaryContentsOptions, "schema"> & {
5436
5501
  declare class Exa {
5437
5502
  private baseURL;
5438
5503
  private headers;
5504
+ /** Supplies the `x-api-key` of each request when `apiKey` is a function. */
5505
+ private readonly apiKeySource;
5506
+ /** `options.fetch`, or the default `fetch`, which sends every request. */
5507
+ private readonly fetcher;
5439
5508
  /** Client-wide transport defaults; a per-call option overrides each field. */
5440
5509
  /**
5441
5510
  * Websets API client
@@ -5480,13 +5549,30 @@ declare class Exa {
5480
5549
  private buildSearchRequestBody;
5481
5550
  /**
5482
5551
  * Constructs the Exa API client.
5483
- * @param {string} apiKey - The API key for authentication.
5484
- * @param {string} [baseURL] - The base URL of the Exa API.
5485
- * @param {ExaClientOptions} [options] - Client-wide settings (`timeout`, `warnings`).
5552
+ * @param {string | ApiKeySource} [apiKey] - The API key for authentication,
5553
+ * or a function that returns it before each request. See {@link ApiKeySource}.
5554
+ * @param {string | ExaClientOptions} [baseURLOrOptions] - Client-wide settings
5555
+ * (`baseURL`, `timeout`, `warnings`, `fetch`), or the base URL alone with the
5556
+ * settings as the third argument. The base URL defaults to the `EXA_BASE_URL`
5557
+ * environment variable, or `https://api.exa.ai` when it is not set.
5558
+ * @param {ExaClientOptions} [maybeOptions] - Client-wide settings, when the
5559
+ * second argument is the base URL.
5486
5560
  * @throws {RangeError} When `options.timeout` is not an integer from 1 to 2147483647.
5487
- * @throws {TypeError} When `options.warnings` is not `"log"`, `"silent"` or a function.
5561
+ * @throws {TypeError} When `options.warnings` is not `"log"`, `"silent"` or a function,
5562
+ * when `options.fetch` is given and is not a function, or when the base URL
5563
+ * or the options are given twice.
5564
+ */
5565
+ constructor(apiKey?: string | ApiKeySource, options?: ExaClientOptions);
5566
+ constructor(apiKey?: string | ApiKeySource, baseURL?: string, options?: ExaClientOptions);
5567
+ /**
5568
+ * Returns the headers a request sends, which are `headers` with the call's
5569
+ * `extraHeaders` on top and, when `apiKey` is a function, the key it returns
5570
+ * as `x-api-key` beneath them. The function is called only when neither
5571
+ * sets `x-api-key` nor removes it with `null`, whatever its case. Called
5572
+ * inside each request's lifecycle, so the request's `signal` and `timeout`
5573
+ * also bound the wait for the key.
5488
5574
  */
5489
- constructor(apiKey?: string, baseURL?: string, options?: ExaClientOptions);
5575
+ private requestHeaders;
5490
5576
  /**
5491
5577
  * Makes a request to the Exa API.
5492
5578
  * @param {string} endpoint - The API endpoint to call.
@@ -5600,6 +5686,9 @@ declare class Exa {
5600
5686
  * A search without `outputSchema` has no text to stream. Its stream yields
5601
5687
  * one chunk with the results as `citations`, then the warnings chunk when
5602
5688
  * the API returns warnings. Call `search()` for every field of the results.
5689
+ *
5690
+ * If the API reports an error partway through, the stream yields the chunks
5691
+ * before it and then rejects with an `ExaError`.
5603
5692
  * @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
5604
5693
  */
5605
5694
  streamSearch<Type extends string = never>(query: string, options?: StreamSearchOptions<Type> & {
@@ -5746,6 +5835,8 @@ declare class Exa {
5746
5835
  * Each iteration yields a chunk with partial text (`content`) or new citations.
5747
5836
  * The last chunk carries the request's cost breakdown (`costDollars`).
5748
5837
  * Use this if you'd like to read the answer incrementally, e.g. in a chat UI.
5838
+ * If the API reports an error partway through, the stream yields the chunks
5839
+ * before it and then rejects with an `ExaError`.
5749
5840
  *
5750
5841
  * Example usage:
5751
5842
  * ```ts
@@ -5793,4 +5884,4 @@ declare class Exa {
5793
5884
  private parseSSEStream;
5794
5885
  }
5795
5886
 
5796
- export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentFetchStatus, type ContentSource, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type KnownAgentConfidence, type KnownAgentMonitorStatus, type KnownAgentRunStatus, type KnownAgentStopReason, type KnownContentFetchStatus, type KnownContentSource, type KnownSearchMonitorRunFailReason, type KnownSearchMonitorRunStatus, type KnownSearchMonitorStatus, type KnownSearchMonitorWebhookEvent, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
5887
+ export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiKeySource, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentFetchStatus, type ContentSource, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type KnownAgentConfidence, type KnownAgentMonitorStatus, type KnownAgentRunStatus, type KnownAgentStopReason, type KnownContentFetchStatus, type KnownContentSource, type KnownSearchMonitorRunFailReason, type KnownSearchMonitorRunStatus, type KnownSearchMonitorStatus, type KnownSearchMonitorWebhookEvent, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };