box-node-sdk

AiStudioManager

List AI agents

Lists AI agents based on the provided parameters.

This operation is performed by calling function getAiAgents.

See the endpoint docs at API Reference.

await client.aiStudio.getAiAgents();

Arguments

Returns

This function returns a value of type AiMultipleAgentResponse.

A successful response including the agents list.

Create AI agent

Creates an AI agent. At least one of the following capabilities must be provided: ask, text_gen, extract.

This operation is performed by calling function createAiAgent.

See the endpoint docs at API Reference.

await client.aiStudio.createAiAgent({
  name: agentName,
  accessState: 'enabled',
  ask: new AiStudioAgentAsk({ accessState: 'enabled', description: 'desc1' }),
} satisfies CreateAiAgentInput);

Arguments

Returns

This function returns a value of type AiSingleAgentResponseFull.

Definition of created AI agent.

Update AI agent

Updates an AI agent.

This operation is performed by calling function updateAiAgentById.

See the endpoint docs at API Reference.

await client.aiStudio.updateAiAgentById(createdAgent.id, {
  name: agentName,
  accessState: 'enabled',
  ask: new AiStudioAgentAsk({ accessState: 'disabled', description: 'desc2' }),
} satisfies CreateAiAgentInput);

Arguments

Returns

This function returns a value of type AiSingleAgentResponseFull.

Definition of created AI agent.

Get AI agent by agent ID

Gets an AI Agent using the agent_id parameter.

This operation is performed by calling function getAiAgentById.

See the endpoint docs at API Reference.

await client.aiStudio.getAiAgentById(createdAgent.id, {
  queryParams: { fields: ['ask'] } satisfies GetAiAgentByIdQueryParams,
} satisfies GetAiAgentByIdOptionalsInput);

Arguments

Returns

This function returns a value of type AiSingleAgentResponseFull.

A successful response including the agent.

Delete AI agent

Deletes an AI agent using the provided parameters.

This operation is performed by calling function deleteAiAgentById.

See the endpoint docs at API Reference.

await client.aiStudio.deleteAiAgentById(createdAgent.id);

Arguments

Returns

This function returns a value of type undefined.

A successful response with no content.