Build and troubleshoot Box integrations for uploads, folders, folder listings, downloads and previews, shared links, collaborations, search, metadata, event-driven automations, and Box AI retrieval flows. Use when Codex needs to add Box APIs or SDKs to an app, wire Box-backed document workflows, organize or share content, react to new files, or fetch Box content for search, summarization, extraction, or question-answering.
| If the user needs... | Primary object | Read first | Pair with | Minimal verification |
|---|---|---|---|---|
| Local verification, manual smoke tests, or quick inspection from Codex without app code changes | Current CLI environment | references/box-cli.md | references/auth-and-setup.md | scripts/box_cli_smoke.py check-auth then a read command |
| Uploads, folders, listings, downloads, shared links, collaborations, or metadata | File or folder | references/content-workflows.md | references/auth-and-setup.md | Read-after-write call using the same actor |
| Organizing, reorganizing, or batch-moving files across folders; bulk metadata tagging; migrating folder structures | File set or folder tree | references/bulk-operations.md | references/auth-and-setup.md, references/content-workflows.md, references/ai-and-retrieval.md | Inventory source, verify move count matches plan |
| Event-driven ingestion, new-file triggers, or webhook debugging | Webhook or events feed | references/webhooks-and-events.md | references/auth-and-setup.md, references/troubleshooting.md | Signature check plus duplicate-delivery test |
| Search, document retrieval, summarization, extraction, or Box AI | Search result set or file content | references/ai-and-retrieval.md | references/auth-and-setup.md | Retrieval-quality check before answer formatting |
| 401, 403, 404, 409, 429, missing content, or wrong-actor bugs | Existing request path | references/troubleshooting.md | references/auth-and-setup.md | Reproduce with the exact actor, object ID, and endpoint |
| Unsure which workflow applies | Unknown | references/workflows.md | references/auth-and-setup.md | Choose the smallest Box object/action pair first |
references/auth-and-setup.mdreferences/box-cli.mdreferences/workflows.mdreferences/content-workflows.mdreferences/bulk-operations.mdreferences/webhooks-and-events.mdreferences/ai-and-retrieval.mdreferences/troubleshooting.mdscripts/box_cli_smoke.py when Box CLI is available and authenticated, and scripts/box_rest.py as a fallback.Tool <name> not found, treat that tool as unavailable for the rest of the current task. Do not retry it with different arguments or call it again later; switch to an available fallback.get_file_content or Deep Research fetch only when the file is likely to have markdown or extracted-text content. If Box says markdown or text representation is unavailable, do not retry the same text read; switch to preview, metadata, or the next scoped fallback.get_file_preview for files known to exceed 3 MB. Reuse size from existing search, listing, or details results when it is already available.box configure:environments:get --current as a routine auth check because it can print sensitive environment details.scripts/box_cli_smoke.py when box is installed and authenticated. Fall back to scripts/box_rest.py with BOX_ACCESS_TOKEN when CLI auth is unavailable or the task specifically needs direct bearer-token verification.box users:get me --json or scripts/box_cli_smoke.py check-auth.python3 scripts/box_cli_smoke.py check-auth
python3 scripts/box_cli_smoke.py get-folder 0 --fields id name item_collection
python3 scripts/box_cli_smoke.py list-folder-items 0 --max-items 20
python3 scripts/box_cli_smoke.py search "invoice" --limit 10
python3 scripts/box_rest.py get-item --item-type folder --item-id 0 --fields id name item_collection
references/auth-and-setup.md: auth path selection, SDK vs REST choice, existing-codebase inspection, and current Box doc anchorsreferences/box-cli.md: CLI-first local auth, smoke-test commands, and safe verification patternsreferences/workflows.md: quick workflow router when the task is ambiguousreferences/content-workflows.md: uploads, folders, listings, downloads, shared links, collaborations, metadata, and file movesreferences/bulk-operations.md: organizing files at scale, batch moves, folder hierarchy creation, serial execution, and rate-limit handlingreferences/webhooks-and-events.md: webhook setup, event-feed usage, idempotency, and verificationreferences/ai-and-retrieval.md: search-first retrieval, Box AI usage, and external AI guardrailsreferences/troubleshooting.md: common failure modes and a debugging checklistexamples/box-content-api-prompts.md: example prompts for realistic use cases