Lists AI agents based on the provided parameters.
This operation is performed by calling function get_ai_agents
.
See the endpoint docs at API Reference.
client.ai_studio.get_ai_agents()
- mode
Optional[List[str]]
- The mode to filter the agent config to return. Possible values are:
ask
,text_gen
, andextract
.
- The mode to filter the agent config to return. Possible values are:
- fields
Optional[List[str]]
- The fields to return in the response.
- agent_state
Optional[List[str]]
- The state of the agents to return. Possible values are:
enabled
,disabled
andenabled_for_selected_users
.
- The state of the agents to return. Possible values are:
- include_box_default
Optional[bool]
- Whether to include the Box default agents in the response.
- marker
Optional[str]
- Defines the position marker at which to begin returning results.
- limit
Optional[int]
- The maximum number of items to return per page.
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type AiMultipleAgentResponse
.
A successful response including the agents list.
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 create_ai_agent
.
See the endpoint docs at API Reference.
client.ai_studio.create_ai_agent(
agent_name,
"enabled",
ask=AiStudioAgentAsk(access_state="enabled", description="desc1"),
)
- type
CreateAiAgentType
- The type of agent used to handle queries.
- name
str
- The name of the AI Agent.
- access_state
str
- The state of the AI Agent. Possible values are:
enabled
,disabled
, andenabled_for_selected_users
.
- The state of the AI Agent. Possible values are:
- icon_reference
Optional[str]
- The icon reference of the AI Agent. It should have format of the URL
https://cdn01.boxcdn.net/app-assets/aistudio/avatars/<file_name>
where possible values offile_name
are:logo_boxAi.png
,logo_stamp.png
,logo_legal.png
,logo_finance.png
,logo_config.png
,logo_handshake.png
,logo_analytics.png
,logo_classification.png
- The icon reference of the AI Agent. It should have format of the URL
- allowed_entities
Optional[List[AiAgentAllowedEntity]]
- List of allowed users or groups.
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type AiSingleAgentResponseFull
.
Definition of created AI agent.
Updates an AI agent.
This operation is performed by calling function update_ai_agent_by_id
.
See the endpoint docs at API Reference.
client.ai_studio.update_ai_agent_by_id(
created_agent.id,
agent_name,
"enabled",
ask=AiStudioAgentAsk(access_state="disabled", description="desc2"),
)
- agent_id
str
- The ID of the agent to update. Example: "1234"
- type
UpdateAiAgentByIdType
- The type of agent used to handle queries.
- name
str
- The name of the AI Agent.
- access_state
str
- The state of the AI Agent. Possible values are:
enabled
,disabled
, andenabled_for_selected_users
.
- The state of the AI Agent. Possible values are:
- icon_reference
Optional[str]
- The icon reference of the AI Agent. It should have format of the URL
https://cdn01.boxcdn.net/app-assets/aistudio/avatars/<file_name>
where possible values offile_name
are:logo_boxAi.png
,logo_stamp.png
,logo_legal.png
,logo_finance.png
,logo_config.png
,logo_handshake.png
,logo_analytics.png
,logo_classification.png
- The icon reference of the AI Agent. It should have format of the URL
- allowed_entities
Optional[List[AiAgentAllowedEntity]]
- List of allowed users or groups.
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type AiSingleAgentResponseFull
.
Definition of created AI agent.
Gets an AI Agent using the agent_id
parameter.
This operation is performed by calling function get_ai_agent_by_id
.
See the endpoint docs at API Reference.
client.ai_studio.get_ai_agent_by_id(created_agent.id, fields=["ask"])
- agent_id
str
- The agent id to get. Example: "1234"
- fields
Optional[List[str]]
- The fields to return in the response.
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type AiSingleAgentResponseFull
.
A successful response including the agent.
Deletes an AI agent using the provided parameters.
This operation is performed by calling function delete_ai_agent_by_id
.
See the endpoint docs at API Reference.
client.ai_studio.delete_ai_agent_by_id(created_agent.id)
- agent_id
str
- The ID of the agent to delete. Example: "1234"
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type None
.
A successful response with no content.