|
| 1 | +# AiStudioManager |
| 2 | + |
| 3 | +- [List AI agents](#list-ai-agents) |
| 4 | +- [Create AI agent](#create-ai-agent) |
| 5 | +- [Update AI agent](#update-ai-agent) |
| 6 | +- [Get AI agent by agent ID](#get-ai-agent-by-agent-id) |
| 7 | +- [Delete AI agent](#delete-ai-agent) |
| 8 | + |
| 9 | +## List AI agents |
| 10 | + |
| 11 | +Lists AI agents based on the provided parameters. |
| 12 | + |
| 13 | +This operation is performed by calling function `getAiAgents`. |
| 14 | + |
| 15 | +See the endpoint docs at |
| 16 | +[API Reference](https://developer.box.com/reference/get-ai-agents/). |
| 17 | + |
| 18 | +<!-- sample get_ai_agents --> |
| 19 | + |
| 20 | +```ts |
| 21 | +await client.aiStudio.getAiAgents(); |
| 22 | +``` |
| 23 | + |
| 24 | +### Arguments |
| 25 | + |
| 26 | +- queryParams `GetAiAgentsQueryParams` |
| 27 | + - Query parameters of getAiAgents method |
| 28 | +- headersInput `GetAiAgentsHeadersInput` |
| 29 | + - Headers of getAiAgents method |
| 30 | +- cancellationToken `undefined | CancellationToken` |
| 31 | + - Token used for request cancellation. |
| 32 | + |
| 33 | +### Returns |
| 34 | + |
| 35 | +This function returns a value of type `AiMultipleAgentResponse`. |
| 36 | + |
| 37 | +A successful response including the agents list. |
| 38 | + |
| 39 | +## Create AI agent |
| 40 | + |
| 41 | +Creates an AI agent. At least one of the following capabilities must be provided: `ask`, `text_gen`, `extract`. |
| 42 | + |
| 43 | +This operation is performed by calling function `createAiAgent`. |
| 44 | + |
| 45 | +See the endpoint docs at |
| 46 | +[API Reference](https://developer.box.com/reference/post-ai-agents/). |
| 47 | + |
| 48 | +<!-- sample post_ai_agents --> |
| 49 | + |
| 50 | +```ts |
| 51 | +await client.aiStudio.createAiAgent({ |
| 52 | + name: agentName, |
| 53 | + accessState: 'enabled', |
| 54 | + ask: new AiStudioAgentAsk({ accessState: 'enabled', description: 'desc1' }), |
| 55 | +} satisfies CreateAiAgentInput); |
| 56 | +``` |
| 57 | + |
| 58 | +### Arguments |
| 59 | + |
| 60 | +- requestBodyInput `CreateAiAgentInput` |
| 61 | + - Request body of createAiAgent method |
| 62 | +- optionalsInput `CreateAiAgentOptionalsInput` |
| 63 | + - |
| 64 | + |
| 65 | +### Returns |
| 66 | + |
| 67 | +This function returns a value of type `AiSingleAgentResponseFull`. |
| 68 | + |
| 69 | +Definition of created AI agent. |
| 70 | + |
| 71 | +## Update AI agent |
| 72 | + |
| 73 | +Updates an AI agent. |
| 74 | + |
| 75 | +This operation is performed by calling function `updateAiAgentById`. |
| 76 | + |
| 77 | +See the endpoint docs at |
| 78 | +[API Reference](https://developer.box.com/reference/put-ai-agents-id/). |
| 79 | + |
| 80 | +<!-- sample put_ai_agents_id --> |
| 81 | + |
| 82 | +```ts |
| 83 | +await client.aiStudio.updateAiAgentById(createdAgent.id, { |
| 84 | + name: agentName, |
| 85 | + accessState: 'enabled', |
| 86 | + ask: new AiStudioAgentAsk({ accessState: 'disabled', description: 'desc2' }), |
| 87 | +} satisfies CreateAiAgentInput); |
| 88 | +``` |
| 89 | + |
| 90 | +### Arguments |
| 91 | + |
| 92 | +- agentId `string` |
| 93 | + - The ID of the agent to update. Example: "1234" |
| 94 | +- requestBodyInput `CreateAiAgentInput` |
| 95 | + - Request body of updateAiAgentById method |
| 96 | +- optionalsInput `UpdateAiAgentByIdOptionalsInput` |
| 97 | + - |
| 98 | + |
| 99 | +### Returns |
| 100 | + |
| 101 | +This function returns a value of type `AiSingleAgentResponseFull`. |
| 102 | + |
| 103 | +Definition of created AI agent. |
| 104 | + |
| 105 | +## Get AI agent by agent ID |
| 106 | + |
| 107 | +Gets an AI Agent using the `agent_id` parameter. |
| 108 | + |
| 109 | +This operation is performed by calling function `getAiAgentById`. |
| 110 | + |
| 111 | +See the endpoint docs at |
| 112 | +[API Reference](https://developer.box.com/reference/get-ai-agents-id/). |
| 113 | + |
| 114 | +<!-- sample get_ai_agents_id --> |
| 115 | + |
| 116 | +```ts |
| 117 | +await client.aiStudio.getAiAgentById(createdAgent.id, { |
| 118 | + queryParams: { |
| 119 | + fields: ['ask' as string], |
| 120 | + } satisfies GetAiAgentByIdQueryParams, |
| 121 | +} satisfies GetAiAgentByIdOptionalsInput); |
| 122 | +``` |
| 123 | + |
| 124 | +### Arguments |
| 125 | + |
| 126 | +- agentId `string` |
| 127 | + - The agent id to get. Example: "1234" |
| 128 | +- optionalsInput `GetAiAgentByIdOptionalsInput` |
| 129 | + - |
| 130 | + |
| 131 | +### Returns |
| 132 | + |
| 133 | +This function returns a value of type `AiSingleAgentResponseFull`. |
| 134 | + |
| 135 | +A successful response including the agent. |
| 136 | + |
| 137 | +## Delete AI agent |
| 138 | + |
| 139 | +Deletes an AI agent using the provided parameters. |
| 140 | + |
| 141 | +This operation is performed by calling function `deleteAiAgentById`. |
| 142 | + |
| 143 | +See the endpoint docs at |
| 144 | +[API Reference](https://developer.box.com/reference/delete-ai-agents-id/). |
| 145 | + |
| 146 | +<!-- sample delete_ai_agents_id --> |
| 147 | + |
| 148 | +```ts |
| 149 | +await client.aiStudio.deleteAiAgentById(createdAgent.id); |
| 150 | +``` |
| 151 | + |
| 152 | +### Arguments |
| 153 | + |
| 154 | +- agentId `string` |
| 155 | + - The ID of the agent to delete. Example: "1234" |
| 156 | +- optionalsInput `DeleteAiAgentByIdOptionalsInput` |
| 157 | + - |
| 158 | + |
| 159 | +### Returns |
| 160 | + |
| 161 | +This function returns a value of type `undefined`. |
| 162 | + |
| 163 | +A successful response with no content. |
0 commit comments