This document describes the tools available in the box_tools_ai module, which provide AI-powered capabilities for interacting with Box files and hubs. These tools leverage Box AI agents to answer questions, extract data, and process content from files and hubs stored in Box.
Ask Box AI about a single file using a prompt. Returns AI-generated response based on the file's content.
- Arguments:
ctx: Request contextfile_id: ID of the Box fileprompt: Question or instruction for the AIai_agent_id(optional): Specific AI agent to use
Ask Box AI about multiple files using a prompt. Returns AI-generated response based on the content of multiple files.
- Arguments:
ctx: Request contextfile_ids: List of Box file IDsprompt: Question or instruction for the AIai_agent_id(optional): Specific AI agent to use
Ask Box AI about a specific hub using a prompt. Returns AI-generated response based on the hub's content.
- Arguments:
ctx: Request contexthubs_id: ID of the Box hubprompt: Question or instruction for the AIai_agent_id(optional): Specific AI agent to use
Extract data from Box files using a freeform prompt. Returns extracted data in JSON format.
- Arguments:
ctx: Request contextfile_ids: List of Box file IDsprompt: Freeform extraction promptai_agent_id(optional): Specific AI agent to use
Extract structured data from Box files by specifying fields. Returns extracted structured data in JSON format.
- Arguments:
ctx: Request contextfile_ids: List of Box file IDsfields: List of field definitions (see example below)ai_agent_id(optional): Specific AI agent to use
Field Example:
[
{"type": "string", "key": "name", "displayName": "Name", "description": "Policyholder Name"},
{"type": "date", "key": "effectiveDate", "displayName": "Effective Date", "description": "Policy Effective Date"}
]Extract structured data from Box files using a predefined template. Returns extracted structured data in JSON format.
- Arguments:
ctx: Request contextfile_ids: List of Box file IDstemplate_key: Template ID for extractionai_agent_id(optional): Specific AI agent to use
Extract structured data from Box files by specifying fields, with enhanced processing. Returns extracted structured data in JSON format.
- Arguments:
ctx: Request contextfile_ids: List of Box file IDsfields: List of field definitions
Extract structured data from Box files using a predefined template, with enhanced processing. Returns extracted structured data in JSON format.
- Arguments:
ctx: Request contextfile_ids: List of Box file IDstemplate_key: Template ID for extraction
- All tools require a valid Box client context (
ctx). - AI agent selection is optional for most tools; if omitted, the default agent is used.
- Structured extraction tools support both field-based and template-based extraction.
- Enhanced extraction tools provide improved accuracy and processing capabilities.
Refer to the source code in src/tools/box_tools_ai.py for implementation details and argument structures.