/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 7dcc40b64b21 */ import { betaAgentsCreate } from "../funcs/betaAgentsCreate.js"; import { betaAgentsCreateVersionAlias } from "../funcs/betaAgentsCreateVersionAlias.js"; import { betaAgentsDelete } from "../funcs/betaAgentsDelete.js"; import { betaAgentsDeleteVersionAlias } from "../funcs/betaAgentsDeleteVersionAlias.js"; import { betaAgentsGet } from "../funcs/betaAgentsGet.js"; import { betaAgentsGetVersion } from "../funcs/betaAgentsGetVersion.js"; import { betaAgentsList } from "../funcs/betaAgentsList.js"; import { betaAgentsListVersionAliases } from "../funcs/betaAgentsListVersionAliases.js"; import { betaAgentsListVersions } from "../funcs/betaAgentsListVersions.js"; import { betaAgentsUpdate } from "../funcs/betaAgentsUpdate.js"; import { betaAgentsUpdateVersion } from "../funcs/betaAgentsUpdateVersion.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class BetaAgents extends ClientSDK { /** * Create a agent that can be used within a conversation. * * @remarks * Create a new agent giving it instructions, tools, description. The agent is then available to be used as a regular assistant in a conversation or as part of an agent pool from which it can be used. */ async create( request: components.CreateAgentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsCreate( this, request, options, )); } /** * List agent entities. * * @remarks * Retrieve a list of agent entities sorted by creation time. */ async list( request?: operations.AgentsApiV1AgentsListRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapAsync(betaAgentsList( this, request, options, )); } /** * Retrieve an agent entity. * * @remarks * Given an agent, retrieve an agent entity with its attributes. The agent_version parameter can be an integer version number or a string alias. */ async get( request: operations.AgentsApiV1AgentsGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsGet( this, request, options, )); } /** * Update an agent entity. * * @remarks * Update an agent attributes and create a new version. */ async update( request: operations.AgentsApiV1AgentsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsUpdate( this, request, options, )); } /** * Delete an agent entity. */ async delete( request: operations.AgentsApiV1AgentsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsDelete( this, request, options, )); } /** * Update an agent version. * * @remarks * Switch the version of an agent. */ async updateVersion( request: operations.AgentsApiV1AgentsUpdateVersionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsUpdateVersion( this, request, options, )); } /** * List all versions of an agent. * * @remarks * Retrieve all versions for a specific agent with full agent context. Supports pagination. */ async listVersions( request: operations.AgentsApiV1AgentsListVersionsRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(betaAgentsListVersions( this, request, options, )); } /** * Retrieve a specific version of an agent. * * @remarks * Get a specific agent version by version number. */ async getVersion( request: operations.AgentsApiV1AgentsGetVersionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsGetVersion( this, request, options, )); } /** * Create or update an agent version alias. * * @remarks * Create a new alias or update an existing alias to point to a specific version. Aliases are unique per agent and can be reassigned to different versions. */ async createVersionAlias( request: operations.AgentsApiV1AgentsCreateOrUpdateAliasRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsCreateVersionAlias( this, request, options, )); } /** * List all aliases for an agent. * * @remarks * Retrieve all version aliases for a specific agent. */ async listVersionAliases( request: operations.AgentsApiV1AgentsListVersionAliasesRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(betaAgentsListVersionAliases( this, request, options, )); } /** * Delete an agent version alias. * * @remarks * Delete an existing alias for an agent. */ async deleteVersionAlias( request: operations.AgentsApiV1AgentsDeleteAliasRequest, options?: RequestOptions, ): Promise { return unwrapAsync(betaAgentsDeleteVersionAlias( this, request, options, )); } }