mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-24 15:48:23 +00:00
feat: update docs with new approach to consume Platform Actions (#3675)
This commit is contained in:
@@ -25,7 +25,7 @@ Before using the Box integration, ensure you have:
|
||||
2. Find **Box** in the Authentication Integrations section
|
||||
3. Click **Connect** and complete the OAuth flow
|
||||
4. Grant the necessary permissions for file and folder management
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -36,7 +36,7 @@ uv add crewai-tools
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="BOX_SAVE_FILE">
|
||||
<Accordion title="box/save_file">
|
||||
**Description:** Save a file from URL in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -52,7 +52,7 @@ uv add crewai-tools
|
||||
- `file` (string, required): File URL - Files must be smaller than 50MB in size. (example: "https://picsum.photos/200/300").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_SAVE_FILE_FROM_OBJECT">
|
||||
<Accordion title="box/save_file_from_object">
|
||||
**Description:** Save a file in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -61,14 +61,14 @@ uv add crewai-tools
|
||||
- `folder` (string, optional): Folder - Use Connect Portal Workflow Settings to allow users to select the File's Folder destination. Defaults to the user's root folder if left blank.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_GET_FILE_BY_ID">
|
||||
<Accordion title="box/get_file_by_id">
|
||||
**Description:** Get a file by ID in Box.
|
||||
|
||||
**Parameters:**
|
||||
- `fileId` (string, required): File ID - The unique identifier that represents a file. (example: "12345").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_LIST_FILES">
|
||||
<Accordion title="box/list_files">
|
||||
**Description:** List files in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -93,7 +93,7 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_CREATE_FOLDER">
|
||||
<Accordion title="box/create_folder">
|
||||
**Description:** Create a folder in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -106,7 +106,7 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_MOVE_FOLDER">
|
||||
<Accordion title="box/move_folder">
|
||||
**Description:** Move a folder in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -120,14 +120,14 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_GET_FOLDER_BY_ID">
|
||||
<Accordion title="box/get_folder_by_id">
|
||||
**Description:** Get a folder by ID in Box.
|
||||
|
||||
**Parameters:**
|
||||
- `folderId` (string, required): Folder ID - The unique identifier that represents a folder. (example: "0").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_SEARCH_FOLDERS">
|
||||
<Accordion title="box/search_folders">
|
||||
**Description:** Search folders in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -152,7 +152,7 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_DELETE_FOLDER">
|
||||
<Accordion title="box/delete_folder">
|
||||
**Description:** Delete a folder in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -167,19 +167,14 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Box tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create an agent with Box capabilities
|
||||
box_agent = Agent(
|
||||
role="Document Manager",
|
||||
goal="Manage files and folders in Box efficiently",
|
||||
backstory="An AI assistant specialized in document management and file organization.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['box'] # All Box actions will be available
|
||||
)
|
||||
|
||||
# Task to create a folder structure
|
||||
@@ -201,19 +196,14 @@ crew.kickoff()
|
||||
### Filtering Specific Box Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific Box tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["box_create_folder", "box_save_file", "box_list_files"]
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create agent with specific Box actions only
|
||||
file_organizer_agent = Agent(
|
||||
role="File Organizer",
|
||||
goal="Organize and manage file storage efficiently",
|
||||
backstory="An AI assistant that focuses on file organization and storage management.",
|
||||
tools=enterprise_tools
|
||||
apps=['box/create_folder', 'box/save_file', 'box/list_files'] # Specific Box actions
|
||||
)
|
||||
|
||||
# Task to organize files
|
||||
@@ -235,17 +225,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
file_manager = Agent(
|
||||
role="File Manager",
|
||||
goal="Maintain organized file structure and manage document lifecycle",
|
||||
backstory="An experienced file manager who ensures documents are properly organized and accessible.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['box']
|
||||
)
|
||||
|
||||
# Complex task involving multiple Box operations
|
||||
|
||||
Reference in New Issue
Block a user