Skip to main content

A python library for building AI agents for Box

Project description

Box AI Agents Toolkit

A Python library for building AI agents for Box. This toolkit provides functionalities for authenticating with Box using OAuth and CCG, interacting with Box files and folders, managing document generation operations, and handling metadata templates.

Features

  • Authentication: Authenticate with Box using OAuth or CCG
  • Box API Interactions: Interact with Box files and folders
  • File Upload & Download: Easily upload files to and download files from Box
  • Folder Management: Create, update, delete, and list folder contents
  • Search: Search for content and locate folders by name
  • Document Generation (DocGen): Create and manage document generation jobs and templates
  • Metadata Templates: Create and retrieve metadata templates and instances
  • AI Capabilities: Ask questions and extract information from files using Box AI
  • User & Group Management: Manage and search for Box users and groups
  • Collaborations: Share files and folders with users and groups
  • Shared Links: Create and manage shared links for files, folders, and web links
  • Tasks: Create and manage tasks on files
  • Web Links: Create and manage web link bookmarks

Installation

For End Users

Install the toolkit using pip:

pip install box-ai-agents-toolkit

Or using uv (faster):

uv pip install box-ai-agents-toolkit

For Contributors and Developers

1. Install uv

uv is an extremely fast Python package installer and resolver. Install it for your platform:

macOS:

brew install uv

Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Windows (wget):

wget -qO- https://astral.sh/uv/install.sh | sh

2. Clone and Install

# Clone the repository
git clone https://github.com/box-community/box-ai-agents-toolkit.git
cd box-ai-agents-toolkit

# Install dependencies (recommended)
uv sync

Quick Start

Authentication

from box_ai_agents_toolkit import get_ccg_client

# Authenticate using CCG
client = get_ccg_client()

For detailed authentication options, see Authentication Documentation.

Basic File Operations

from box_ai_agents_toolkit import box_file_get_by_id, box_upload_file

# Get a file
file = box_file_get_by_id(client, file_id="12345")

# Upload a file
result = box_upload_file(client, content="Hello World", file_name="test.txt", folder_id="0")

API Reference

Complete documentation organized by Python module:

Module Description Documentation
Core Operations
box_authentication.py OAuth and CCG authentication Authentication
box_auth_callback.py OAuth callback handler (internal) OAuth Callback
box_api_file.py File operations (upload, download, get, extract text) Files
box_api_folder.py Folder operations (create, update, delete, list) Folders
box_api_search.py Search content and locate folders Search
Collaboration & Sharing
box_api_collaborations.py Manage collaborations on files and folders Collaborations
box_api_shared_links.py Create and manage shared links Shared Links
Content Management
box_api_tasks.py Create and manage tasks on files Tasks
box_api_weblink.py Create and manage web link bookmarks Web Links
Document Generation
box_api_docgen.py Generate documents from templates DocGen
box_api_docgen_template.py Manage document generation templates DocGen Templates
Metadata
box_api_metadata_template.py Manage metadata templates and instances Metadata
AI Capabilities
box_api_ai.py Ask questions and extract information using Box AI AI
User & Group Management
box_api_users.py Manage and search users Users
box_api_groups.py Manage and search groups Groups
Utilities (Internal)
box_api_util_classes.py Utility classes Util Classes
box_api_util_generic.py Generic utilities Util Generic
box_api_util_http.py HTTP utilities Util HTTP

Development

Running Tests

To run the tests, use:

pytest

Linting and Code Quality

To run the linter:

ruff check

To format code:

ruff format

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

Contact

For questions or issues, open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

box_ai_agents_toolkit-0.1.5.tar.gz (53.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

box_ai_agents_toolkit-0.1.5-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file box_ai_agents_toolkit-0.1.5.tar.gz.

File metadata

  • Download URL: box_ai_agents_toolkit-0.1.5.tar.gz
  • Upload date:
  • Size: 53.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for box_ai_agents_toolkit-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8a85115070924efc14c981da99d51081e8b5d8bbd1364d8209cbf28e45cf5d58
MD5 0894db0b75652fe45412d09bd52a1c8e
BLAKE2b-256 7cc8bb406a8f999b0339877e16ebbbdeada57e88bd7761db44e323315e81f327

See more details on using hashes here.

File details

Details for the file box_ai_agents_toolkit-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: box_ai_agents_toolkit-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for box_ai_agents_toolkit-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3ab4f8202f4d5285a47489f87fc971a493e3e9015142bae7d6c150839d7d1605
MD5 efd759de53f5d38bbd77b045633d8f99
BLAKE2b-256 9147bc02cf214c9b8d22315952ca5e74a7c58ce65a5b1e24a11756acb13e359a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page