Files
crewAI/docs/en/enterprise/guides/kickoff-crew.mdx
Alex 9723113755 docs: add file upload to kickoff guide, clarify flow state population, all languages
- Added new "File Uploads" section to kickoff-crew.mdx with multipart,
  JSON URL, and separate upload + kickoff examples
- Clarified that file-typed fields in flow state schema signal the
  Platform UI to render file dropzones
- Updated flows.mdx File Inputs section to show state population pattern
- Updated files.mdx With Flows section with state schema example
- Applied all changes to en, ar, ko, pt-BR translations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-06 00:34:05 -07:00

233 lines
6.7 KiB
Plaintext

---
title: "Kickoff Crew"
description: "Kickoff a Crew on CrewAI AMP"
icon: "flag-checkered"
mode: "wide"
---
## Overview
Once you've deployed your crew to the CrewAI AMP platform, you can kickoff executions through the web interface or the API. This guide covers both approaches.
## Method 1: Using the Web Interface
### Step 1: Navigate to Your Deployed Crew
1. Log in to [CrewAI AMP](https://app.crewai.com)
2. Click on the crew name from your projects list
3. You'll be taken to the crew's detail page
<Frame>![Crew Dashboard](/images/enterprise/crew-dashboard.png)</Frame>
### Step 2: Initiate Execution
From your crew's detail page, you have two options to kickoff an execution:
#### Option A: Quick Kickoff
1. Click the `Kickoff` link in the Test Endpoints section
2. Enter the required input parameters for your crew in the JSON editor
3. Click the `Send Request` button
<Frame>![Kickoff Endpoint](/images/enterprise/kickoff-endpoint.png)</Frame>
#### Option B: Using the Visual Interface
1. Click the `Run` tab in the crew detail page
2. Enter the required inputs in the form fields
3. Click the `Run Crew` button
<Frame>![Run Crew](/images/enterprise/run-crew.png)</Frame>
### Step 3: Monitor Execution Progress
After initiating the execution:
1. You'll receive a response containing a `kickoff_id` - **copy this ID**
2. This ID is essential for tracking your execution
<Frame>![Copy Task ID](/images/enterprise/copy-task-id.png)</Frame>
### Step 4: Check Execution Status
To monitor the progress of your execution:
1. Click the "Status" endpoint in the Test Endpoints section
2. Paste the `kickoff_id` into the designated field
3. Click the "Get Status" button
<Frame>![Get Status](/images/enterprise/get-status.png)</Frame>
The status response will show:
- Current execution state (`running`, `completed`, etc.)
- Details about which tasks are in progress
- Any outputs produced so far
### Step 5: View Final Results
Once execution is complete:
1. The status will change to `completed`
2. You can view the full execution results and outputs
3. For a more detailed view, check the `Executions` tab in the crew detail page
## Method 2: Using the API
You can also kickoff crews programmatically using the CrewAI AMP REST API.
### Authentication
All API requests require a bearer token for authentication:
```bash
curl -H "Authorization: Bearer YOUR_CREW_TOKEN" https://your-crew-url.crewai.com
```
Your bearer token is available on the Status tab of your crew's detail page.
## File Uploads
When your crew or flow includes file-typed state fields (using `ImageFile`, `PDFFile`, or `File` from `crewai-files`), these fields automatically render as file upload dropzones in the Run tab UI. Users can drag and drop files directly, and the Platform handles storage and delivery to your agents.
### Multipart Kickoff (Recommended)
Send files directly with the kickoff request using `multipart/form-data`:
```bash
curl -X POST https://your-deployment.crewai.com/kickoff \
-H 'Authorization: Bearer YOUR_TOKEN' \
-F 'inputs={"title": "Report"}' \
-F 'document=@/path/to/file.pdf'
```
Files are automatically stored and converted to file objects. The agent receives the file with provider-specific optimization (inline base64, file upload API, or URL reference depending on the LLM provider).
### JSON Kickoff with File URLs
If you have files already hosted at URLs, pass them via `input_files`:
```bash
curl -X POST https://your-deployment.crewai.com/kickoff \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"inputs": {"title": "Report"},
"input_files": {"document": "https://example.com/file.pdf"}
}'
```
### Separate Upload + Kickoff
Upload files first, then reference them by URL:
```bash
# Step 1: Upload
curl -X POST https://your-deployment.crewai.com/files \
-H 'Authorization: Bearer YOUR_TOKEN' \
-F 'file=@/path/to/file.pdf' \
-F 'field_name=document'
# Returns: {"url": "https://...", "field_name": "document"}
# Step 2: Kickoff with URL
curl -X POST https://your-deployment.crewai.com/kickoff \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"inputs": {"title": "Report"}, "input_files": {"document": "https://..."}}'
```
<Note type="info">
File uploads work the same way for both crews and flows. Define file-typed fields in your state schema, and the Platform UI and API will handle uploads automatically.
</Note>
### Checking Crew Health
Before executing operations, you can verify that your crew is running properly:
```bash
curl -H "Authorization: Bearer YOUR_CREW_TOKEN" https://your-crew-url.crewai.com
```
A successful response will return a message indicating the crew is operational:
```
Healthy%
```
### Step 1: Retrieve Required Inputs
First, determine what inputs your crew requires:
```bash
curl -X GET \
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
https://your-crew-url.crewai.com/inputs
```
The response will be a JSON object containing an array of required input parameters, for example:
```json
{ "inputs": ["topic", "current_year"] }
```
This example shows that this particular crew requires two inputs: `topic` and `current_year`.
### Step 2: Kickoff Execution
Initiate execution by providing the required inputs:
```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
-d '{"inputs": {"topic": "AI Agent Frameworks", "current_year": "2025"}}' \
https://your-crew-url.crewai.com/kickoff
```
The response will include a `kickoff_id` that you'll need for tracking:
```json
{ "kickoff_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv" }
```
### Step 3: Check Execution Status
Monitor the execution progress using the kickoff_id:
```bash
curl -X GET \
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
https://your-crew-url.crewai.com/status/abcd1234-5678-90ef-ghij-klmnopqrstuv
```
## Handling Executions
### Long-Running Executions
For executions that may take a long time:
1. Consider implementing a polling mechanism to check status periodically
2. Use webhooks (if available) for notification when execution completes
3. Implement error handling for potential timeouts
### Execution Context
The execution context includes:
- Inputs provided at kickoff
- Environment variables configured during deployment
- Any state maintained between tasks
### Debugging Failed Executions
If an execution fails:
1. Check the "Executions" tab for detailed logs
2. Review the "Traces" tab for step-by-step execution details
3. Look for LLM responses and tool usage in the trace details
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with execution issues or questions
about the Enterprise platform.
</Card>