Compare commits

..

27 Commits

Author SHA1 Message Date
Greyson Lalonde
515ce8f55f Merge branch 'gl/feat/async-crew-support' into gl/feat/async-flow-kickoff 2025-12-02 19:07:03 -05:00
Greyson Lalonde
1d40f5d83c Merge branch 'gl/feat/async-task-support' into gl/feat/async-crew-support 2025-12-02 19:06:26 -05:00
Greyson Lalonde
3afac2a696 Merge branch 'gl/feat/async-knowledge-support' into gl/feat/async-task-support 2025-12-02 19:05:51 -05:00
Greyson Lalonde
5fab437b7f Merge branch 'gl/feat/async-memory-support' into gl/feat/async-knowledge-support 2025-12-02 19:05:18 -05:00
Greyson Lalonde
30684f387e Merge branch 'gl/feat/async-agent-executor-support' into gl/feat/async-memory-support 2025-12-02 19:04:43 -05:00
Greyson Lalonde
f2b4efe7fa Merge branch 'gl/feat/async-crew-support' into gl/feat/async-flow-kickoff 2025-12-02 18:06:07 -05:00
Greyson Lalonde
4f175fdd6f Merge branch 'gl/feat/async-task-support' into gl/feat/async-crew-support 2025-12-02 18:05:38 -05:00
Greyson LaLonde
d72b79f932 Merge branch 'main' into gl/feat/async-flow-kickoff 2025-12-02 17:53:50 -05:00
Greyson LaLonde
e8638d318d Merge branch 'main' into gl/feat/async-crew-support 2025-12-02 17:53:34 -05:00
Greyson Lalonde
d2c880c6b3 chore: dry out duplicate logic 2025-12-02 17:52:17 -05:00
Greyson Lalonde
087f6d25a9 feat: add akickoff alias to flow 2025-12-02 17:22:51 -05:00
Greyson Lalonde
c57e325482 feat: add native async crew support 2025-12-02 16:47:53 -05:00
Greyson LaLonde
fdb7047780 Merge branch 'main' into gl/feat/async-task-support 2025-12-02 16:43:13 -05:00
Greyson LaLonde
adb485f7f7 Merge branch 'main' into gl/feat/async-knowledge-support 2025-12-02 16:43:06 -05:00
Greyson LaLonde
ee64bd426e Merge branch 'main' into gl/feat/async-memory-support 2025-12-02 16:42:52 -05:00
Greyson LaLonde
37b80ee937 Merge branch 'main' into gl/feat/async-agent-executor-support 2025-12-02 16:40:14 -05:00
Greyson Lalonde
bf9ccd418a feat: add async task support 2025-12-02 16:33:20 -05:00
Greyson Lalonde
bd95356ec5 feat: async knowledge support; add tests 2025-12-02 14:59:43 -05:00
Greyson Lalonde
441591d592 feat: add async ops to memory feat; create tests 2025-12-02 13:09:52 -05:00
Greyson Lalonde
132b6b224a feat: add aiosqlite dep; regenerate lockfile 2025-12-02 12:13:42 -05:00
Greyson Lalonde
4e2916d71a chore: add tests 2025-12-02 09:46:38 -05:00
Greyson Lalonde
0c4a0e1fda feat: add async execution support to agent executor 2025-12-02 09:30:56 -05:00
Greyson Lalonde
9c4126e0d8 chore: make docstrings a little more readable 2025-12-02 09:06:36 -05:00
Greyson Lalonde
5156fc4792 chore: update docs 2025-12-02 08:57:04 -05:00
Greyson Lalonde
c600b26ca6 fix: ensure _run backward compat 2025-12-02 08:36:03 -05:00
Greyson Lalonde
162a106002 chore: improve tool decorator typing 2025-12-02 00:32:10 -05:00
Greyson Lalonde
be33c8e3e5 feat: add async support for tools, add async tool tests 2025-12-02 00:03:28 -05:00
1237 changed files with 124680 additions and 218035 deletions

1429
.cursorrules Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -14,18 +14,13 @@ paths-ignore:
- "lib/crewai/src/crewai/experimental/a2a/**"
paths:
# Include GitHub Actions workflows/composite actions for CodeQL actions analysis
- ".github/workflows/**"
- ".github/actions/**"
# Include all Python source code from workspace packages
- "lib/crewai/src/**"
- "lib/crewai-tools/src/**"
- "lib/crewai-files/src/**"
- "lib/devtools/src/**"
# Include tests (but exclude cassettes via paths-ignore)
- "lib/crewai/tests/**"
- "lib/crewai-tools/tests/**"
- "lib/crewai-files/tests/**"
- "lib/devtools/tests/**"
# Configure specific queries or packs if needed

View File

@@ -5,12 +5,7 @@
version: 2
updates:
- package-ecosystem: uv
directory: "/"
- package-ecosystem: uv # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
groups:
security-updates:
applies-to: security-updates
patterns:
- "*"

View File

@@ -69,7 +69,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@@ -98,6 +98,6 @@ jobs:
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -1,63 +0,0 @@
name: Generate Tool Specifications
on:
pull_request:
branches:
- main
paths:
- 'lib/crewai-tools/src/crewai_tools/**'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
generate-specs:
runs-on: ubuntu-latest
env:
PYTHONUNBUFFERED: 1
steps:
- name: Generate GitHub App token
id: app-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CREWAI_TOOL_SPECS_APP_ID }}
private_key: ${{ secrets.CREWAI_TOOL_SPECS_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
python-version: "3.12"
enable-cache: true
- name: Install the project
working-directory: lib/crewai-tools
run: uv sync --dev --all-extras
- name: Generate tool specifications
working-directory: lib/crewai-tools
run: uv run python src/crewai_tools/generate_tool_specs.py
- name: Check for changes and commit
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add lib/crewai-tools/tool.specs.json
if git diff --quiet --staged; then
echo "No changes detected in tool.specs.json"
else
echo "Changes detected in tool.specs.json, committing..."
git commit -m "chore: update tool specifications"
git push
fi

33
.github/workflows/notify-downstream.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Notify Downstream
on:
push:
branches:
- main
permissions:
contents: read
jobs:
notify-downstream:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.OSS_SYNC_APP_ID }}
private_key: ${{ secrets.OSS_SYNC_APP_PRIVATE_KEY }}
- name: Notify Repo B
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.app-token.outputs.token }}
repository: ${{ secrets.OSS_SYNC_DOWNSTREAM_REPO }}
event-type: upstream-commit
client-payload: |
{
"commit_sha": "${{ github.sha }}"
}

View File

@@ -1,14 +1,9 @@
name: Publish to PyPI
on:
repository_dispatch:
types: [deployment-tests-passed]
release:
types: [ published ]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag to publish'
required: false
type: string
jobs:
build:
@@ -17,21 +12,7 @@ jobs:
permissions:
contents: read
steps:
- name: Determine release tag
id: release
run: |
# Priority: workflow_dispatch input > repository_dispatch payload > default branch
if [ -n "${{ inputs.release_tag }}" ]; then
echo "tag=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT
elif [ -n "${{ github.event.client_payload.release_tag }}" ]; then
echo "tag=${{ github.event.client_payload.release_tag }}" >> $GITHUB_OUTPUT
else
echo "tag=" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v4
with:
ref: ${{ steps.release.outputs.tag || github.ref }}
- name: Set up Python
uses: actions/setup-python@v5

View File

@@ -1,18 +0,0 @@
name: Trigger Deployment Tests
on:
release:
types: [published]
jobs:
trigger:
name: Trigger deployment tests
runs-on: ubuntu-latest
steps:
- name: Trigger deployment tests
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CREWAI_DEPLOYMENTS_PAT }}
repository: ${{ secrets.CREWAI_DEPLOYMENTS_REPOSITORY }}
event-type: crewai-release
client-payload: '{"release_tag": "${{ github.event.release.tag_name }}", "release_name": "${{ github.event.release.name }}"}'

4
.gitignore vendored
View File

@@ -26,7 +26,3 @@ plan.md
conceptual_plan.md
build_image
chromadb-*.lock
.claude
.crewai/memory
blogs/*
secrets/*

View File

@@ -19,15 +19,9 @@ repos:
language: system
pass_filenames: true
types: [python]
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/)
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/crewai/tests/|lib/crewai-tools/tests/)
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.3
hooks:
- id: uv-lock
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.10.1
hooks:
- id: commitizen
- id: commitizen-branch
stages: [ pre-push ]

View File

@@ -1 +0,0 @@
3.13

View File

@@ -57,14 +57,14 @@
> It empowers developers with both high-level simplicity and precise low-level control, ideal for creating autonomous AI agents tailored to any scenario.
- **CrewAI Crews**: Optimize for autonomy and collaborative intelligence.
- **CrewAI Flows**: The **enterprise and production architecture** for building and deploying multi-agent systems. Enable granular, event-driven control, single LLM calls for precise task orchestration and supports Crews natively
- **CrewAI Flows**: Enable granular, event-driven control, single LLM calls for precise task orchestration and supports Crews natively
With over 100,000 developers certified through our community courses at [learn.crewai.com](https://learn.crewai.com), CrewAI is rapidly becoming the
standard for enterprise-ready AI automation.
# CrewAI AMP Suite
# CrewAI AOP Suite
CrewAI AMP Suite is a comprehensive bundle tailored for organizations that require secure, scalable, and easy-to-manage agent-driven automation.
CrewAI AOP Suite is a comprehensive bundle tailored for organizations that require secure, scalable, and easy-to-manage agent-driven automation.
You can try one part of the suite the [Crew Control Plane for free](https://app.crewai.com)
@@ -76,9 +76,9 @@ You can try one part of the suite the [Crew Control Plane for free](https://app.
- **Advanced Security**: Built-in robust security and compliance measures ensuring safe deployment and management.
- **Actionable Insights**: Real-time analytics and reporting to optimize performance and decision-making.
- **24/7 Support**: Dedicated enterprise support to ensure uninterrupted operation and quick resolution of issues.
- **On-premise and Cloud Deployment Options**: Deploy CrewAI AMP on-premise or in the cloud, depending on your security and compliance requirements.
- **On-premise and Cloud Deployment Options**: Deploy CrewAI AOP on-premise or in the cloud, depending on your security and compliance requirements.
CrewAI AMP is designed for enterprises seeking a powerful, reliable solution to transform complex business processes into efficient,
CrewAI AOP is designed for enterprises seeking a powerful, reliable solution to transform complex business processes into efficient,
intelligent automations.
## Table of contents
@@ -124,8 +124,7 @@ Setup and run your first CrewAI agents by following this tutorial.
[![CrewAI Getting Started Tutorial](https://img.youtube.com/vi/-kSOTtYzgEw/hqdefault.jpg)](https://www.youtube.com/watch?v=-kSOTtYzgEw "CrewAI Getting Started Tutorial")
###
Learning Resources
Learning Resources
Learn CrewAI through our comprehensive courses:
@@ -142,7 +141,6 @@ CrewAI offers two powerful, complementary approaches that work seamlessly togeth
- Dynamic task delegation and collaboration
- Specialized roles with defined goals and expertise
- Flexible problem-solving approaches
2. **Flows**: Production-ready, event-driven workflows that deliver precise control over complex automations. Flows provide:
- Fine-grained control over execution paths for real-world scenarios
@@ -168,13 +166,13 @@ Ensure you have Python >=3.10 <3.14 installed on your system. CrewAI uses [UV](h
First, install CrewAI:
```shell
uv pip install crewai
pip install crewai
```
If you want to install the 'crewai' package along with its optional features that include additional tools for agents, you can do so by using the following command:
```shell
uv pip install 'crewai[tools]'
pip install 'crewai[tools]'
```
The command above installs the basic package and also adds extra components which require more dependencies to function.
@@ -187,15 +185,14 @@ If you encounter issues during installation or usage, here are some common solut
1. **ModuleNotFoundError: No module named 'tiktoken'**
- Install tiktoken explicitly: `uv pip install 'crewai[embeddings]'`
- If using embedchain or other tools: `uv pip install 'crewai[tools]'`
- Install tiktoken explicitly: `pip install 'crewai[embeddings]'`
- If using embedchain or other tools: `pip install 'crewai[tools]'`
2. **Failed building wheel for tiktoken**
- Ensure Rust compiler is installed (see installation steps above)
- For Windows: Verify Visual C++ Build Tools are installed
- Try upgrading pip: `uv pip install --upgrade pip`
- If issues persist, use a pre-built wheel: `uv pip install tiktoken --prefer-binary`
- Try upgrading pip: `pip install --upgrade pip`
- If issues persist, use a pre-built wheel: `pip install tiktoken --prefer-binary`
### 2. Setting Up Your Crew with the YAML Configuration
@@ -273,7 +270,7 @@ reporting_analyst:
**tasks.yaml**
````yaml
```yaml
# src/my_project/config/tasks.yaml
research_task:
description: >
@@ -293,7 +290,7 @@ reporting_task:
Formatted as markdown without '```'
agent: reporting_analyst
output_file: report.md
````
```
**crew.py**
@@ -559,7 +556,7 @@ Please refer to the [Connect CrewAI to LLMs](https://docs.crewai.com/how-to/LLM-
- **LangGraph**: While LangGraph provides a foundation for building agent workflows, its approach requires significant boilerplate code and complex state management patterns. The framework's tight coupling with LangChain can limit flexibility when implementing custom agent behaviors or integrating with external systems.
_P.S. CrewAI demonstrates significant performance advantages over LangGraph, executing 5.76x faster in certain cases like this QA task example ([see comparison](https://github.com/crewAIInc/crewAI-examples/tree/main/Notebooks/CrewAI%20Flows%20%26%20Langgraph/QA%20Agent)) while achieving higher evaluation scores with faster completion times in certain coding tasks, like in this example ([detailed analysis](https://github.com/crewAIInc/crewAI-examples/blob/main/Notebooks/CrewAI%20Flows%20%26%20Langgraph/Coding%20Assistant/coding_assistant_eval.ipynb))._
*P.S. CrewAI demonstrates significant performance advantages over LangGraph, executing 5.76x faster in certain cases like this QA task example ([see comparison](https://github.com/crewAIInc/crewAI-examples/tree/main/Notebooks/CrewAI%20Flows%20%26%20Langgraph/QA%20Agent)) while achieving higher evaluation scores with faster completion times in certain coding tasks, like in this example ([detailed analysis](https://github.com/crewAIInc/crewAI-examples/blob/main/Notebooks/CrewAI%20Flows%20%26%20Langgraph/Coding%20Assistant/coding_assistant_eval.ipynb)).*
- **Autogen**: While Autogen excels at creating conversational agents capable of working together, it lacks an inherent concept of process. In Autogen, orchestrating agents' interactions requires additional programming, which can become complex and cumbersome as the scale of tasks grows.
- **ChatDev**: ChatDev introduced the idea of processes into the realm of AI agents, but its implementation is quite rigid. Customizations in ChatDev are limited and not geared towards production environments, which can hinder scalability and flexibility in real-world applications.
@@ -614,7 +611,7 @@ uv build
### Installing Locally
```bash
uv pip install dist/*.tar.gz
pip install dist/*.tar.gz
```
## Telemetry
@@ -677,9 +674,9 @@ CrewAI is released under the [MIT License](https://github.com/crewAIInc/crewAI/b
### Enterprise Features
- [What additional features does CrewAI AMP offer?](#q-what-additional-features-does-crewai-amp-offer)
- [Is CrewAI AMP available for cloud and on-premise deployments?](#q-is-crewai-amp-available-for-cloud-and-on-premise-deployments)
- [Can I try CrewAI AMP for free?](#q-can-i-try-crewai-amp-for-free)
- [What additional features does CrewAI AOP offer?](#q-what-additional-features-does-crewai-amp-offer)
- [Is CrewAI AOP available for cloud and on-premise deployments?](#q-is-crewai-amp-available-for-cloud-and-on-premise-deployments)
- [Can I try CrewAI AOP for free?](#q-can-i-try-crewai-amp-for-free)
### Q: What exactly is CrewAI?
@@ -690,13 +687,13 @@ A: CrewAI is a standalone, lean, and fast Python framework built specifically fo
A: Install CrewAI using pip:
```shell
uv pip install crewai
pip install crewai
```
For additional tools, use:
```shell
uv pip install 'crewai[tools]'
pip install 'crewai[tools]'
```
### Q: Does CrewAI depend on LangChain?
@@ -735,17 +732,17 @@ A: Check out practical examples in the [CrewAI-examples repository](https://gith
A: Contributions are warmly welcomed! Fork the repository, create your branch, implement your changes, and submit a pull request. See the Contribution section of the README for detailed guidelines.
### Q: What additional features does CrewAI AMP offer?
### Q: What additional features does CrewAI AOP offer?
A: CrewAI AMP provides advanced features such as a unified control plane, real-time observability, secure integrations, advanced security, actionable insights, and dedicated 24/7 enterprise support.
A: CrewAI AOP provides advanced features such as a unified control plane, real-time observability, secure integrations, advanced security, actionable insights, and dedicated 24/7 enterprise support.
### Q: Is CrewAI AMP available for cloud and on-premise deployments?
### Q: Is CrewAI AOP available for cloud and on-premise deployments?
A: Yes, CrewAI AMP supports both cloud-based and on-premise deployment options, allowing enterprises to meet their specific security and compliance requirements.
A: Yes, CrewAI AOP supports both cloud-based and on-premise deployment options, allowing enterprises to meet their specific security and compliance requirements.
### Q: Can I try CrewAI AMP for free?
### Q: Can I try CrewAI AOP for free?
A: Yes, you can explore part of the CrewAI AMP Suite by accessing the [Crew Control Plane](https://app.crewai.com) for free.
A: Yes, you can explore part of the CrewAI AOP Suite by accessing the [Crew Control Plane](https://app.crewai.com) for free.
### Q: Does CrewAI support fine-tuning or training custom models?
@@ -765,7 +762,7 @@ A: CrewAI is highly scalable, supporting simple automations and large-scale ente
### Q: Does CrewAI offer debugging and monitoring tools?
A: Yes, CrewAI AMP includes advanced debugging, tracing, and real-time observability features, simplifying the management and troubleshooting of your automations.
A: Yes, CrewAI AOP includes advanced debugging, tracing, and real-time observability features, simplifying the management and troubleshooting of your automations.
### Q: What programming languages does CrewAI support?

View File

@@ -1,8 +1,6 @@
"""Pytest configuration for crewAI workspace."""
import base64
from collections.abc import Generator
import gzip
import os
from pathlib import Path
import tempfile
@@ -12,36 +10,12 @@ from dotenv import load_dotenv
import pytest
from vcr.request import Request # type: ignore[import-untyped]
try:
import vcr.stubs.httpx_stubs as httpx_stubs # type: ignore[import-untyped]
except ModuleNotFoundError:
import vcr.stubs.httpcore_stubs as httpx_stubs # type: ignore[import-untyped]
env_test_path = Path(__file__).parent / ".env.test"
load_dotenv(env_test_path, override=True)
load_dotenv(override=True)
def _patched_make_vcr_request(httpx_request: Any, **kwargs: Any) -> Any:
"""Patched version of VCR's _make_vcr_request that handles binary content.
The original implementation fails on binary request bodies (like file uploads)
because it assumes all content can be decoded as UTF-8.
"""
raw_body = httpx_request.read()
try:
body = raw_body.decode("utf-8")
except UnicodeDecodeError:
body = base64.b64encode(raw_body).decode("ascii")
uri = str(httpx_request.url)
headers = dict(httpx_request.headers)
return Request(httpx_request.method, uri, body, headers)
httpx_stubs._make_vcr_request = _patched_make_vcr_request
@pytest.fixture(autouse=True, scope="function")
def cleanup_event_handlers() -> Generator[None, Any, None]:
"""Clean up event bus handlers after each test to prevent test pollution."""
@@ -57,21 +31,6 @@ def cleanup_event_handlers() -> Generator[None, Any, None]:
pass
@pytest.fixture(autouse=True, scope="function")
def reset_event_state() -> None:
"""Reset event system state before each test for isolation."""
from crewai.events.base_events import reset_emission_counter
from crewai.events.event_context import (
EventContextConfig,
_event_context_config,
_event_id_stack,
)
reset_emission_counter()
_event_id_stack.set(())
_event_context_config.set(EventContextConfig())
@pytest.fixture(autouse=True, scope="function")
def setup_test_environment() -> Generator[None, Any, None]:
"""Setup test environment for crewAI workspace."""
@@ -161,8 +120,6 @@ HEADERS_TO_FILTER = {
"accept-encoding": "ACCEPT-ENCODING-XXX",
"x-amzn-requestid": "X-AMZN-REQUESTID-XXX",
"x-amzn-RequestId": "X-AMZN-REQUESTID-XXX",
"x-a2a-notification-token": "X-A2A-NOTIFICATION-TOKEN-XXX",
"x-a2a-version": "X-A2A-VERSION-XXX",
}
@@ -174,42 +131,15 @@ def _filter_request_headers(request: Request) -> Request: # type: ignore[no-any
request.headers[variant] = [replacement]
request.method = request.method.upper()
# Normalize Azure OpenAI endpoints to a consistent placeholder for cassette matching.
if request.host and request.host.endswith(".openai.azure.com"):
original_host = request.host
placeholder_host = "fake-azure-endpoint.openai.azure.com"
request.uri = request.uri.replace(original_host, placeholder_host)
return request
def _filter_response_headers(response: dict[str, Any]) -> dict[str, Any] | None:
"""Filter sensitive headers from response before recording.
Returns None to skip recording responses with empty bodies. This handles
duplicate recordings caused by OpenAI's stainless client using
with_raw_response which triggers httpx to re-read the consumed stream.
"""
body = response.get("body", {}).get("string", "")
headers = response.get("headers", {})
content_length = headers.get("content-length", headers.get("Content-Length", []))
if body == "" or body == b"" or content_length == ["0"]:
return None
for encoding_header in ["Content-Encoding", "content-encoding"]:
if encoding_header in headers:
encoding = headers.pop(encoding_header)
if encoding and encoding[0] == "gzip":
body = response.get("body", {}).get("string", b"")
if isinstance(body, bytes) and body.startswith(b"\x1f\x8b"):
response["body"]["string"] = gzip.decompress(body).decode("utf-8")
def _filter_response_headers(response: dict[str, Any]) -> dict[str, Any]:
"""Filter sensitive headers from response before recording."""
for header_name, replacement in HEADERS_TO_FILTER.items():
for variant in [header_name, header_name.upper(), header_name.title()]:
if variant in headers:
headers[variant] = [replacement]
if variant in response["headers"]:
response["headers"][variant] = [replacement]
return response
@@ -224,10 +154,7 @@ def vcr_cassette_dir(request: Any) -> str:
test_file = Path(request.fspath)
for parent in test_file.parents:
if (
parent.name in ("crewai", "crewai-tools", "crewai-files")
and parent.parent.name == "lib"
):
if parent.name in ("crewai", "crewai-tools") and parent.parent.name == "lib":
package_root = parent
break
else:

View File

@@ -61,9 +61,7 @@
"groups": [
{
"group": "Welcome",
"pages": [
"index"
]
"pages": ["index"]
}
]
},
@@ -73,80 +71,40 @@
"groups": [
{
"group": "Get Started",
"pages": [
"en/introduction",
"en/installation",
"en/quickstart"
]
"pages": ["en/introduction", "en/installation", "en/quickstart"]
},
{
"group": "AI Docs",
"group": "Guides",
"pages": [
"en/ai/overview",
{
"group": "Flows",
"icon": "arrow-progress",
"pages": [
"en/ai/flows/index",
"en/ai/flows/reference",
"en/ai/flows/patterns",
"en/ai/flows/troubleshooting",
"en/ai/flows/examples"
]
"group": "Strategy",
"icon": "compass",
"pages": ["en/guides/concepts/evaluating-use-cases"]
},
{
"group": "Agents",
"icon": "user",
"pages": [
"en/ai/agents/index",
"en/ai/agents/reference",
"en/ai/agents/patterns",
"en/ai/agents/troubleshooting",
"en/ai/agents/examples"
]
"pages": ["en/guides/agents/crafting-effective-agents"]
},
{
"group": "Crews",
"icon": "users",
"pages": ["en/guides/crews/first-crew"]
},
{
"group": "Flows",
"icon": "code-branch",
"pages": [
"en/ai/crews/index",
"en/ai/crews/reference",
"en/ai/crews/patterns",
"en/ai/crews/troubleshooting",
"en/ai/crews/examples"
"en/guides/flows/first-flow",
"en/guides/flows/mastering-flow-state"
]
},
{
"group": "LLMs",
"icon": "microchip-ai",
"group": "Advanced",
"icon": "gear",
"pages": [
"en/ai/llms/index",
"en/ai/llms/reference",
"en/ai/llms/patterns",
"en/ai/llms/troubleshooting",
"en/ai/llms/examples"
]
},
{
"group": "Memory",
"icon": "database",
"pages": [
"en/ai/memory/index",
"en/ai/memory/reference",
"en/ai/memory/patterns",
"en/ai/memory/troubleshooting",
"en/ai/memory/examples"
]
},
{
"group": "Tools",
"icon": "wrench",
"pages": [
"en/ai/tools/index",
"en/ai/tools/reference",
"en/ai/tools/patterns",
"en/ai/tools/troubleshooting",
"en/ai/tools/examples"
"en/guides/advanced/customizing-prompts",
"en/guides/advanced/fingerprinting"
]
}
]
@@ -158,10 +116,8 @@
"en/concepts/tasks",
"en/concepts/crews",
"en/concepts/flows",
"en/concepts/production-architecture",
"en/concepts/knowledge",
"en/concepts/llms",
"en/concepts/files",
"en/concepts/processes",
"en/concepts/collaboration",
"en/concepts/training",
@@ -174,55 +130,6 @@
"en/concepts/event-listener"
]
},
{
"group": "Guides",
"pages": [
{
"group": "Strategy",
"icon": "compass",
"pages": [
"en/guides/concepts/evaluating-use-cases"
]
},
{
"group": "Agents",
"icon": "user",
"pages": [
"en/guides/agents/crafting-effective-agents"
]
},
{
"group": "Crews",
"icon": "users",
"pages": [
"en/guides/crews/first-crew"
]
},
{
"group": "Flows",
"icon": "code-branch",
"pages": [
"en/guides/flows/first-flow",
"en/guides/flows/mastering-flow-state"
]
},
{
"group": "Coding Tools",
"icon": "terminal",
"pages": [
"en/guides/coding-tools/agents-md"
]
},
{
"group": "Advanced",
"icon": "gear",
"pages": [
"en/guides/advanced/customizing-prompts",
"en/guides/advanced/fingerprinting"
]
}
]
},
{
"group": "MCP Integration",
"pages": [
@@ -346,8 +253,7 @@
"pages": [
"en/tools/integration/overview",
"en/tools/integration/bedrockinvokeagenttool",
"en/tools/integration/crewaiautomationtool",
"en/tools/integration/mergeagenthandlertool"
"en/tools/integration/crewaiautomationtool"
]
},
{
@@ -371,7 +277,6 @@
"en/observability/arize-phoenix",
"en/observability/braintrust",
"en/observability/datadog",
"en/observability/galileo",
"en/observability/langdb",
"en/observability/langfuse",
"en/observability/langtrace",
@@ -402,8 +307,6 @@
"en/learn/hierarchical-process",
"en/learn/human-input-on-execution",
"en/learn/human-in-the-loop",
"en/learn/human-feedback-in-flows",
"en/learn/flowstate-chat-history",
"en/learn/kickoff-async",
"en/learn/kickoff-for-each",
"en/learn/llm-connections",
@@ -418,21 +321,17 @@
},
{
"group": "Telemetry",
"pages": [
"en/telemetry"
]
"pages": ["en/telemetry"]
}
]
},
{
"tab": "AMP",
"tab": "AOP",
"icon": "briefcase",
"groups": [
{
"group": "Getting Started",
"pages": [
"en/enterprise/introduction"
]
"pages": ["en/enterprise/introduction"]
},
{
"group": "Build",
@@ -441,8 +340,7 @@
"en/enterprise/features/crew-studio",
"en/enterprise/features/marketplace",
"en/enterprise/features/agent-repositories",
"en/enterprise/features/tools-and-integrations",
"en/enterprise/features/pii-trace-redactions"
"en/enterprise/features/tools-and-integrations"
]
},
{
@@ -450,8 +348,7 @@
"pages": [
"en/enterprise/features/traces",
"en/enterprise/features/webhook-streaming",
"en/enterprise/features/hallucination-guardrail",
"en/enterprise/features/flow-hitl-management"
"en/enterprise/features/hallucination-guardrail"
]
},
{
@@ -511,8 +408,7 @@
"group": "How-To Guides",
"pages": [
"en/enterprise/guides/build-crew",
"en/enterprise/guides/prepare-for-deployment",
"en/enterprise/guides/deploy-to-amp",
"en/enterprise/guides/deploy-crew",
"en/enterprise/guides/kickoff-crew",
"en/enterprise/guides/update-crew",
"en/enterprise/guides/enable-crew-studio",
@@ -527,9 +423,7 @@
},
{
"group": "Resources",
"pages": [
"en/enterprise/resources/frequently-asked-questions"
]
"pages": ["en/enterprise/resources/frequently-asked-questions"]
}
]
},
@@ -555,9 +449,7 @@
"groups": [
{
"group": "Examples",
"pages": [
"en/examples/cookbooks"
]
"pages": ["en/examples/example", "en/examples/cookbooks"]
}
]
},
@@ -567,9 +459,7 @@
"groups": [
{
"group": "Release Notes",
"pages": [
"en/changelog"
]
"pages": ["en/changelog"]
}
]
}
@@ -608,9 +498,7 @@
"groups": [
{
"group": "Bem-vindo",
"pages": [
"pt-BR/index"
]
"pages": ["pt-BR/index"]
}
]
},
@@ -632,23 +520,17 @@
{
"group": "Estratégia",
"icon": "compass",
"pages": [
"pt-BR/guides/concepts/evaluating-use-cases"
]
"pages": ["pt-BR/guides/concepts/evaluating-use-cases"]
},
{
"group": "Agentes",
"icon": "user",
"pages": [
"pt-BR/guides/agents/crafting-effective-agents"
]
"pages": ["pt-BR/guides/agents/crafting-effective-agents"]
},
{
"group": "Crews",
"icon": "users",
"pages": [
"pt-BR/guides/crews/first-crew"
]
"pages": ["pt-BR/guides/crews/first-crew"]
},
{
"group": "Flows",
@@ -675,10 +557,8 @@
"pt-BR/concepts/tasks",
"pt-BR/concepts/crews",
"pt-BR/concepts/flows",
"pt-BR/concepts/production-architecture",
"pt-BR/concepts/knowledge",
"pt-BR/concepts/llms",
"pt-BR/concepts/files",
"pt-BR/concepts/processes",
"pt-BR/concepts/collaboration",
"pt-BR/concepts/training",
@@ -821,12 +701,10 @@
{
"group": "Observabilidade",
"pages": [
"pt-BR/observability/tracing",
"pt-BR/observability/overview",
"pt-BR/observability/arize-phoenix",
"pt-BR/observability/braintrust",
"pt-BR/observability/datadog",
"pt-BR/observability/galileo",
"pt-BR/observability/langdb",
"pt-BR/observability/langfuse",
"pt-BR/observability/langtrace",
@@ -856,7 +734,6 @@
"pt-BR/learn/hierarchical-process",
"pt-BR/learn/human-input-on-execution",
"pt-BR/learn/human-in-the-loop",
"pt-BR/learn/human-feedback-in-flows",
"pt-BR/learn/kickoff-async",
"pt-BR/learn/kickoff-for-each",
"pt-BR/learn/llm-connections",
@@ -871,21 +748,17 @@
},
{
"group": "Telemetria",
"pages": [
"pt-BR/telemetry"
]
"pages": ["pt-BR/telemetry"]
}
]
},
{
"tab": "AMP",
"tab": "AOP",
"icon": "briefcase",
"groups": [
{
"group": "Começando",
"pages": [
"pt-BR/enterprise/introduction"
]
"pages": ["pt-BR/enterprise/introduction"]
},
{
"group": "Construir",
@@ -894,8 +767,7 @@
"pt-BR/enterprise/features/crew-studio",
"pt-BR/enterprise/features/marketplace",
"pt-BR/enterprise/features/agent-repositories",
"pt-BR/enterprise/features/tools-and-integrations",
"pt-BR/enterprise/features/pii-trace-redactions"
"pt-BR/enterprise/features/tools-and-integrations"
]
},
{
@@ -903,8 +775,7 @@
"pages": [
"pt-BR/enterprise/features/traces",
"pt-BR/enterprise/features/webhook-streaming",
"pt-BR/enterprise/features/hallucination-guardrail",
"pt-BR/enterprise/features/flow-hitl-management"
"pt-BR/enterprise/features/hallucination-guardrail"
]
},
{
@@ -948,8 +819,7 @@
"group": "Guias",
"pages": [
"pt-BR/enterprise/guides/build-crew",
"pt-BR/enterprise/guides/prepare-for-deployment",
"pt-BR/enterprise/guides/deploy-to-amp",
"pt-BR/enterprise/guides/deploy-crew",
"pt-BR/enterprise/guides/kickoff-crew",
"pt-BR/enterprise/guides/update-crew",
"pt-BR/enterprise/guides/enable-crew-studio",
@@ -1007,10 +877,7 @@
"groups": [
{
"group": "Exemplos",
"pages": [
"pt-BR/examples/example",
"pt-BR/examples/cookbooks"
]
"pages": ["pt-BR/examples/example", "pt-BR/examples/cookbooks"]
}
]
},
@@ -1020,9 +887,7 @@
"groups": [
{
"group": "Notas de Versão",
"pages": [
"pt-BR/changelog"
]
"pages": ["pt-BR/changelog"]
}
]
}
@@ -1061,9 +926,7 @@
"groups": [
{
"group": "환영합니다",
"pages": [
"ko/index"
]
"pages": ["ko/index"]
}
]
},
@@ -1073,11 +936,7 @@
"groups": [
{
"group": "시작 안내",
"pages": [
"ko/introduction",
"ko/installation",
"ko/quickstart"
]
"pages": ["ko/introduction", "ko/installation", "ko/quickstart"]
},
{
"group": "가이드",
@@ -1085,23 +944,17 @@
{
"group": "전략",
"icon": "compass",
"pages": [
"ko/guides/concepts/evaluating-use-cases"
]
"pages": ["ko/guides/concepts/evaluating-use-cases"]
},
{
"group": "에이전트 (Agents)",
"icon": "user",
"pages": [
"ko/guides/agents/crafting-effective-agents"
]
"pages": ["ko/guides/agents/crafting-effective-agents"]
},
{
"group": "크루 (Crews)",
"icon": "users",
"pages": [
"ko/guides/crews/first-crew"
]
"pages": ["ko/guides/crews/first-crew"]
},
{
"group": "플로우 (Flows)",
@@ -1128,10 +981,8 @@
"ko/concepts/tasks",
"ko/concepts/crews",
"ko/concepts/flows",
"ko/concepts/production-architecture",
"ko/concepts/knowledge",
"ko/concepts/llms",
"ko/concepts/files",
"ko/concepts/processes",
"ko/concepts/collaboration",
"ko/concepts/training",
@@ -1286,12 +1137,10 @@
{
"group": "Observability",
"pages": [
"ko/observability/tracing",
"ko/observability/overview",
"ko/observability/arize-phoenix",
"ko/observability/braintrust",
"ko/observability/datadog",
"ko/observability/galileo",
"ko/observability/langdb",
"ko/observability/langfuse",
"ko/observability/langtrace",
@@ -1321,7 +1170,6 @@
"ko/learn/hierarchical-process",
"ko/learn/human-input-on-execution",
"ko/learn/human-in-the-loop",
"ko/learn/human-feedback-in-flows",
"ko/learn/kickoff-async",
"ko/learn/kickoff-for-each",
"ko/learn/llm-connections",
@@ -1336,9 +1184,7 @@
},
{
"group": "Telemetry",
"pages": [
"ko/telemetry"
]
"pages": ["ko/telemetry"]
}
]
},
@@ -1348,9 +1194,7 @@
"groups": [
{
"group": "시작 안내",
"pages": [
"ko/enterprise/introduction"
]
"pages": ["ko/enterprise/introduction"]
},
{
"group": "빌드",
@@ -1359,8 +1203,7 @@
"ko/enterprise/features/crew-studio",
"ko/enterprise/features/marketplace",
"ko/enterprise/features/agent-repositories",
"ko/enterprise/features/tools-and-integrations",
"ko/enterprise/features/pii-trace-redactions"
"ko/enterprise/features/tools-and-integrations"
]
},
{
@@ -1368,8 +1211,7 @@
"pages": [
"ko/enterprise/features/traces",
"ko/enterprise/features/webhook-streaming",
"ko/enterprise/features/hallucination-guardrail",
"ko/enterprise/features/flow-hitl-management"
"ko/enterprise/features/hallucination-guardrail"
]
},
{
@@ -1413,8 +1255,7 @@
"group": "How-To Guides",
"pages": [
"ko/enterprise/guides/build-crew",
"ko/enterprise/guides/prepare-for-deployment",
"ko/enterprise/guides/deploy-to-amp",
"ko/enterprise/guides/deploy-crew",
"ko/enterprise/guides/kickoff-crew",
"ko/enterprise/guides/update-crew",
"ko/enterprise/guides/enable-crew-studio",
@@ -1444,9 +1285,7 @@
},
{
"group": "학습 자원",
"pages": [
"ko/enterprise/resources/frequently-asked-questions"
]
"pages": ["ko/enterprise/resources/frequently-asked-questions"]
}
]
},
@@ -1472,10 +1311,7 @@
"groups": [
{
"group": "예시",
"pages": [
"ko/examples/example",
"ko/examples/cookbooks"
]
"pages": ["ko/examples/example", "ko/examples/cookbooks"]
}
]
},
@@ -1485,9 +1321,7 @@
"groups": [
{
"group": "릴리스 노트",
"pages": [
"ko/changelog"
]
"pages": ["ko/changelog"]
}
]
}
@@ -1554,18 +1388,6 @@
"source": "/api-reference",
"destination": "/en/api-reference/introduction"
},
{
"source": "/",
"destination": "/en/introduction"
},
{
"source": "/en",
"destination": "/en/introduction"
},
{
"source": "/en/examples/example",
"destination": "/en/examples/cookbooks"
},
{
"source": "/introduction",
"destination": "/en/introduction"
@@ -1614,18 +1436,6 @@
"source": "/enterprise/:path*",
"destination": "/en/enterprise/:path*"
},
{
"source": "/en/enterprise/guides/deploy-crew",
"destination": "/en/enterprise/guides/deploy-to-amp"
},
{
"source": "/ko/enterprise/guides/deploy-crew",
"destination": "/ko/enterprise/guides/deploy-to-amp"
},
{
"source": "/pt-BR/enterprise/guides/deploy-crew",
"destination": "/pt-BR/enterprise/guides/deploy-to-amp"
},
{
"source": "/api-reference/:path*",
"destination": "/en/api-reference/:path*"

View File

@@ -1,12 +0,0 @@
---
title: "Agents: Examples"
description: "Runnable examples for robust agent configuration and execution."
icon: "rocket-launch"
mode: "wide"
---
## Example links
- [/en/guides/agents/crafting-effective-agents](/en/guides/agents/crafting-effective-agents)
- [/en/learn/customizing-agents](/en/learn/customizing-agents)
- [/en/learn/coding-agents](/en/learn/coding-agents)

View File

@@ -1,32 +0,0 @@
---
title: "Agents: Concepts"
description: "Agent role contracts, task boundaries, and decision criteria for robust agent behavior."
icon: "user"
mode: "wide"
---
## When to use
- You need specialized behavior with explicit role and goal.
- You need tool-enabled execution under constraints.
## When not to use
- Static transformations are enough without model reasoning.
- Task can be solved by deterministic code only.
## Core decisions
| Decision | Choose this when |
|---|---|
| Single agent | Narrow scope, low coordination needs |
| Multi-agent crew | Distinct expertise and review loops needed |
| Tool-enabled agent | Model needs external actions or data |
## Canonical links
- Reference: [/en/ai/agents/reference](/en/ai/agents/reference)
- Patterns: [/en/ai/agents/patterns](/en/ai/agents/patterns)
- Troubleshooting: [/en/ai/agents/troubleshooting](/en/ai/agents/troubleshooting)
- Examples: [/en/ai/agents/examples](/en/ai/agents/examples)
- Existing docs: [/en/concepts/agents](/en/concepts/agents)

View File

@@ -1,17 +0,0 @@
---
title: "Agents: Patterns"
description: "Practical agent patterns for role design, tool boundaries, and reliable outputs."
icon: "diagram-project"
mode: "wide"
---
## Patterns
1. Role + reviewer pair
- One agent drafts, one agent validates.
2. Tool-bounded agent
- Restrict tool list to minimal action set.
3. Structured output agent
- Force JSON or schema output for automation pipelines.

View File

@@ -1,22 +0,0 @@
---
title: "Agents: Reference"
description: "Reference for agent fields, prompt contracts, tool usage, and output constraints."
icon: "book"
mode: "wide"
---
## Agent contract
- `role`: stable operating identity
- `goal`: measurable completion objective
- `backstory`: bounded style and context
- `tools`: allowed action surface
## Output contract
- Prefer structured outputs for machine workflows.
- Define failure behavior for missing tool data.
## Canonical source
Primary API details live in [/en/concepts/agents](/en/concepts/agents).

View File

@@ -1,12 +0,0 @@
---
title: "Agents: Troubleshooting"
description: "Diagnose and fix common agent reliability and instruction-following failures."
icon: "circle-exclamation"
mode: "wide"
---
## Common issues
- Hallucinated tool results: require tool-call evidence in output.
- Prompt drift: tighten role and success criteria.
- Verbose but low-signal output: enforce concise schema output.

View File

@@ -1,12 +0,0 @@
---
title: "Crews: Examples"
description: "Runnable crew examples for sequential and hierarchical execution."
icon: "rocket-launch"
mode: "wide"
---
## Example links
- [/en/guides/crews/first-crew](/en/guides/crews/first-crew)
- [/en/learn/sequential-process](/en/learn/sequential-process)
- [/en/learn/hierarchical-process](/en/learn/hierarchical-process)

View File

@@ -1,26 +0,0 @@
---
title: "Crews: Concepts"
description: "When to use crews, process selection, delegation boundaries, and collaboration strategy."
icon: "users"
mode: "wide"
---
## When to use
- You need multiple agents with specialized roles.
- You need staged execution and reviewer loops.
## Process decision table
| Process | Best for |
|---|---|
| Sequential | Linear pipelines and deterministic ordering |
| Hierarchical | Manager-controlled planning and delegation |
## Canonical links
- Reference: [/en/ai/crews/reference](/en/ai/crews/reference)
- Patterns: [/en/ai/crews/patterns](/en/ai/crews/patterns)
- Troubleshooting: [/en/ai/crews/troubleshooting](/en/ai/crews/troubleshooting)
- Examples: [/en/ai/crews/examples](/en/ai/crews/examples)
- Existing docs: [/en/concepts/crews](/en/concepts/crews)

View File

@@ -1,12 +0,0 @@
---
title: "Crews: Patterns"
description: "Production crew patterns for decomposition, review loops, and hybrid orchestration with Flows."
icon: "diagram-project"
mode: "wide"
---
## Patterns
1. Researcher + writer + reviewer
2. Manager-directed hierarchical crew
3. Flow-orchestrated multi-crew pipeline

View File

@@ -1,21 +0,0 @@
---
title: "Crews: Reference"
description: "Reference for crew composition, process semantics, task context passing, and execution modes."
icon: "book"
mode: "wide"
---
## Crew contract
- `agents`: available executors
- `tasks`: work units with expected output
- `process`: ordering and delegation semantics
## Runtime
- `kickoff()` for synchronous runs
- `kickoff_async()` for async execution
## Canonical source
Primary API details live in [/en/concepts/crews](/en/concepts/crews).

View File

@@ -1,12 +0,0 @@
---
title: "Crews: Troubleshooting"
description: "Common multi-agent coordination failures and practical fixes."
icon: "circle-exclamation"
mode: "wide"
---
## Common issues
- Agents overlap on responsibilities: tighten role boundaries.
- Output inconsistency: standardize expected outputs per task.
- Slow runs: reduce unnecessary handoffs and model size.

View File

@@ -1,17 +0,0 @@
---
title: "Flows: Examples"
description: "Runnable end-to-end examples for production flow orchestration."
icon: "rocket-launch"
mode: "wide"
---
## Canonical examples
<CardGroup cols={2}>
<Card title="Flowstate Chat History" icon="comments" href="/en/learn/flowstate-chat-history">
Persistent chat history with summary compaction and memory scope.
</Card>
<Card title="Flows Concepts Example" icon="arrow-progress" href="/en/concepts/flows">
Full API and feature-oriented flow examples, including routers and persistence.
</Card>
</CardGroup>

View File

@@ -1,39 +0,0 @@
---
title: "Flows: Concepts"
description: "When to use Flows, when not to use them, and key design constraints for production orchestration."
icon: "arrow-progress"
mode: "wide"
---
## When to use
- You need deterministic orchestration, branching, and resumable execution.
- You need explicit state transitions across steps.
- You need persistence, routing, and event-driven control.
## When not to use
- A single prompt/response interaction is enough.
- You only need one agent call without orchestration logic.
## Core decisions
| Decision | Choose this when |
|---|---|
| Unstructured state | Fast prototyping, highly dynamic fields |
| Structured state | Stable contracts, team development, type safety |
| `@persist()` | Long-running workflows and recovery requirements |
| Router labels | Deterministic branch handling |
## Canonical links
- Reference: [/en/ai/flows/reference](/en/ai/flows/reference)
- Patterns: [/en/ai/flows/patterns](/en/ai/flows/patterns)
- Troubleshooting: [/en/ai/flows/troubleshooting](/en/ai/flows/troubleshooting)
- Examples: [/en/ai/flows/examples](/en/ai/flows/examples)
## Existing docs
- [/en/concepts/flows](/en/concepts/flows)
- [/en/guides/flows/mastering-flow-state](/en/guides/flows/mastering-flow-state)
- [/en/learn/flowstate-chat-history](/en/learn/flowstate-chat-history)

View File

@@ -1,29 +0,0 @@
---
title: "Flows: Patterns"
description: "Production flow patterns: triage routing, flowstate chat history, and human-in-the-loop checkpoints."
icon: "diagram-project"
mode: "wide"
---
## Recommended patterns
1. Triage router flow
- Inputs: normalized request payload
- Output: deterministic route label + action
- Reference: [/en/concepts/flows](/en/concepts/flows)
2. Flowstate chat history
- Inputs: `session_id`, `last_user_message`
- Output: assistant reply + compact context state
- Reference: [/en/learn/flowstate-chat-history](/en/learn/flowstate-chat-history)
3. Human feedback gates
- Inputs: generated artifact + reviewer feedback
- Output: approved/rejected/revision path
- Reference: [/en/learn/human-feedback-in-flows](/en/learn/human-feedback-in-flows)
## Pattern requirements
- declare explicit input schema
- define expected output shape
- list failure modes and retries

View File

@@ -1,34 +0,0 @@
---
title: "Flows: Reference"
description: "API-oriented reference for Flow decorators, lifecycle semantics, state, routing, and persistence."
icon: "book"
mode: "wide"
---
## Decorators
- `@start()` entrypoint, optional conditional trigger
- `@listen(...)` downstream method subscription
- `@router(...)` label-based deterministic routing
- `@persist()` automatic state persistence checkpoints
## Runtime contracts
- `kickoff(inputs=...)` initializes or updates run inputs.
- final output is the value from the last completed method.
- `self.state` always has an auto-generated `id`.
## State contracts
- Use typed state for durable workflows.
- Keep control fields explicit (`route`, `status`, `retry_count`).
- Avoid storing unbounded raw transcripts in state.
## Resume and recovery
- Use persistence for recoverable runs.
- Keep idempotent step logic for safe retries.
## Canonical source
Primary API details live in [/en/concepts/flows](/en/concepts/flows).

View File

@@ -1,28 +0,0 @@
---
title: "Flows: Troubleshooting"
description: "Common flow failures, causes, and fixes for state, routing, persistence, and resumption."
icon: "circle-exclamation"
mode: "wide"
---
## Common issues
### Branch did not trigger
- Cause: router label mismatch.
- Fix: align returned label with `@listen("label")` exactly.
### State fields missing
- Cause: untyped dynamic writes or missing inputs.
- Fix: switch to typed state and validate required fields at `@start()`.
### Context window blow-up
- Cause: raw message accumulation.
- Fix: use sliding window + summary compaction pattern.
### Resume behavior inconsistent
- Cause: non-idempotent side effects in retried steps.
- Fix: make side-effecting calls idempotent and record execution markers in state.

View File

@@ -1,12 +0,0 @@
---
title: "LLMs: Examples"
description: "Concrete examples for model setup, routing, and output-control patterns."
icon: "rocket-launch"
mode: "wide"
---
## Example links
- [/en/concepts/llms](/en/concepts/llms)
- [/en/learn/llm-connections](/en/learn/llm-connections)
- [/en/learn/custom-llm](/en/learn/custom-llm)

View File

@@ -1,27 +0,0 @@
---
title: "LLMs: Concepts"
description: "Model selection strategy, cost-quality tradeoffs, and reliability posture for CrewAI systems."
icon: "microchip-ai"
mode: "wide"
---
## When to use advanced LLM configuration
- You need predictable quality, latency, and cost control.
- You need model routing by task type.
## Core decisions
| Decision | Choose this when |
|---|---|
| Single model | Small systems with uniform task profile |
| Routed models | Mixed workloads with different quality/cost needs |
| Structured output | Automation pipelines and strict parsing needs |
## Canonical links
- Reference: [/en/ai/llms/reference](/en/ai/llms/reference)
- Patterns: [/en/ai/llms/patterns](/en/ai/llms/patterns)
- Troubleshooting: [/en/ai/llms/troubleshooting](/en/ai/llms/troubleshooting)
- Examples: [/en/ai/llms/examples](/en/ai/llms/examples)
- Existing docs: [/en/concepts/llms](/en/concepts/llms)

View File

@@ -1,17 +0,0 @@
---
title: "LLMs: Patterns"
description: "Model routing, reliability defaults, and structured outputs for production AI workflows."
icon: "diagram-project"
mode: "wide"
---
## Patterns
1. Role-based model routing
2. Reliability defaults (`timeout`, `max_retries`, low temperature)
3. JSON-first outputs for machine consumption
4. Responses API for multi-turn reasoning flows
## Reference
- [/en/concepts/llms#production-llm-patterns](/en/concepts/llms#production-llm-patterns)

View File

@@ -1,25 +0,0 @@
---
title: "LLMs: Reference"
description: "Provider-agnostic LLM configuration reference for CrewAI projects."
icon: "book"
mode: "wide"
---
## Common parameters
- `model`
- `temperature`
- `max_tokens`
- `timeout`
- `max_retries`
- `response_format`
## Contract guidance
- Set low temperature for extraction/classification.
- Use structured outputs for downstream automation.
- Set explicit timeout and retry policy for production.
## Canonical source
Primary API details live in [/en/concepts/llms](/en/concepts/llms).

View File

@@ -1,12 +0,0 @@
---
title: "LLMs: Troubleshooting"
description: "Fix common model behavior failures: drift, latency spikes, malformed output, and cost overruns."
icon: "circle-exclamation"
mode: "wide"
---
## Common issues
- Malformed JSON: enforce `response_format` and validate at boundary.
- Latency spikes: route heavy tasks to smaller models when acceptable.
- Cost growth: add budget-aware model routing and truncation rules.

View File

@@ -1,11 +0,0 @@
---
title: "Memory: Examples"
description: "Runnable examples for scoped storage and semantic retrieval in CrewAI."
icon: "rocket-launch"
mode: "wide"
---
## Example links
- [/en/concepts/memory](/en/concepts/memory)
- [/en/learn/flowstate-chat-history](/en/learn/flowstate-chat-history)

View File

@@ -1,24 +0,0 @@
---
title: "Memory: Concepts"
description: "Designing recall systems with scope boundaries and state-vs-memory separation."
icon: "database"
mode: "wide"
---
## When to use memory
- You need semantic recall across runs.
- You need long-term context outside immediate flow state.
## When to use state instead
- Data is only needed for current control flow.
- Data must remain deterministic and explicit per step.
## Canonical links
- Reference: [/en/ai/memory/reference](/en/ai/memory/reference)
- Patterns: [/en/ai/memory/patterns](/en/ai/memory/patterns)
- Troubleshooting: [/en/ai/memory/troubleshooting](/en/ai/memory/troubleshooting)
- Examples: [/en/ai/memory/examples](/en/ai/memory/examples)
- Existing docs: [/en/concepts/memory](/en/concepts/memory)

View File

@@ -1,17 +0,0 @@
---
title: "Memory: Patterns"
description: "Practical memory patterns for session recall, scoped retrieval, and hybrid flow-state designs."
icon: "diagram-project"
mode: "wide"
---
## Patterns
1. Session-scoped recall (`/chat/{session_id}`)
2. Project-scoped knowledge (`/project/{project_id}`)
3. Hybrid pattern: flow state for control, memory for long-tail context
## Reference
- [/en/learn/flowstate-chat-history](/en/learn/flowstate-chat-history)
- [/en/guides/flows/mastering-flow-state](/en/guides/flows/mastering-flow-state)

View File

@@ -1,23 +0,0 @@
---
title: "Memory: Reference"
description: "Reference for remember/recall contracts, scopes, and retrieval tuning."
icon: "book"
mode: "wide"
---
## API surface
- `remember(content, scope=...)`
- `recall(query, limit=...)`
- `extract_memories(text)`
- `scope(path)` and `subscope(name)`
## Scope rules
- use `/{entity_type}/{identifier}` paths
- keep hierarchy shallow
- isolate sessions by stable identifiers
## Canonical source
Primary API details live in [/en/concepts/memory](/en/concepts/memory).

View File

@@ -1,12 +0,0 @@
---
title: "Memory: Troubleshooting"
description: "Diagnose poor recall quality, scope leakage, and stale memory retrieval."
icon: "circle-exclamation"
mode: "wide"
---
## Common issues
- Irrelevant recall: tighten scopes and query wording.
- Missing recall: check scope path and recency weighting.
- Scope leakage: avoid shared broad scopes for unrelated workflows.

View File

@@ -1,54 +0,0 @@
---
title: "AI-First Documentation"
description: "Canonical, agent-optimized documentation map for Flows, Agents, Crews, LLMs, Memory, and Tools."
icon: "sitemap"
mode: "wide"
---
## Purpose
This section is the canonical map for AI agents and developers.
Use it when you need:
- one source of truth per domain
- predictable page structure
- runnable patterns with explicit inputs and outputs
## Domain Packs
<CardGroup cols={3}>
<Card title="Flows" icon="arrow-progress" href="/en/ai/flows/index">
State, routing, persistence, resume, and orchestration lifecycle.
</Card>
<Card title="Agents" icon="user" href="/en/ai/agents/index">
Agent contracts, tool boundaries, prompt roles, and output discipline.
</Card>
<Card title="Crews" icon="users" href="/en/ai/crews/index">
Multi-agent execution, process choice, delegation, and coordination.
</Card>
<Card title="LLMs" icon="microchip-ai" href="/en/ai/llms/index">
Model configuration contracts, routing, reliability defaults, and providers.
</Card>
<Card title="Memory" icon="database" href="/en/ai/memory/index">
Retrieval semantics, scope design, and state-vs-memory architecture.
</Card>
<Card title="Tools" icon="wrench" href="/en/ai/tools/index">
Tool safety, schema contracts, retries, and integration patterns.
</Card>
</CardGroup>
## Writing Contract
Every domain follows the same structure:
1. Concepts (`index`)
2. Reference (`reference`)
3. Patterns (`patterns`)
4. Troubleshooting (`troubleshooting`)
5. Examples (`examples`)
## Deprecation Policy
When a page is replaced:
- keep a redirect for the old URL
- keep one canonical destination
- avoid duplicated conceptual prose

View File

@@ -1,12 +0,0 @@
---
title: "Tools: Examples"
description: "Practical examples for tool-driven agents and crews."
icon: "rocket-launch"
mode: "wide"
---
## Example links
- [/en/tools/overview](/en/tools/overview)
- [/en/learn/create-custom-tools](/en/learn/create-custom-tools)
- [/en/learn/tool-hooks](/en/learn/tool-hooks)

View File

@@ -1,25 +0,0 @@
---
title: "Tools: Concepts"
description: "Tool selection strategy, safety boundaries, and reliability rules for agentic execution."
icon: "wrench"
mode: "wide"
---
## When to use tools
- Agents need external data or side effects.
- Deterministic systems must be integrated into agent workflows.
## Tool safety rules
- define clear input schemas
- validate outputs before downstream use
- isolate privileged tools behind policy checks
## Canonical links
- Reference: [/en/ai/tools/reference](/en/ai/tools/reference)
- Patterns: [/en/ai/tools/patterns](/en/ai/tools/patterns)
- Troubleshooting: [/en/ai/tools/troubleshooting](/en/ai/tools/troubleshooting)
- Examples: [/en/ai/tools/examples](/en/ai/tools/examples)
- Existing docs: [/en/concepts/tools](/en/concepts/tools)

View File

@@ -1,12 +0,0 @@
---
title: "Tools: Patterns"
description: "Tool execution patterns for retrieval, action safety, and response grounding."
icon: "diagram-project"
mode: "wide"
---
## Patterns
1. Read-first then write pattern
2. Validation gate before side effects
3. Fallback tool chains for degraded mode

View File

@@ -1,22 +0,0 @@
---
title: "Tools: Reference"
description: "Reference for tool invocation contracts, argument schemas, and runtime safeguards."
icon: "book"
mode: "wide"
---
## Tool contract
- deterministic input schema
- stable output schema
- explicit error behavior
## Runtime safeguards
- timeout and retry policy
- idempotency for side effects
- validation before commit
## Canonical source
Primary API details live in [/en/concepts/tools](/en/concepts/tools).

View File

@@ -1,12 +0,0 @@
---
title: "Tools: Troubleshooting"
description: "Common tool-call failures and fixes for schema mismatch, retries, and side effects."
icon: "circle-exclamation"
mode: "wide"
---
## Common issues
- Schema mismatch: align tool args with declared model output schema.
- Repeated side effects: add idempotency keys.
- Tool timeouts: define retries with bounded backoff.

View File

@@ -1,32 +1,31 @@
---
title: "Introduction"
description: "Complete reference for the CrewAI AMP REST API"
description: "Complete reference for the CrewAI AOP REST API"
icon: "code"
mode: "wide"
---
# CrewAI AMP API
# CrewAI AOP API
Welcome to the CrewAI AMP API reference. This API allows you to programmatically interact with your deployed crews, enabling integration with your applications, workflows, and services.
Welcome to the CrewAI AOP API reference. This API allows you to programmatically interact with your deployed crews, enabling integration with your applications, workflows, and services.
## Quick Start
<Steps>
<Step title="Get Your API Credentials">
Navigate to your crew's detail page in the CrewAI AMP dashboard and copy your Bearer Token from the Status tab.
Navigate to your crew's detail page in the CrewAI AOP dashboard and copy your Bearer Token from the Status tab.
</Step>
<Step title="Discover Required Inputs">
Use the `GET /inputs` endpoint to see what parameters your crew expects.
</Step>
<Step title="Discover Required Inputs">
Use the `GET /inputs` endpoint to see what parameters your crew expects.
</Step>
<Step title="Start a Crew Execution">
Call `POST /kickoff` with your inputs to start the crew execution and receive
a `kickoff_id`.
</Step>
<Step title="Start a Crew Execution">
Call `POST /kickoff` with your inputs to start the crew execution and receive a `kickoff_id`.
</Step>
<Step title="Monitor Progress">
Use `GET /{kickoff_id}/status` to check execution status and retrieve results.
Use `GET /status/{kickoff_id}` to check execution status and retrieve results.
</Step>
</Steps>
@@ -41,14 +40,13 @@ curl -H "Authorization: Bearer YOUR_CREW_TOKEN" \
### Token Types
| Token Type | Scope | Use Case |
| :-------------------- | :------------------------ | :----------------------------------------------------------- |
| **Bearer Token** | Organization-level access | Full crew operations, ideal for server-to-server integration |
| **User Bearer Token** | User-scoped access | Limited permissions, suitable for user-specific operations |
| Token Type | Scope | Use Case |
|:-----------|:--------|:----------|
| **Bearer Token** | Organization-level access | Full crew operations, ideal for server-to-server integration |
| **User Bearer Token** | User-scoped access | Limited permissions, suitable for user-specific operations |
<Tip>
You can find both token types in the Status tab of your crew's detail page in
the CrewAI AMP dashboard.
You can find both token types in the Status tab of your crew's detail page in the CrewAI AOP dashboard.
</Tip>
## Base URL
@@ -65,33 +63,29 @@ Replace `your-crew-name` with your actual crew's URL from the dashboard.
1. **Discovery**: Call `GET /inputs` to understand what your crew needs
2. **Execution**: Submit inputs via `POST /kickoff` to start processing
3. **Monitoring**: Poll `GET /{kickoff_id}/status` until completion
3. **Monitoring**: Poll `GET /status/{kickoff_id}` until completion
4. **Results**: Extract the final output from the completed response
## Error Handling
The API uses standard HTTP status codes:
| Code | Meaning |
| ----- | :----------------------------------------- |
| `200` | Success |
| `400` | Bad Request - Invalid input format |
| `401` | Unauthorized - Invalid bearer token |
| `404` | Not Found - Resource doesn't exist |
| Code | Meaning |
|------|:--------|
| `200` | Success |
| `400` | Bad Request - Invalid input format |
| `401` | Unauthorized - Invalid bearer token |
| `404` | Not Found - Resource doesn't exist |
| `422` | Validation Error - Missing required inputs |
| `500` | Server Error - Contact support |
| `500` | Server Error - Contact support |
## Interactive Testing
<Info>
**Why no "Send" button?** Since each CrewAI AMP user has their own unique crew
URL, we use **reference mode** instead of an interactive playground to avoid
confusion. This shows you exactly what the requests should look like without
non-functional send buttons.
**Why no "Send" button?** Since each CrewAI AOP user has their own unique crew URL, we use **reference mode** instead of an interactive playground to avoid confusion. This shows you exactly what the requests should look like without non-functional send buttons.
</Info>
Each endpoint page shows you:
- ✅ **Exact request format** with all parameters
- ✅ **Response examples** for success and error cases
- ✅ **Code samples** in multiple languages (cURL, Python, JavaScript, etc.)
@@ -109,7 +103,6 @@ Each endpoint page shows you:
</CardGroup>
**Example workflow:**
1. **Copy this cURL example** from any endpoint page
2. **Replace `your-actual-crew-name.crewai.com`** with your real crew URL
3. **Replace the Bearer token** with your real token from the dashboard
@@ -118,18 +111,10 @@ Each endpoint page shows you:
## Need Help?
<CardGroup cols={2}>
<Card
title="Enterprise Support"
icon="headset"
href="mailto:support@crewai.com"
>
<Card title="Enterprise Support" icon="headset" href="mailto:support@crewai.com">
Get help with API integration and troubleshooting
</Card>
<Card
title="Enterprise Dashboard"
icon="chart-line"
href="https://app.crewai.com"
>
<Card title="Enterprise Dashboard" icon="chart-line" href="https://app.crewai.com">
Manage your crews and view execution logs
</Card>
</CardGroup>

View File

@@ -1,6 +1,8 @@
---
title: "GET /{kickoff_id}/status"
title: "GET /status/{kickoff_id}"
description: "Get execution status"
openapi: "/enterprise-api.en.yaml GET /{kickoff_id}/status"
openapi: "/enterprise-api.en.yaml GET /status/{kickoff_id}"
mode: "wide"
---

View File

@@ -4,584 +4,6 @@ description: "Product updates, improvements, and bug fixes for CrewAI"
icon: "clock"
mode: "wide"
---
<Update label="Jan 26, 2026">
## v1.9.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.9.0)
## What's Changed
### Features
- Add structured outputs and response_format support across providers
- Add response ID to streaming responses
- Add event ordering with parent-child hierarchies
- Add Keycloak SSO authentication support
- Add multimodal file handling capabilities
- Add native OpenAI responses API support
- Add A2A task execution utilities
- Add A2A server configuration and agent card generation
- Enhance event system and expand transport options
- Improve tool calling mechanisms
### Bug Fixes
- Enhance file store with fallback memory cache when aiocache is not available
- Ensure document list is not empty
- Handle Bedrock stop sequences properly
- Add Google Vertex API key support
- Enhance Azure model stop word detection
- Improve error handling for HumanFeedbackPending in flow execution
- Fix execution span task unlinking
### Documentation
- Add native file handling documentation
- Add OpenAI responses API documentation
- Add agent card implementation guidance
- Refine A2A documentation
- Update changelog for v1.8.0
### Contributors
@Anaisdg, @GininDenis, @Vidit-Ostwal, @greysonlalonde, @heitorado, @joaomdmoura, @koushiv777, @lorenzejay, @nicoferdi96, @vinibrsl
</Update>
<Update label="Jan 15, 2026">
## v1.8.1
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.8.1)
## What's Changed
### Features
- Add A2A task execution utilities
- Add A2A server configuration and agent card generation
- Add additional transport mechanisms
- Add Galileo integration support
### Bug Fixes
- Improve Azure model compatibility
- Expand frame inspection depth to detect parent_flow
- Resolve task execution span management issues
- Enhance error handling for human feedback scenarios during flow execution
### Documentation
- Add A2A agent card documentation
- Add PII redaction feature documentation
### Contributors
@Anaisdg, @GininDenis, @greysonlalonde, @joaomdmoura, @koushiv777, @lorenzejay, @vinibrsl
</Update>
<Update label="Jan 08, 2026">
## v1.8.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.8.0)
## What's Changed
### Features
- Add native async chain for a2a
- Add a2a update mechanisms (poll/stream/push) with handlers and config
- Introduce global flow configuration for human-in-the-loop feedback
- Add streaming tool call events and fix provider ID tracking
- Introduce production-ready Flows and Crews architecture
- Add HITL for Flows
- Improve EventListener and TraceCollectionListener for enhanced event handling
### Bug Fixes
- Handle missing a2a dependency as optional
- Correct error fetching for WorkOS login polling
- Fix wrong trigger name in sample documentation
### Documentation
- Update webhook-streaming documentation
- Adjust AOP to AMP documentation language
### Contributors
@Vidit-Ostwal, @greysonlalonde, @heitorado, @joaomdmoura, @lorenzejay, @lucasgomide, @mplachta
</Update>
<Update label="Dec 19, 2025">
## v1.7.2
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.7.2)
## What's Changed
### Bug Fixes
- Resolve connection issues
### Documentation
- Update api-reference/status docs page
### Contributors
@greysonlalonde, @heitorado, @lorenzejay, @lucasgomide
</Update>
<Update label="Dec 16, 2025">
## v1.7.1
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.7.1)
## What's Changed
### Improvements
- Add `--no-commit` flag to bump command
- Use JSON schema for tool argument serialization
### Bug Fixes
- Fix error message display from response when tool repository login fails
- Fix graceful termination of future when executing a task asynchronously
- Fix task ordering by adding index
- Fix platform compatibility checks for Windows signals
- Fix RPM controller timer to prevent process hang
- Fix token usage recording and validate response model on stream
### Documentation
- Add translated documentation for async
- Add documentation for AOP Deploy API
- Add documentation for the agent handler connector
- Add documentation on native async
### Contributors
@Llamrei, @dragosmc, @gilfeig, @greysonlalonde, @heitorado, @lorenzejay, @mattatcha, @vinibrsl
</Update>
<Update label="Dec 09, 2025">
## v1.7.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.7.0)
## What's Changed
### Features
- Add async flow kickoff
- Add async crew support
- Add async task support
- Add async knowledge support
- Add async memory support
- Add async support for tools and agent executor; improve typing and docs
- Implement a2a extensions API and async agent card caching; fix task propagation & streaming
- Add native async tool support
- Add async llm support
- Create sys event types and handler
### Bug Fixes
- Fix issue to ensure nonetypes are not passed to otel
- Fix deadlock in token store file operations
- Fix to ensure otel span is closed
- Use HuggingFaceEmbeddingFunction for embeddings, update keys and add tests
- Fix to ensure supports_tools is true for all supported anthropic models
- Ensure hooks work with lite agents flows
### Contributors
@greysonlalonde, @lorenzejay
</Update>
<Update label="Nov 29, 2025">
## v1.6.1
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.6.1)
## What's Changed
### Bug Fixes
- Fix ChatCompletionsClient call to ensure proper functionality
- Ensure async methods are executable for annotations
- Fix parameters in RagTool.add, add typing, and tests
- Remove invalid parameter from SSE client
- Erase 'oauth2_extra' setting on 'crewai config reset' command
### Refactoring
- Enhance model validation and provider inference in LLM class
### Contributors
@Vidit-Ostwal, @greysonlalonde, @heitorado, @lorenzejay
</Update>
<Update label="Nov 25, 2025">
## v1.6.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.6.0)
## What's Changed
### Features
- Add streaming result support to flows and crews
- Add gemini-3-pro-preview
- Support CLI login with Entra ID
- Add Merge Agent Handler tool
- Enhance flow event state management
### Bug Fixes
- Ensure custom rag store persist path is set if passed
- Ensure fuzzy returns are more strict and show type warning
- Re-add openai response_format parameter and add test
- Fix rag tool embeddings configuration
- Ensure flow execution start panel is not shown on plot
### Documentation
- Update references from AMP to AOP in documentation
- Update AMP to AOP
### Contributors
@Vidit-Ostwal, @gilfeig, @greysonlalonde, @heitorado, @joaomdmoura, @lorenzejay, @markmcd
</Update>
<Update label="Nov 22, 2025">
## v0.203.2
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/0.203.2)
## What's Changed
- Hotfix version bump from 0.203.1 to 0.203.2
</Update>
<Update label="Nov 16, 2025">
## v1.5.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.5.0)
## What's Changed
### Features
- Add a2a trust remote completion status flag
- Fetch and store more data about Okta authorization server
- Implement before and after LLM call hooks in CrewAgentExecutor
- Expose messages to TaskOutput and LiteAgentOutputs
- Enhance schema description of QdrantVectorSearchTool
### Bug Fixes
- Ensure tracing instrumentation flags are correctly applied
- Fix custom tool documentation links and add Mintlify broken links action
### Documentation
- Enhance task guardrail documentation with LLM-based validation support
### Contributors
@danielfsbarreto, @greysonlalonde, @heitorado, @lorenzejay, @theCyberTech
</Update>
<Update label="Nov 07, 2025">
## v1.4.1
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.4.1)
## What's Changed
### Bug Fixes
- Fix handling of agent max iterations
- Resolve routing issues for LLM model syntax to respected providers
### Contributors
@greysonlalonde
</Update>
<Update label="Nov 07, 2025">
## v1.4.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.4.0)
## What's Changed
### Features
- Add support for non-AST plot routes
- Implement first-class support for MCP
- Add Pydantic validation dunder to BaseInterceptor
- Add support for LLM message interceptor hooks
- Cache i18n prompts for efficient use
- Enhance QdrantVectorSearchTool
### Bug Fixes
- Fix issues with keeping stopwords updated
- Resolve unpickleable values in flow state
- Ensure lite agents course-correct on validation errors
- Fix callback argument hashing to ensure caching works
- Allow adding RAG source content from valid URLs
- Make plot node selection smoother
- Fix duplicating document IDs for knowledge
### Refactoring
- Improve MCP tool execution handling with concurrent futures
- Simplify flow handling, typing, and logging; update UI and tests
- Refactor stop word management to a property
### Documentation
- Migrate embedder to embedding_model and require vectordb across tool docs; add provider examples (en/ko/pt-BR)
### Contributors
@danielfsbarreto, @greysonlalonde, @lorenzejay, @lucasgomide, @tonykipkemboi
</Update>
<Update label="Nov 01, 2025">
## v1.3.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.3.0)
## What's Changed
### Features
- Refactor flow handling, typing, and logging
- Enhance QdrantVectorSearchTool
### Bug Fixes
- Fix Firecrawl tools and add tests
- Refactor use_stop_words to property and add check for stop words
### Documentation
- Migrate embedder to embedding_model and require vectordb across tool docs
- Add provider examples in English, Korean, and Portuguese
### Refactoring
- Improve flow handling and UI updates
### Contributors
@danielfsbarreto, @greysonlalonde, @lorenzejay, @lucasgomide, @tonykipkemboi
</Update>
<Update label="Oct 27, 2025">
## v1.2.1
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.2.1)
## What's Changed
### Features
- Add support for Datadog integration
- Support apps and mcps in liteagent
### Documentation
- Describe mandatory environment variable for calling Platform tools for each integration
- Add Datadog integration documentation
### Contributors
@barieom, @lorenzejay, @lucasgomide, @sabrenner
</Update>
<Update label="Oct 24, 2025">
## v1.2.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.2.0)
## What's Changed
### Bug Fixes
- Update default LLM model and improve error logging in LLM utilities
- Change flow visualization directory and method inspection
### Dropping Unused
- Remove aisuite
### Contributors
@greysonlalonde, @lorenzejay
</Update>
<Update label="Oct 21, 2025">
## v1.1.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.1.0)
## What's Changed
### Features
- Enhance InternalInstructor to support multiple LLM providers
- Implement mypy plugin base
- Improve QdrantVectorSearchTool
### Bug Fixes
- Correct broken integration documentation links
- Fix double trace call and add types
- Pin template versions to latest
### Documentation
- Update LLM integration details and examples
### Refactoring
- Improve CrewBase typing
### Contributors
@cwarre33, @danielfsbarreto, @greysonlalonde, @lorenzejay
</Update>
<Update label="Oct 20, 2025">
## v1.0.0
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.0.0)
## What's Changed
### Features
- Bump versions to 1.0.0
- Enhance knowledge and guardrail event handling in Agent class
- Inject tool repository credentials in crewai run command
### Bug Fixes
- Preserve nested condition structure in Flow decorators
- Add standard print parameters to Printer.print method
- Fix errors when there is no input() available
- Add a leeway of 10s when decoding JWT
- Revert bad cron schedule
- Correct cron schedule to run every 5 days at specific dates
- Use system PATH for Docker binary instead of hardcoded path
- Add CodeQL configuration to properly exclude template directories
### Documentation
- Update security policy for vulnerability reporting
- Add guide for capturing telemetry logs in CrewAI AMP
- Add missing /resume files
- Clarify webhook URL parameter in HITL workflows
### Contributors
@Vidit-Ostwal, @greysonlalonde, @heitorado, @joaomdmoura, @lorenzejay, @lucasgomide, @mplachta, @theCyberTech
</Update>
<Update label="Oct 18, 2025">
## v1.0.0b3 (Pre-release)
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.0.0b3)
## What's Changed
### Features
- Enhance task guardrail functionality and validation
- Improve support for importing native SDK
- Add Azure native tests
- Enhance BedrockCompletion class with advanced features
- Enhance GeminiCompletion class with client parameter support
- Enhance AnthropicCompletion class with additional client parameters
### Bug Fixes
- Preserve nested condition structure in Flow decorators
- Add standard print parameters to Printer.print method
- Remove stdout prints and improve test determinism
### Refactoring
- Convert project module to metaclass with full typing
### Contributors
@greysonlalonde, @lorenzejay
</Update>
<Update label="Oct 16, 2025">
## v1.0.0b2 (Pre-release)
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.0.0b2)
## What's Changed
### Features
- Enhance OpenAICompletion class with additional client parameters
- Improve event bus thread safety and async support
- Inject tool repository credentials in crewai run command
### Bug Fixes
- Fix issue where it errors out if there is no input() available
- Add a leeway of 10s when decoding JWT
- Fix copying and adding NOT_SPECIFIED check in task.py
### Documentation
- Ensure CREWAI_PLATFORM_INTEGRATION_TOKEN is mentioned in documentation
- Update triggers documentation
### Contributors
@Vidit-Ostwal, @greysonlalonde, @heitorado, @joaomdmoura, @lorenzejay, @lucasgomide
</Update>
<Update label="Oct 14, 2025">
## v1.0.0b1 (Pre-release)
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.0.0b1)
## What's Changed
### Features
- Enhance OpenAICompletion class with additional client parameters
- Improve event bus thread safety and async support
- Implement Bedrock LLM integration
### Bug Fixes
- Fix issue with missing input() availability
- Resolve JWT decoding error by adding a leeway of 10 seconds
- Inject tool repository credentials in crewai run command
- Fix copy and add NOT_SPECIFIED check in task.py
### Documentation
- Ensure CREWAI_PLATFORM_INTEGRATION_TOKEN is mentioned in documentation
- Update triggers documentation
### Contributors
@Vidit-Ostwal, @greysonlalonde, @heitorado, @joaomdmoura, @lorenzejay, @lucasgomide
</Update>
<Update label="Oct 13, 2025">
## v0.203.1
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/0.203.1)
## What's Changed
### Core Improvements & Fixes
- Fixed injection of tool repository credentials into the `crewai run` command
- Added a 10-second leeway when decoding JWTs to reduce token validation errors
- Corrected (then reverted) cron schedule fix intended to run jobs every 5 days at specific dates
### Documentation & Guides
- Updated security policy to clarify the process for vulnerability reporting
</Update>
<Update label="Oct 09, 2025">
## v1.0.0a4 (Pre-release)
[View release on GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.0.0a4)
## What's Changed
### Features
- Enhance knowledge and guardrail event handling in Agent class
- Introduce trigger listing and execution commands for local development
- Update documentation with new approach to consume Platform Actions
- Add guide for capturing telemetry logs in CrewAI AMP
### Bug Fixes
- Revert bad cron schedule
- Correct cron schedule to run every 5 days at specific dates
- Remove duplicate line and add explicit environment variable
- Resolve linting errors across the codebase
- Replace print statements with logger in agent and memory handling
- Use system PATH for Docker binary instead of hardcoded path
- Allow failed PyPI publish
- Match tag and release title, ignore devtools build for PyPI
### Documentation
- Update security policy for vulnerability reporting
- Add missing /resume files
- Clarify webhook URL parameter in HITL workflows
### Contributors
@Vidit-Ostwal, @greysonlalonde, @lorenzejay, @lucasgomide, @theCyberTech
</Update>
<Update label="Sep 30, 2025">
## v1.0.0a1

View File

@@ -8,7 +8,6 @@ mode: "wide"
## Overview of an Agent
In the CrewAI framework, an `Agent` is an autonomous unit that can:
- Perform specific tasks
- Make decisions based on its role and goal
- Use tools to accomplish objectives
@@ -17,30 +16,15 @@ In the CrewAI framework, an `Agent` is an autonomous unit that can:
- Delegate tasks when allowed
<Tip>
Think of an agent as a specialized team member with specific skills,
expertise, and responsibilities. For example, a `Researcher` agent might excel
at gathering and analyzing information, while a `Writer` agent might be better
at creating content.
Think of an agent as a specialized team member with specific skills, expertise, and responsibilities. For example, a `Researcher` agent might excel at gathering and analyzing information, while a `Writer` agent might be better at creating content.
</Tip>
## When to Use Agents
- You need role-specific reasoning and decision-making.
- You need tool-enabled execution with delegated responsibilities.
- You need reusable behavioral units across tasks and crews.
## When Not to Use Agents
- Deterministic business logic in plain code is sufficient.
- A static transformation without reasoning is sufficient.
<Note type="info" title="Enterprise Enhancement: Visual Agent Builder">
CrewAI AMP includes a Visual Agent Builder that simplifies agent creation and configuration without writing code. Design your agents visually and test them in real-time.
CrewAI AOP includes a Visual Agent Builder that simplifies agent creation and configuration without writing code. Design your agents visually and test them in real-time.
![Visual Agent Builder Screenshot](/images/enterprise/crew-studio-interface.png)
The Visual Agent Builder enables:
- Intuitive agent configuration with form-based interfaces
- Real-time testing and validation
- Template library with pre-configured agent types
@@ -49,36 +33,36 @@ The Visual Agent Builder enables:
## Agent Attributes
| Attribute | Parameter | Type | Description |
| :-------------------------------------- | :----------------------- | :------------------------------------ | :------------------------------------------------------------------------------------------------------- |
| **Role** | `role` | `str` | Defines the agent's function and expertise within the crew. |
| **Goal** | `goal` | `str` | The individual objective that guides the agent's decision-making. |
| **Backstory** | `backstory` | `str` | Provides context and personality to the agent, enriching interactions. |
| **LLM** _(optional)_ | `llm` | `Union[str, LLM, Any]` | Language model that powers the agent. Defaults to the model specified in `OPENAI_MODEL_NAME` or "gpt-4". |
| **Tools** _(optional)_ | `tools` | `List[BaseTool]` | Capabilities or functions available to the agent. Defaults to an empty list. |
| **Function Calling LLM** _(optional)_ | `function_calling_llm` | `Optional[Any]` | Language model for tool calling, overrides crew's LLM if specified. |
| **Max Iterations** _(optional)_ | `max_iter` | `int` | Maximum iterations before the agent must provide its best answer. Default is 20. |
| **Max RPM** _(optional)_ | `max_rpm` | `Optional[int]` | Maximum requests per minute to avoid rate limits. |
| **Max Execution Time** _(optional)_ | `max_execution_time` | `Optional[int]` | Maximum time (in seconds) for task execution. |
| **Verbose** _(optional)_ | `verbose` | `bool` | Enable detailed execution logs for debugging. Default is False. |
| **Allow Delegation** _(optional)_ | `allow_delegation` | `bool` | Allow the agent to delegate tasks to other agents. Default is False. |
| **Step Callback** _(optional)_ | `step_callback` | `Optional[Any]` | Function called after each agent step, overrides crew callback. |
| **Cache** _(optional)_ | `cache` | `bool` | Enable caching for tool usage. Default is True. |
| **System Template** _(optional)_ | `system_template` | `Optional[str]` | Custom system prompt template for the agent. |
| **Prompt Template** _(optional)_ | `prompt_template` | `Optional[str]` | Custom prompt template for the agent. |
| **Response Template** _(optional)_ | `response_template` | `Optional[str]` | Custom response template for the agent. |
| **Allow Code Execution** _(optional)_ | `allow_code_execution` | `Optional[bool]` | Enable code execution for the agent. Default is False. |
| **Max Retry Limit** _(optional)_ | `max_retry_limit` | `int` | Maximum number of retries when an error occurs. Default is 2. |
| **Respect Context Window** _(optional)_ | `respect_context_window` | `bool` | Keep messages under context window size by summarizing. Default is True. |
| **Code Execution Mode** _(optional)_ | `code_execution_mode` | `Literal["safe", "unsafe"]` | Mode for code execution: 'safe' (using Docker) or 'unsafe' (direct). Default is 'safe'. |
| **Multimodal** _(optional)_ | `multimodal` | `bool` | Whether the agent supports multimodal capabilities. Default is False. |
| **Inject Date** _(optional)_ | `inject_date` | `bool` | Whether to automatically inject the current date into tasks. Default is False. |
| **Date Format** _(optional)_ | `date_format` | `str` | Format string for date when inject_date is enabled. Default is "%Y-%m-%d" (ISO format). |
| **Reasoning** _(optional)_ | `reasoning` | `bool` | Whether the agent should reflect and create a plan before executing a task. Default is False. |
| **Max Reasoning Attempts** _(optional)_ | `max_reasoning_attempts` | `Optional[int]` | Maximum number of reasoning attempts before executing the task. If None, will try until ready. |
| **Embedder** _(optional)_ | `embedder` | `Optional[Dict[str, Any]]` | Configuration for the embedder used by the agent. |
| **Knowledge Sources** _(optional)_ | `knowledge_sources` | `Optional[List[BaseKnowledgeSource]]` | Knowledge sources available to the agent. |
| **Use System Prompt** _(optional)_ | `use_system_prompt` | `Optional[bool]` | Whether to use system prompt (for o1 model support). Default is True. |
| Attribute | Parameter | Type | Description |
| :-------------------------------------- | :----------------------- | :---------------------------- | :------------------------------------------------------------------------------------------------------------------- |
| **Role** | `role` | `str` | Defines the agent's function and expertise within the crew. |
| **Goal** | `goal` | `str` | The individual objective that guides the agent's decision-making. |
| **Backstory** | `backstory` | `str` | Provides context and personality to the agent, enriching interactions. |
| **LLM** _(optional)_ | `llm` | `Union[str, LLM, Any]` | Language model that powers the agent. Defaults to the model specified in `OPENAI_MODEL_NAME` or "gpt-4". |
| **Tools** _(optional)_ | `tools` | `List[BaseTool]` | Capabilities or functions available to the agent. Defaults to an empty list. |
| **Function Calling LLM** _(optional)_ | `function_calling_llm` | `Optional[Any]` | Language model for tool calling, overrides crew's LLM if specified. |
| **Max Iterations** _(optional)_ | `max_iter` | `int` | Maximum iterations before the agent must provide its best answer. Default is 20. |
| **Max RPM** _(optional)_ | `max_rpm` | `Optional[int]` | Maximum requests per minute to avoid rate limits. |
| **Max Execution Time** _(optional)_ | `max_execution_time` | `Optional[int]` | Maximum time (in seconds) for task execution. |
| **Verbose** _(optional)_ | `verbose` | `bool` | Enable detailed execution logs for debugging. Default is False. |
| **Allow Delegation** _(optional)_ | `allow_delegation` | `bool` | Allow the agent to delegate tasks to other agents. Default is False. |
| **Step Callback** _(optional)_ | `step_callback` | `Optional[Any]` | Function called after each agent step, overrides crew callback. |
| **Cache** _(optional)_ | `cache` | `bool` | Enable caching for tool usage. Default is True. |
| **System Template** _(optional)_ | `system_template` | `Optional[str]` | Custom system prompt template for the agent. |
| **Prompt Template** _(optional)_ | `prompt_template` | `Optional[str]` | Custom prompt template for the agent. |
| **Response Template** _(optional)_ | `response_template` | `Optional[str]` | Custom response template for the agent. |
| **Allow Code Execution** _(optional)_ | `allow_code_execution` | `Optional[bool]` | Enable code execution for the agent. Default is False. |
| **Max Retry Limit** _(optional)_ | `max_retry_limit` | `int` | Maximum number of retries when an error occurs. Default is 2. |
| **Respect Context Window** _(optional)_ | `respect_context_window` | `bool` | Keep messages under context window size by summarizing. Default is True. |
| **Code Execution Mode** _(optional)_ | `code_execution_mode` | `Literal["safe", "unsafe"]` | Mode for code execution: 'safe' (using Docker) or 'unsafe' (direct). Default is 'safe'. |
| **Multimodal** _(optional)_ | `multimodal` | `bool` | Whether the agent supports multimodal capabilities. Default is False. |
| **Inject Date** _(optional)_ | `inject_date` | `bool` | Whether to automatically inject the current date into tasks. Default is False. |
| **Date Format** _(optional)_ | `date_format` | `str` | Format string for date when inject_date is enabled. Default is "%Y-%m-%d" (ISO format). |
| **Reasoning** _(optional)_ | `reasoning` | `bool` | Whether the agent should reflect and create a plan before executing a task. Default is False. |
| **Max Reasoning Attempts** _(optional)_ | `max_reasoning_attempts` | `Optional[int]` | Maximum number of reasoning attempts before executing the task. If None, will try until ready. |
| **Embedder** _(optional)_ | `embedder` | `Optional[Dict[str, Any]]` | Configuration for the embedder used by the agent. |
| **Knowledge Sources** _(optional)_ | `knowledge_sources` | `Optional[List[BaseKnowledgeSource]]` | Knowledge sources available to the agent. |
| **Use System Prompt** _(optional)_ | `use_system_prompt` | `Optional[bool]` | Whether to use system prompt (for o1 model support). Default is True. |
## Creating Agents
@@ -153,8 +137,7 @@ class LatestAiDevelopmentCrew():
```
<Note>
The names you use in your YAML files (`agents.yaml`) should match the method
names in your Python code.
The names you use in your YAML files (`agents.yaml`) should match the method names in your Python code.
</Note>
### Direct Code Definition
@@ -201,7 +184,6 @@ agent = Agent(
Let's break down some key parameter combinations for common use cases:
#### Basic Research Agent
```python Code
research_agent = Agent(
role="Research Analyst",
@@ -213,7 +195,6 @@ research_agent = Agent(
```
#### Code Development Agent
```python Code
dev_agent = Agent(
role="Senior Python Developer",
@@ -227,7 +208,6 @@ dev_agent = Agent(
```
#### Long-Running Analysis Agent
```python Code
analysis_agent = Agent(
role="Data Analyst",
@@ -241,7 +221,6 @@ analysis_agent = Agent(
```
#### Custom Template Agent
```python Code
custom_agent = Agent(
role="Customer Service Representative",
@@ -257,7 +236,6 @@ custom_agent = Agent(
```
#### Date-Aware Agent with Reasoning
```python Code
strategic_agent = Agent(
role="Market Analyst",
@@ -272,7 +250,6 @@ strategic_agent = Agent(
```
#### Reasoning Agent
```python Code
reasoning_agent = Agent(
role="Strategic Planner",
@@ -286,7 +263,6 @@ reasoning_agent = Agent(
```
#### Multimodal Agent
```python Code
multimodal_agent = Agent(
role="Visual Content Analyst",
@@ -300,64 +276,52 @@ multimodal_agent = Agent(
### Parameter Details
#### Critical Parameters
- `role`, `goal`, and `backstory` are required and shape the agent's behavior
- `llm` determines the language model used (default: OpenAI's GPT-4)
#### Memory and Context
- `memory`: Enable to maintain conversation history
- `respect_context_window`: Prevents token limit issues
- `knowledge_sources`: Add domain-specific knowledge bases
#### Execution Control
- `max_iter`: Maximum attempts before giving best answer
- `max_execution_time`: Timeout in seconds
- `max_rpm`: Rate limiting for API calls
- `max_retry_limit`: Retries on error
#### Code Execution
- `allow_code_execution`: Must be True to run code
- `code_execution_mode`:
- `"safe"`: Uses Docker (recommended for production)
- `"unsafe"`: Direct execution (use only in trusted environments)
<Note>
This runs a default Docker image. If you want to configure the docker image,
the checkout the Code Interpreter Tool in the tools section. Add the code
interpreter tool as a tool in the agent as a tool parameter.
</Note>
This runs a default Docker image. If you want to configure the docker image, the checkout the Code Interpreter Tool in the tools section.
Add the code interpreter tool as a tool in the agent as a tool parameter.
</Note>
#### Advanced Features
- `multimodal`: Enable multimodal capabilities for processing text and visual content
- `reasoning`: Enable agent to reflect and create plans before executing tasks
- `inject_date`: Automatically inject current date into task descriptions
#### Templates
- `system_template`: Defines agent's core behavior
- `prompt_template`: Structures input format
- `response_template`: Formats agent responses
<Note>
When using custom templates, ensure that both `system_template` and
`prompt_template` are defined. The `response_template` is optional but
recommended for consistent output formatting.
When using custom templates, ensure that both `system_template` and `prompt_template` are defined. The `response_template` is optional but recommended for consistent output formatting.
</Note>
<Note>
When using custom templates, you can use variables like `{role}`, `{goal}`,
and `{backstory}` in your templates. These will be automatically populated
during execution.
When using custom templates, you can use variables like `{role}`, `{goal}`, and `{backstory}` in your templates. These will be automatically populated during execution.
</Note>
## Agent Tools
Agents can be equipped with various tools to enhance their capabilities. CrewAI supports tools from:
- [CrewAI Toolkit](https://github.com/joaomdmoura/crewai-tools)
- [LangChain Tools](https://python.langchain.com/docs/integrations/tools)
@@ -396,8 +360,7 @@ analyst = Agent(
```
<Note>
When `memory` is enabled, the agent will maintain context across multiple
interactions, improving its ability to handle complex, multi-step tasks.
When `memory` is enabled, the agent will maintain context across multiple interactions, improving its ability to handle complex, multi-step tasks.
</Note>
## Context Window Management
@@ -427,7 +390,6 @@ smart_agent = Agent(
```
**What happens when context limits are exceeded:**
- ⚠️ **Warning message**: `"Context length exceeded. Summarizing content to fit the model context window."`
- 🔄 **Automatic summarization**: CrewAI intelligently summarizes the conversation history
- ✅ **Continued execution**: Task execution continues seamlessly with the summarized context
@@ -449,7 +411,6 @@ strict_agent = Agent(
```
**What happens when context limits are exceeded:**
- ❌ **Error message**: `"Context length exceeded. Consider using smaller text or RAG tools from crewai_tools."`
- 🛑 **Execution stops**: Task execution halts immediately
- 🔧 **Manual intervention required**: You need to modify your approach
@@ -457,7 +418,6 @@ strict_agent = Agent(
### Choosing the Right Setting
#### Use `respect_context_window=True` (Default) when:
- **Processing large documents** that might exceed context limits
- **Long-running conversations** where some summarization is acceptable
- **Research tasks** where general context is more important than exact details
@@ -476,7 +436,6 @@ document_processor = Agent(
```
#### Use `respect_context_window=False` when:
- **Precision is critical** and information loss is unacceptable
- **Legal or medical tasks** requiring complete context
- **Code review** where missing details could introduce bugs
@@ -499,7 +458,6 @@ precision_agent = Agent(
When dealing with very large datasets, consider these strategies:
#### 1. Use RAG Tools
```python Code
from crewai_tools import RagTool
@@ -517,7 +475,6 @@ rag_agent = Agent(
```
#### 2. Use Knowledge Sources
```python Code
# Use knowledge sources instead of large prompts
knowledge_agent = Agent(
@@ -541,7 +498,6 @@ knowledge_agent = Agent(
### Troubleshooting Context Issues
**If you're getting context limit errors:**
```python Code
# Quick fix: Enable automatic handling
agent.respect_context_window = True
@@ -555,7 +511,6 @@ agent.tools = [RagTool()]
```
**If automatic summarization loses important information:**
```python Code
# Disable auto-summarization and use RAG instead
agent = Agent(
@@ -569,10 +524,7 @@ agent = Agent(
```
<Note>
The context window management feature works automatically in the background.
You don't need to call any special functions - just set
`respect_context_window` to your preferred behavior and CrewAI handles the
rest!
The context window management feature works automatically in the background. You don't need to call any special functions - just set `respect_context_window` to your preferred behavior and CrewAI handles the rest!
</Note>
## Direct Agent Interaction with `kickoff()`
@@ -604,10 +556,10 @@ print(result.raw)
### Parameters and Return Values
| Parameter | Type | Description |
| :---------------- | :--------------------------------- | :------------------------------------------------------------------------ |
| `messages` | `Union[str, List[Dict[str, str]]]` | Either a string query or a list of message dictionaries with role/content |
| `response_format` | `Optional[Type[Any]]` | Optional Pydantic model for structured output |
| Parameter | Type | Description |
| :---------------- | :---------------------------------- | :------------------------------------------------------------------------ |
| `messages` | `Union[str, List[Dict[str, str]]]` | Either a string query or a list of message dictionaries with role/content |
| `response_format` | `Optional[Type[Any]]` | Optional Pydantic model for structured output |
The method returns a `LiteAgentOutput` object with the following properties:
@@ -669,34 +621,28 @@ asyncio.run(main())
```
<Note>
The `kickoff()` method uses a `LiteAgent` internally, which provides a simpler
execution flow while preserving all of the agent's configuration (role, goal,
backstory, tools, etc.).
The `kickoff()` method uses a `LiteAgent` internally, which provides a simpler execution flow while preserving all of the agent's configuration (role, goal, backstory, tools, etc.).
</Note>
## Important Considerations and Best Practices
### Security and Code Execution
- When using `allow_code_execution`, be cautious with user input and always validate it
- Use `code_execution_mode: "safe"` (Docker) in production environments
- Consider setting appropriate `max_execution_time` limits to prevent infinite loops
### Performance Optimization
- Use `respect_context_window: true` to prevent token limit issues
- Set appropriate `max_rpm` to avoid rate limiting
- Enable `cache: true` to improve performance for repetitive tasks
- Adjust `max_iter` and `max_retry_limit` based on task complexity
### Memory and Context Management
- Leverage `knowledge_sources` for domain-specific information
- Configure `embedder` when using custom embedding models
- Use custom templates (`system_template`, `prompt_template`, `response_template`) for fine-grained control over agent behavior
### Advanced Features
- Enable `reasoning: true` for agents that need to plan and reflect before executing complex tasks
- Set appropriate `max_reasoning_attempts` to control planning iterations (None for unlimited attempts)
- Use `inject_date: true` to provide agents with current date awareness for time-sensitive tasks
@@ -704,7 +650,6 @@ asyncio.run(main())
- Enable `multimodal: true` for agents that need to process both text and visual content
### Agent Collaboration
- Enable `allow_delegation: true` when agents need to work together
- Use `step_callback` to monitor and log agent interactions
- Consider using different LLMs for different purposes:
@@ -712,7 +657,6 @@ asyncio.run(main())
- `function_calling_llm` for efficient tool usage
### Date Awareness and Reasoning
- Use `inject_date: true` to provide agents with current date awareness for time-sensitive tasks
- Customize the date format with `date_format` using standard Python datetime format codes
- Valid format codes include: %Y (year), %m (month), %d (day), %B (full month name), etc.
@@ -720,26 +664,22 @@ asyncio.run(main())
- Enable `reasoning: true` for complex tasks that benefit from upfront planning and reflection
### Model Compatibility
- Set `use_system_prompt: false` for older models that don't support system messages
- Ensure your chosen `llm` supports the features you need (like function calling)
## Troubleshooting Common Issues
1. **Rate Limiting**: If you're hitting API rate limits:
- Implement appropriate `max_rpm`
- Use caching for repetitive operations
- Consider batching requests
2. **Context Window Errors**: If you're exceeding context limits:
- Enable `respect_context_window`
- Use more efficient prompts
- Clear agent memory periodically
3. **Code Execution Issues**: If code execution fails:
- Verify Docker is installed for safe mode
- Check execution permissions
- Review code sandbox settings

View File

@@ -5,12 +5,7 @@ icon: terminal
mode: "wide"
---
<Warning>
Since release 0.140.0, CrewAI AMP started a process of migrating their login
provider. As such, the authentication flow via CLI was updated. Users that use
Google to login, or that created their account after July 3rd, 2025 will be
unable to log in with older versions of the `crewai` library.
</Warning>
<Warning>Since release 0.140.0, CrewAI AOP started a process of migrating their login provider. As such, the authentication flow via CLI was updated. Users that use Google to login, or that created their account after July 3rd, 2025 will be unable to log in with older versions of the `crewai` library.</Warning>
## Overview
@@ -46,7 +41,6 @@ crewai create [OPTIONS] TYPE NAME
- `NAME`: Name of the crew or flow
Example:
```shell Terminal
crewai create crew my_new_crew
crewai create flow my_new_flow
@@ -63,7 +57,6 @@ crewai version [OPTIONS]
- `--tools`: (Optional) Show the installed version of CrewAI tools
Example:
```shell Terminal
crewai version
crewai version --tools
@@ -81,7 +74,6 @@ crewai train [OPTIONS]
- `-f, --filename TEXT`: Path to a custom file for training (default: "trained_agents_data.pkl")
Example:
```shell Terminal
crewai train -n 10 -f my_training_data.pkl
```
@@ -97,7 +89,6 @@ crewai replay [OPTIONS]
- `-t, --task_id TEXT`: Replay the crew from this task ID, including all subsequent tasks
Example:
```shell Terminal
crewai replay -t task_123456
```
@@ -127,7 +118,6 @@ crewai reset-memories [OPTIONS]
- `-a, --all`: Reset ALL memories
Example:
```shell Terminal
crewai reset-memories --long --short
crewai reset-memories --all
@@ -145,7 +135,6 @@ crewai test [OPTIONS]
- `-m, --model TEXT`: LLM Model to run the tests on the Crew (default: "gpt-4o-mini")
Example:
```shell Terminal
crewai test -n 5 -m gpt-3.5-turbo
```
@@ -159,16 +148,12 @@ crewai run
```
<Note>
Starting from version 0.103.0, the `crewai run` command can be used to run
both standard crews and flows. For flows, it automatically detects the type
from pyproject.toml and runs the appropriate command. This is now the
recommended way to run both crews and flows.
Starting from version 0.103.0, the `crewai run` command can be used to run both standard crews and flows. For flows, it automatically detects the type from pyproject.toml and runs the appropriate command. This is now the recommended way to run both crews and flows.
</Note>
<Note>
Make sure to run these commands from the directory where your CrewAI project
is set up. Some commands may require additional configuration or setup within
your project structure.
Make sure to run these commands from the directory where your CrewAI project is set up.
Some commands may require additional configuration or setup within your project structure.
</Note>
### 9. Chat
@@ -180,7 +165,6 @@ After receiving the results, you can continue interacting with the assistant for
```shell Terminal
crewai chat
```
<Note>
Ensure you execute these commands from your CrewAI project's root directory.
</Note>
@@ -198,30 +182,28 @@ def crew(self) -> Crew:
chat_llm="gpt-4o", # LLM for chat orchestration
)
```
</Note>
### 10. Deploy
Deploy the crew or flow to [CrewAI AMP](https://app.crewai.com).
Deploy the crew or flow to [CrewAI AOP](https://app.crewai.com).
- **Authentication**: You need to be authenticated to deploy to CrewAI AMP.
You can login or create an account with:
```shell Terminal
crewai login
```
- **Authentication**: You need to be authenticated to deploy to CrewAI AOP.
You can login or create an account with:
```shell Terminal
crewai login
```
- **Create a deployment**: Once you are authenticated, you can create a deployment for your crew or flow from the root of your localproject.
```shell Terminal
crewai deploy create
```
- Reads your local project configuration.
- Prompts you to confirm the environment variables (like `OPENAI_API_KEY`, `SERPER_API_KEY`) found locally. These will be securely stored with the deployment on the Enterprise platform. Ensure your sensitive keys are correctly configured locally (e.g., in a `.env` file) before running this.
```shell Terminal
crewai deploy create
```
- Reads your local project configuration.
- Prompts you to confirm the environment variables (like `OPENAI_API_KEY`, `SERPER_API_KEY`) found locally. These will be securely stored with the deployment on the Enterprise platform. Ensure your sensitive keys are correctly configured locally (e.g., in a `.env` file) before running this.
### 11. Organization Management
Manage your CrewAI AMP organizations.
Manage your CrewAI AOP organizations.
```shell Terminal
crewai org [COMMAND] [OPTIONS]
@@ -230,80 +212,65 @@ crewai org [COMMAND] [OPTIONS]
#### Commands:
- `list`: List all organizations you belong to
```shell Terminal
crewai org list
```
- `current`: Display your currently active organization
```shell Terminal
crewai org current
```
- `switch`: Switch to a specific organization
```shell Terminal
crewai org switch <organization_id>
```
<Note>
You must be authenticated to CrewAI AMP to use these organization management
commands.
You must be authenticated to CrewAI AOP to use these organization management commands.
</Note>
- **Create a deployment** (continued):
- Links the deployment to the corresponding remote GitHub repository (it usually detects this automatically).
- Links the deployment to the corresponding remote GitHub repository (it usually detects this automatically).
- **Deploy the Crew**: Once you are authenticated, you can deploy your crew or flow to CrewAI AMP.
```shell Terminal
crewai deploy push
```
- Initiates the deployment process on the CrewAI AMP platform.
- Upon successful initiation, it will output the Deployment created successfully! message along with the Deployment Name and a unique Deployment ID (UUID).
- **Deploy the Crew**: Once you are authenticated, you can deploy your crew or flow to CrewAI AOP.
```shell Terminal
crewai deploy push
```
- Initiates the deployment process on the CrewAI AOP platform.
- Upon successful initiation, it will output the Deployment created successfully! message along with the Deployment Name and a unique Deployment ID (UUID).
- **Deployment Status**: You can check the status of your deployment with:
```shell Terminal
crewai deploy status
```
This fetches the latest deployment status of your most recent deployment attempt (e.g., `Building Images for Crew`, `Deploy Enqueued`, `Online`).
```shell Terminal
crewai deploy status
```
This fetches the latest deployment status of your most recent deployment attempt (e.g., `Building Images for Crew`, `Deploy Enqueued`, `Online`).
- **Deployment Logs**: You can check the logs of your deployment with:
```shell Terminal
crewai deploy logs
```
This streams the deployment logs to your terminal.
```shell Terminal
crewai deploy logs
```
This streams the deployment logs to your terminal.
- **List deployments**: You can list all your deployments with:
```shell Terminal
crewai deploy list
```
This lists all your deployments.
```shell Terminal
crewai deploy list
```
This lists all your deployments.
- **Delete a deployment**: You can delete a deployment with:
```shell Terminal
crewai deploy remove
```
This deletes the deployment from the CrewAI AMP platform.
```shell Terminal
crewai deploy remove
```
This deletes the deployment from the CrewAI AOP platform.
- **Help Command**: You can get help with the CLI with:
```shell Terminal
crewai deploy --help
```
This shows the help message for the CrewAI Deploy CLI.
```shell Terminal
crewai deploy --help
```
This shows the help message for the CrewAI Deploy CLI.
Watch this video tutorial for a step-by-step demonstration of deploying your crew to [CrewAI AMP](http://app.crewai.com) using the CLI.
Watch this video tutorial for a step-by-step demonstration of deploying your crew to [CrewAI AOP](http://app.crewai.com) using the CLI.
<iframe
className="w-full aspect-video rounded-xl"
@@ -316,27 +283,25 @@ Watch this video tutorial for a step-by-step demonstration of deploying your cre
### 11. Login
Authenticate with CrewAI AMP using a secure device code flow (no email entry required).
Authenticate with CrewAI AOP using a secure device code flow (no email entry required).
```shell Terminal
crewai login
```
What happens:
- A verification URL and short code are displayed in your terminal
- Your browser opens to the verification URL
- Enter/confirm the code to complete authentication
Notes:
- The OAuth2 provider and domain are configured via `crewai config` (defaults use `login.crewai.com`)
- After successful login, the CLI also attempts to authenticate to the Tool Repository automatically
- If you reset your configuration, run `crewai login` again to re-authenticate
### 12. API Keys
When running `crewai create crew` command, the CLI will show you a list of available LLM providers to choose from, followed by model selection for your chosen provider.
When running ```crewai create crew``` command, the CLI will show you a list of available LLM providers to choose from, followed by model selection for your chosen provider.
Once you've selected an LLM provider and model, you will be prompted for API keys.
@@ -344,11 +309,11 @@ Once you've selected an LLM provider and model, you will be prompted for API key
Here's a list of the most popular LLM providers suggested by the CLI:
- OpenAI
- Groq
- Anthropic
- Google Gemini
- SambaNova
* OpenAI
* Groq
* Anthropic
* Google Gemini
* SambaNova
When you select a provider, the CLI will then show you available models for that provider and prompt you to enter your API key.
@@ -360,7 +325,7 @@ When you select a provider, the CLI will prompt you to enter the Key name and th
See the following link for each provider's key name:
- [LiteLLM Providers](https://docs.litellm.ai/docs/providers)
* [LiteLLM Providers](https://docs.litellm.ai/docs/providers)
### 13. Configuration Management
@@ -373,26 +338,23 @@ crewai config [COMMAND] [OPTIONS]
#### Commands:
- `list`: Display all CLI configuration parameters
```shell Terminal
crewai config list
```
- `set`: Set a CLI configuration parameter
```shell Terminal
crewai config set <key> <value>
```
- `reset`: Reset all CLI configuration parameters to default values
```shell Terminal
crewai config reset
```
#### Available Configuration Parameters
- `enterprise_base_url`: Base URL of the CrewAI AMP instance
- `enterprise_base_url`: Base URL of the CrewAI AOP instance
- `oauth2_provider`: OAuth2 provider used for authentication (e.g., workos, okta, auth0)
- `oauth2_audience`: OAuth2 audience value, typically used to identify the target API or resource
- `oauth2_client_id`: OAuth2 client ID issued by the provider, used during authentication requests
@@ -401,48 +363,43 @@ crewai config reset
#### Examples
Display current configuration:
```shell Terminal
crewai config list
```
Example output:
| Setting | Value | Description |
| Setting | Value | Description |
| :------------------ | :----------------------- | :---------------------------------------------------------- |
| enterprise_base_url | https://app.crewai.com | Base URL of the CrewAI AMP instance |
| org_name | Not set | Name of the currently active organization |
| org_uuid | Not set | UUID of the currently active organization |
| oauth2_provider | workos | OAuth2 provider (e.g., workos, okta, auth0) |
| oauth2_audience | client_01YYY | Audience identifying the target API/resource |
| oauth2_client_id | client_01XXX | OAuth2 client ID issued by the provider |
| oauth2_domain | login.crewai.com | Provider domain (e.g., your-org.auth0.com) |
| enterprise_base_url | https://app.crewai.com | Base URL of the CrewAI AOP instance |
| org_name | Not set | Name of the currently active organization |
| org_uuid | Not set | UUID of the currently active organization |
| oauth2_provider | workos | OAuth2 provider (e.g., workos, okta, auth0) |
| oauth2_audience | client_01YYY | Audience identifying the target API/resource |
| oauth2_client_id | client_01XXX | OAuth2 client ID issued by the provider |
| oauth2_domain | login.crewai.com | Provider domain (e.g., your-org.auth0.com) |
Set the enterprise base URL:
```shell Terminal
crewai config set enterprise_base_url https://my-enterprise.crewai.com
```
Set OAuth2 provider:
```shell Terminal
crewai config set oauth2_provider auth0
```
Set OAuth2 domain:
```shell Terminal
crewai config set oauth2_domain my-company.auth0.com
```
Reset all configuration to defaults:
```shell Terminal
crewai config reset
```
<Tip>
After resetting configuration, re-run `crewai login` to authenticate again.
After resetting configuration, re-run `crewai login` to authenticate again.
</Tip>
### 14. Trace Management
@@ -456,19 +413,16 @@ crewai traces [COMMAND]
#### Commands:
- `enable`: Enable trace collection for crew/flow executions
```shell Terminal
crewai traces enable
```
- `disable`: Disable trace collection for crew/flow executions
```shell Terminal
crewai traces disable
```
- `status`: Show current trace collection status
```shell Terminal
crewai traces status
```
@@ -478,23 +432,19 @@ crewai traces status
Trace collection is controlled by checking three settings in priority order:
1. **Explicit flag in code** (highest priority - can enable OR disable):
```python
crew = Crew(agents=[...], tasks=[...], tracing=True) # Always enable
crew = Crew(agents=[...], tasks=[...], tracing=False) # Always disable
crew = Crew(agents=[...], tasks=[...]) # Check lower priorities (default)
```
- `tracing=True` will **always enable** tracing (overrides everything)
- `tracing=False` will **always disable** tracing (overrides everything)
- `tracing=None` or omitted will check lower priority settings
2. **Environment variable** (second priority):
```env
CREWAI_TRACING_ENABLED=true
```
- Checked only if `tracing` is not explicitly set to `True` or `False` in code
- Set to `true` or `1` to enable tracing
@@ -512,30 +462,21 @@ Trace collection is controlled by checking three settings in priority order:
- Run `crewai traces enable`
**To disable tracing**, use any ONE of these methods:
- Set `tracing=False` in your Crew/Flow code (overrides everything), OR
- Remove or set to `false` the `CREWAI_TRACING_ENABLED` env var, OR
- Run `crewai traces disable`
Higher priority settings override lower ones.
</Note>
<Tip>
For more information about tracing, see the [Tracing
documentation](/observability/tracing).
For more information about tracing, see the [Tracing documentation](/observability/tracing).
</Tip>
<Tip>
CrewAI CLI handles authentication to the Tool Repository automatically when
adding packages to your project. Just append `crewai` before any `uv` command
to use it. E.g. `crewai uv add requests`. For more information, see [Tool
Repository](https://docs.crewai.com/enterprise/features/tool-repository) docs.
CrewAI CLI handles authentication to the Tool Repository automatically when adding packages to your project. Just append `crewai` before any `uv` command to use it. E.g. `crewai uv add requests`. For more information, see [Tool Repository](https://docs.crewai.com/enterprise/features/tool-repository) docs.
</Tip>
<Note>
Configuration settings are stored in `~/.config/crewai/settings.json`. Some
settings like organization name and UUID are read-only and managed through
authentication and organization commands. Tool repository related settings are
hidden and cannot be set directly by users.
Configuration settings are stored in `~/.config/crewai/settings.json`. Some settings like organization name and UUID are read-only and managed through authentication and organization commands. Tool repository related settings are hidden and cannot be set directly by users.
</Note>

View File

@@ -9,17 +9,6 @@ mode: "wide"
A crew in crewAI represents a collaborative group of agents working together to achieve a set of tasks. Each crew defines the strategy for task execution, agent collaboration, and the overall workflow.
## When to Use Crews
- You need multiple specialized agents collaborating on a shared outcome.
- You need process-level orchestration (`sequential` or `hierarchical`).
- You need task-level handoffs and context propagation.
## When Not to Use Crews
- A single agent can complete the work end-to-end.
- You do not need multi-step task decomposition.
## Crew Attributes
| Attribute | Parameters | Description |
@@ -318,27 +307,12 @@ print(result)
### Different Ways to Kick Off a Crew
Once your crew is assembled, initiate the workflow with the appropriate kickoff method. CrewAI provides several methods for better control over the kickoff process.
#### Synchronous Methods
Once your crew is assembled, initiate the workflow with the appropriate kickoff method. CrewAI provides several methods for better control over the kickoff process: `kickoff()`, `kickoff_for_each()`, `kickoff_async()`, and `kickoff_for_each_async()`.
- `kickoff()`: Starts the execution process according to the defined process flow.
- `kickoff_for_each()`: Executes tasks sequentially for each provided input event or item in the collection.
#### Asynchronous Methods
CrewAI offers two approaches for async execution:
| Method | Type | Description |
|--------|------|-------------|
| `akickoff()` | Native async | True async/await throughout the entire execution chain |
| `akickoff_for_each()` | Native async | Native async execution for each input in a list |
| `kickoff_async()` | Thread-based | Wraps synchronous execution in `asyncio.to_thread` |
| `kickoff_for_each_async()` | Thread-based | Thread-based async for each input in a list |
<Note>
For high-concurrency workloads, `akickoff()` and `akickoff_for_each()` are recommended as they use native async for task execution, memory operations, and knowledge retrieval.
</Note>
- `kickoff_async()`: Initiates the workflow asynchronously.
- `kickoff_for_each_async()`: Executes tasks concurrently for each provided input event or item, leveraging asynchronous processing.
```python Code
# Start the crew's task execution
@@ -351,30 +325,19 @@ results = my_crew.kickoff_for_each(inputs=inputs_array)
for result in results:
print(result)
# Example of using native async with akickoff
inputs = {'topic': 'AI in healthcare'}
async_result = await my_crew.akickoff(inputs=inputs)
print(async_result)
# Example of using native async with akickoff_for_each
inputs_array = [{'topic': 'AI in healthcare'}, {'topic': 'AI in finance'}]
async_results = await my_crew.akickoff_for_each(inputs=inputs_array)
for async_result in async_results:
print(async_result)
# Example of using thread-based kickoff_async
# Example of using kickoff_async
inputs = {'topic': 'AI in healthcare'}
async_result = await my_crew.kickoff_async(inputs=inputs)
print(async_result)
# Example of using thread-based kickoff_for_each_async
# Example of using kickoff_for_each_async
inputs_array = [{'topic': 'AI in healthcare'}, {'topic': 'AI in finance'}]
async_results = await my_crew.kickoff_for_each_async(inputs=inputs_array)
for async_result in async_results:
print(async_result)
```
These methods provide flexibility in how you manage and execute tasks within your crew, allowing for both synchronous and asynchronous workflows tailored to your needs. For detailed async examples, see the [Kickoff Crew Asynchronously](/en/learn/kickoff-async) guide.
These methods provide flexibility in how you manage and execute tasks within your crew, allowing for both synchronous and asynchronous workflows tailored to your needs.
### Streaming Crew Execution
@@ -428,17 +391,3 @@ crewai replay -t <task_id>
```
These commands let you replay from your latest kickoff tasks, still retaining context from previously executed tasks.
## Common Failure Modes
### Agents overlap responsibilities
- Cause: role/goal definitions are too broad.
- Fix: tighten role boundaries and task ownership.
### Hierarchical runs stall or degrade
- Cause: weak manager configuration or unclear delegation criteria.
- Fix: define a stronger manager objective and explicit completion criteria.
### Crew outputs are inconsistent
- Cause: expected outputs are underspecified across tasks.
- Fix: enforce structured outputs and stronger task contracts.

View File

@@ -1,6 +1,6 @@
---
title: "Event Listeners"
description: "Tap into CrewAI events to build custom integrations and monitoring"
title: 'Event Listeners'
description: 'Tap into CrewAI events to build custom integrations and monitoring'
icon: spinner
mode: "wide"
---
@@ -20,12 +20,11 @@ CrewAI uses an event bus architecture to emit events throughout the execution li
When specific actions occur in CrewAI (like a Crew starting execution, an Agent completing a task, or a tool being used), the system emits corresponding events. You can register handlers for these events to execute custom code when they occur.
<Note type="info" title="Enterprise Enhancement: Prompt Tracing">
CrewAI AMP provides a built-in Prompt Tracing feature that leverages the event system to track, store, and visualize all prompts, completions, and associated metadata. This provides powerful debugging capabilities and transparency into your agent operations.
CrewAI AOP provides a built-in Prompt Tracing feature that leverages the event system to track, store, and visualize all prompts, completions, and associated metadata. This provides powerful debugging capabilities and transparency into your agent operations.
![Prompt Tracing Dashboard](/images/enterprise/traces-overview.png)
With Prompt Tracing you can:
- View the complete history of all prompts sent to your LLM
- Track token usage and costs
- Debug agent reasoning failures
@@ -275,6 +274,7 @@ The structure of the event object depends on the event type, but all events inhe
Additional fields vary by event type. For example, `CrewKickoffCompletedEvent` includes `crew_name` and `output` fields.
## Advanced Usage: Scoped Handlers
For temporary event handling (useful for testing or specific operations), you can use the `scoped_handlers` context manager:

View File

@@ -1,267 +0,0 @@
---
title: Files
description: Pass images, PDFs, audio, video, and text files to your agents for multimodal processing.
icon: file-image
---
## Overview
CrewAI supports native multimodal file inputs, allowing you to pass images, PDFs, audio, video, and text files directly to your agents. Files are automatically formatted for each LLM provider's API requirements.
<Note type="info" title="Optional Dependency">
File support requires the optional `crewai-files` package. Install it with:
```bash
uv add 'crewai[file-processing]'
```
</Note>
<Note type="warning" title="Early Access">
The file processing API is currently in early access.
</Note>
## File Types
CrewAI supports five specific file types plus a generic `File` class that auto-detects the type:
| Type | Class | Use Cases |
|:-----|:------|:----------|
| **Image** | `ImageFile` | Photos, screenshots, diagrams, charts |
| **PDF** | `PDFFile` | Documents, reports, papers |
| **Audio** | `AudioFile` | Voice recordings, podcasts, meetings |
| **Video** | `VideoFile` | Screen recordings, presentations |
| **Text** | `TextFile` | Code files, logs, data files |
| **Generic** | `File` | Auto-detect type from content |
```python
from crewai_files import File, ImageFile, PDFFile, AudioFile, VideoFile, TextFile
image = ImageFile(source="screenshot.png")
pdf = PDFFile(source="report.pdf")
audio = AudioFile(source="meeting.mp3")
video = VideoFile(source="demo.mp4")
text = TextFile(source="data.csv")
file = File(source="document.pdf")
```
## File Sources
The `source` parameter accepts multiple input types and auto-detects the appropriate handler:
### From Path
```python
from crewai_files import ImageFile
image = ImageFile(source="./images/chart.png")
```
### From URL
```python
from crewai_files import ImageFile
image = ImageFile(source="https://example.com/image.png")
```
### From Bytes
```python
from crewai_files import ImageFile, FileBytes
image_bytes = download_image_from_api()
image = ImageFile(source=FileBytes(data=image_bytes, filename="downloaded.png"))
image = ImageFile(source=image_bytes)
```
## Using Files
Files can be passed at multiple levels, with more specific levels taking precedence.
### With Crews
Pass files when kicking off a crew:
```python
from crewai import Crew
from crewai_files import ImageFile
crew = Crew(agents=[analyst], tasks=[analysis_task])
result = crew.kickoff(
inputs={"topic": "Q4 Sales"},
input_files={
"chart": ImageFile(source="sales_chart.png"),
"report": PDFFile(source="quarterly_report.pdf"),
}
)
```
### With Tasks
Attach files to specific tasks:
```python
from crewai import Task
from crewai_files import ImageFile
task = Task(
description="Analyze the sales chart and identify trends in {chart}",
expected_output="A summary of key trends",
input_files={
"chart": ImageFile(source="sales_chart.png"),
}
)
```
### With Flows
Pass files to flows, which automatically inherit to crews:
```python
from crewai.flow.flow import Flow, start
from crewai_files import ImageFile
class AnalysisFlow(Flow):
@start()
def analyze(self):
return self.analysis_crew.kickoff()
flow = AnalysisFlow()
result = flow.kickoff(
input_files={"image": ImageFile(source="data.png")}
)
```
### With Standalone Agents
Pass files directly to agent kickoff:
```python
from crewai import Agent
from crewai_files import ImageFile
agent = Agent(
role="Image Analyst",
goal="Analyze images",
backstory="Expert at visual analysis",
llm="gpt-4o",
)
result = agent.kickoff(
messages="What's in this image?",
input_files={"photo": ImageFile(source="photo.jpg")},
)
```
## File Precedence
When files are passed at multiple levels, more specific levels override broader ones:
```
Flow input_files < Crew input_files < Task input_files
```
For example, if both Flow and Task define a file named `"chart"`, the Task's version is used.
## Provider Support
Different providers support different file types. CrewAI automatically formats files for each provider's API.
| Provider | Image | PDF | Audio | Video | Text |
|:---------|:-----:|:---:|:-----:|:-----:|:----:|
| **OpenAI** (completions API) | ✓ | | | | |
| **OpenAI** (responses API) | ✓ | ✓ | ✓ | | |
| **Anthropic** (claude-3.x) | ✓ | ✓ | | | |
| **Google Gemini** (gemini-1.5, 2.0, 2.5) | ✓ | ✓ | ✓ | ✓ | ✓ |
| **AWS Bedrock** (claude-3) | ✓ | ✓ | | | |
| **Azure OpenAI** (gpt-4o) | ✓ | | ✓ | | |
<Note type="info" title="Gemini for Maximum File Support">
Google Gemini models support all file types including video (up to 1 hour, 2GB). Use Gemini when you need to process video content.
</Note>
<Note type="warning" title="Unsupported File Types">
If you pass a file type that the provider doesn't support (e.g., video to OpenAI), you'll receive an `UnsupportedFileTypeError`. Choose your provider based on the file types you need to process.
</Note>
## How Files Are Sent
CrewAI automatically chooses the optimal method to send files to each provider:
| Method | Description | Used When |
|:-------|:------------|:----------|
| **Inline Base64** | File embedded directly in the request | Small files (< 5MB typically) |
| **File Upload API** | File uploaded separately, referenced by ID | Large files that exceed threshold |
| **URL Reference** | Direct URL passed to the model | File source is already a URL |
### Provider Transmission Methods
| Provider | Inline Base64 | File Upload API | URL References |
|:---------|:-------------:|:---------------:|:--------------:|
| **OpenAI** | ✓ | ✓ (> 5 MB) | ✓ |
| **Anthropic** | ✓ | ✓ (> 5 MB) | ✓ |
| **Google Gemini** | ✓ | ✓ (> 20 MB) | ✓ |
| **AWS Bedrock** | ✓ | | ✓ (S3 URIs) |
| **Azure OpenAI** | ✓ | | ✓ |
<Note type="info" title="Automatic Optimization">
You don't need to manage this yourself. CrewAI automatically uses the most efficient method based on file size and provider capabilities. Providers without file upload APIs use inline base64 for all files.
</Note>
## File Handling Modes
Control how files are processed when they exceed provider limits:
```python
from crewai_files import ImageFile, PDFFile
image = ImageFile(source="large.png", mode="strict")
image = ImageFile(source="large.png", mode="auto")
image = ImageFile(source="large.png", mode="warn")
pdf = PDFFile(source="large.pdf", mode="chunk")
```
## Provider Constraints
Each provider has specific limits for file sizes and dimensions:
### OpenAI
- **Images**: Max 20 MB, up to 10 images per request
- **PDFs**: Max 32 MB, up to 100 pages
- **Audio**: Max 25 MB, up to 25 minutes
### Anthropic
- **Images**: Max 5 MB, max 8000x8000 pixels, up to 100 images
- **PDFs**: Max 32 MB, up to 100 pages
### Google Gemini
- **Images**: Max 100 MB
- **PDFs**: Max 50 MB
- **Audio**: Max 100 MB, up to 9.5 hours
- **Video**: Max 2 GB, up to 1 hour
### AWS Bedrock
- **Images**: Max 4.5 MB, max 8000x8000 pixels
- **PDFs**: Max 3.75 MB, up to 100 pages
## Referencing Files in Prompts
Use the file's key name in your task descriptions to reference files:
```python
task = Task(
description="""
Analyze the provided materials:
1. Review the chart in {sales_chart}
2. Cross-reference with data in {quarterly_report}
3. Summarize key findings
""",
expected_output="Analysis summary with key insights",
input_files={
"sales_chart": ImageFile(source="chart.png"),
"quarterly_report": PDFFile(source="report.pdf"),
}
)
```

View File

@@ -19,121 +19,82 @@ Flows allow you to create structured, event-driven workflows. They provide a sea
4. **Flexible Control Flow**: Implement conditional logic, loops, and branching within your workflows.
## When to Use Flows
- You need deterministic orchestration and branching logic.
- You need explicit state transitions across multiple steps.
- You need resumable workflows with persistence.
- You need to combine crews, direct model calls, and Python logic in one runtime.
## When Not to Use Flows
- A single prompt/response call is sufficient.
- A single crew kickoff with no orchestration logic is sufficient.
- You do not need stateful multi-step execution.
## Getting Started
The example below shows a realistic Flow for support-ticket triage. It demonstrates features teams use in production: typed state, routing, memory access, and persistence.
Let's create a simple Flow where you will use OpenAI to generate a random city in one task and then use that city to generate a fun fact in another task.
```python Code
from crewai.flow.flow import Flow, listen, router, start
from crewai.flow.persistence import persist
from pydantic import BaseModel, Field
from crewai.flow.flow import Flow, listen, start
from dotenv import load_dotenv
from litellm import completion
class SupportTriageState(BaseModel):
ticket_id: str = ""
customer_tier: str = "standard" # standard | enterprise
issue: str = ""
urgency: str = "normal"
route: str = ""
draft_reply: str = ""
internal_notes: list[str] = Field(default_factory=list)
class ExampleFlow(Flow):
model = "gpt-4o-mini"
@persist()
class SupportTriageFlow(Flow[SupportTriageState]):
@start()
def ingest_ticket(self):
# kickoff(inputs={...}) is merged into typed state fields
print(f"Flow State ID: {self.state.id}")
def generate_city(self):
print("Starting flow")
# Each flow state automatically gets a unique ID
print(f"Flow State ID: {self.state['id']}")
self.remember(
f"Ticket {self.state.ticket_id}: {self.state.issue}",
scope=f"/support/{self.state.ticket_id}",
response = completion(
model=self.model,
messages=[
{
"role": "user",
"content": "Return the name of a random city in the world.",
},
],
)
issue = self.state.issue.lower()
if "security" in issue or "breach" in issue:
self.state.urgency = "critical"
elif self.state.customer_tier == "enterprise":
self.state.urgency = "high"
else:
self.state.urgency = "normal"
random_city = response["choices"][0]["message"]["content"]
# Store the city in our state
self.state["city"] = random_city
print(f"Random City: {random_city}")
return self.state.issue
return random_city
@router(ingest_ticket)
def route_ticket(self):
issue = self.state.issue.lower()
if "security" in issue or "breach" in issue:
self.state.route = "security"
return "security_review"
if self.state.customer_tier == "enterprise" or self.state.urgency == "high":
self.state.route = "priority"
return "priority_queue"
self.state.route = "standard"
return "standard_queue"
@listen("security_review")
def handle_security(self):
self.state.internal_notes.append("Escalated to Security Incident Response")
self.state.draft_reply = (
"We have escalated your case to our security team and will update you shortly."
@listen(generate_city)
def generate_fun_fact(self, random_city):
response = completion(
model=self.model,
messages=[
{
"role": "user",
"content": f"Tell me a fun fact about {random_city}",
},
],
)
return self.state.draft_reply
@listen("priority_queue")
def handle_priority(self):
history = self.recall("SLA commitments for enterprise support", limit=2)
self.state.internal_notes.append(
f"Loaded {len(history)} memory hits for priority handling"
)
self.state.draft_reply = (
"Your ticket has been prioritized and assigned to a senior support engineer."
)
return self.state.draft_reply
@listen("standard_queue")
def handle_standard(self):
self.state.internal_notes.append("Routed to standard support queue")
self.state.draft_reply = "Thanks for reporting this. Our team will follow up soon."
return self.state.draft_reply
fun_fact = response["choices"][0]["message"]["content"]
# Store the fun fact in our state
self.state["fun_fact"] = fun_fact
return fun_fact
flow = SupportTriageFlow()
flow.plot("support_triage_flow")
result = flow.kickoff(
inputs={
"ticket_id": "TCK-1024",
"customer_tier": "enterprise",
"issue": "Cannot access SSO after enabling new policy",
}
)
print("Final reply:", result)
print("Route:", flow.state.route)
print("Notes:", flow.state.internal_notes)
flow = ExampleFlow()
flow.plot()
result = flow.kickoff()
print(f"Generated fun fact: {result}")
```
![Flow Visual image](/images/crewai-flow-1.png)
In this example, one flow demonstrates several core features together:
1. `@start()` initializes and normalizes state for downstream steps.
2. `@router()` performs deterministic branching into labeled routes.
3. Route listeners implement lane-specific behavior (`security`, `priority`, `standard`).
4. `@persist()` keeps the flow state recoverable between runs.
5. Built-in memory methods (`remember`, `recall`) add durable context beyond a single method call.
In the above example, we have created a simple Flow that generates a random city using OpenAI and then generates a fun fact about that city. The Flow consists of two tasks: `generate_city` and `generate_fun_fact`. The `generate_city` task is the starting point of the Flow, and the `generate_fun_fact` task listens for the output of the `generate_city` task.
This pattern mirrors typical production workflows where request classification, policy-aware routing, and auditable state all happen in one orchestrated flow.
Each Flow instance automatically receives a unique identifier (UUID) in its state, which helps track and manage flow executions. The state can also store additional data (like the generated city and fun fact) that persists throughout the flow's execution.
When you run the Flow, it will:
1. Generate a unique ID for the flow state
2. Generate a random city and store it in the state
3. Generate a fun fact about that city and store it in the state
4. Print the results to the console
The state's unique ID and stored data can be useful for tracking flow executions and maintaining context between tasks.
**Note:** Ensure you have set up your `.env` file to store your `OPENAI_API_KEY`. This key is necessary for authenticating requests to the OpenAI API.
### @start()
@@ -156,15 +117,15 @@ The `@listen()` decorator can be used in several ways:
1. **Listening to a Method by Name**: You can pass the name of the method you want to listen to as a string. When that method completes, the listener method will be triggered.
```python Code
@listen("upstream_method")
def downstream_method(self, upstream_result):
@listen("generate_city")
def generate_fun_fact(self, random_city):
# Implementation
```
2. **Listening to a Method Directly**: You can pass the method itself. When that method completes, the listener method will be triggered.
```python Code
@listen(upstream_method)
def downstream_method(self, upstream_result):
@listen(generate_city)
def generate_fun_fact(self, random_city):
# Implementation
```
@@ -611,59 +572,6 @@ The `third_method` and `fourth_method` listen to the output of the `second_metho
When you run this Flow, the output will change based on the random boolean value generated by the `start_method`.
### Human in the Loop (human feedback)
<Note>
The `@human_feedback` decorator requires **CrewAI version 1.8.0 or higher**.
</Note>
The `@human_feedback` decorator enables human-in-the-loop workflows by pausing flow execution to collect feedback from a human. This is useful for approval gates, quality review, and decision points that require human judgment.
```python Code
from crewai.flow.flow import Flow, start, listen
from crewai.flow.human_feedback import human_feedback, HumanFeedbackResult
class ReviewFlow(Flow):
@start()
@human_feedback(
message="Do you approve this content?",
emit=["approved", "rejected", "needs_revision"],
llm="gpt-4o-mini",
default_outcome="needs_revision",
)
def generate_content(self):
return "Content to be reviewed..."
@listen("approved")
def on_approval(self, result: HumanFeedbackResult):
print(f"Approved! Feedback: {result.feedback}")
@listen("rejected")
def on_rejection(self, result: HumanFeedbackResult):
print(f"Rejected. Reason: {result.feedback}")
```
When `emit` is specified, the human's free-form feedback is interpreted by an LLM and collapsed into one of the specified outcomes, which then triggers the corresponding `@listen` decorator.
You can also use `@human_feedback` without routing to simply collect feedback:
```python Code
@start()
@human_feedback(message="Any comments on this output?")
def my_method(self):
return "Output for review"
@listen(my_method)
def next_step(self, result: HumanFeedbackResult):
# Access feedback via result.feedback
# Access original output via result.output
pass
```
Access all feedback collected during a flow via `self.last_human_feedback` (most recent) or `self.human_feedback_history` (all feedback as a list).
For a complete guide on human feedback in flows, including **async/non-blocking feedback** with custom providers (Slack, webhooks, etc.), see [Human Feedback in Flows](/en/learn/human-feedback-in-flows).
## Adding Agents to Flows
Agents can be seamlessly integrated into your flows, providing a lightweight alternative to full Crews when you need simpler, focused task execution. Here's an example of how to use an Agent within a flow to perform market research:
@@ -780,17 +688,201 @@ This example demonstrates several key features of using Agents in flows:
3. **Tool Integration**: Agents can use tools (like `WebsiteSearchTool`) to enhance their capabilities.
## Multi-Crew Flows and Plotting
## Adding Crews to Flows
Detailed build walkthroughs and project scaffolding are documented in guide pages to keep this concepts page focused.
Creating a flow with multiple crews in CrewAI is straightforward.
- Build your first flow: [/en/guides/flows/first-flow](/en/guides/flows/first-flow)
- Master state and persistence: [/en/guides/flows/mastering-flow-state](/en/guides/flows/mastering-flow-state)
- Real-world chat-state pattern: [/en/learn/flowstate-chat-history](/en/learn/flowstate-chat-history)
You can generate a new CrewAI project that includes all the scaffolding needed to create a flow with multiple crews by running the following command:
For visualization:
- Use `flow.plot("my_flow_plot")` in code, or
- Use `crewai flow plot` in CLI projects.
```bash
crewai create flow name_of_flow
```
This command will generate a new CrewAI project with the necessary folder structure. The generated project includes a prebuilt crew called `poem_crew` that is already working. You can use this crew as a template by copying, pasting, and editing it to create other crews.
### Folder Structure
After running the `crewai create flow name_of_flow` command, you will see a folder structure similar to the following:
| Directory/File | Description |
| :--------------------- | :----------------------------------------------------------------- |
| `name_of_flow/` | Root directory for the flow. |
| ├── `crews/` | Contains directories for specific crews. |
| │ └── `poem_crew/` | Directory for the "poem_crew" with its configurations and scripts. |
| │ ├── `config/` | Configuration files directory for the "poem_crew". |
| │ │ ├── `agents.yaml` | YAML file defining the agents for "poem_crew". |
| │ │ └── `tasks.yaml` | YAML file defining the tasks for "poem_crew". |
| │ ├── `poem_crew.py` | Script for "poem_crew" functionality. |
| ├── `tools/` | Directory for additional tools used in the flow. |
| │ └── `custom_tool.py` | Custom tool implementation. |
| ├── `main.py` | Main script for running the flow. |
| ├── `README.md` | Project description and instructions. |
| ├── `pyproject.toml` | Configuration file for project dependencies and settings. |
| └── `.gitignore` | Specifies files and directories to ignore in version control. |
### Building Your Crews
In the `crews` folder, you can define multiple crews. Each crew will have its own folder containing configuration files and the crew definition file. For example, the `poem_crew` folder contains:
- `config/agents.yaml`: Defines the agents for the crew.
- `config/tasks.yaml`: Defines the tasks for the crew.
- `poem_crew.py`: Contains the crew definition, including agents, tasks, and the crew itself.
You can copy, paste, and edit the `poem_crew` to create other crews.
### Connecting Crews in `main.py`
The `main.py` file is where you create your flow and connect the crews together. You can define your flow by using the `Flow` class and the decorators `@start` and `@listen` to specify the flow of execution.
Here's an example of how you can connect the `poem_crew` in the `main.py` file:
```python Code
#!/usr/bin/env python
from random import randint
from pydantic import BaseModel
from crewai.flow.flow import Flow, listen, start
from .crews.poem_crew.poem_crew import PoemCrew
class PoemState(BaseModel):
sentence_count: int = 1
poem: str = ""
class PoemFlow(Flow[PoemState]):
@start()
def generate_sentence_count(self):
print("Generating sentence count")
self.state.sentence_count = randint(1, 5)
@listen(generate_sentence_count)
def generate_poem(self):
print("Generating poem")
result = PoemCrew().crew().kickoff(inputs={"sentence_count": self.state.sentence_count})
print("Poem generated", result.raw)
self.state.poem = result.raw
@listen(generate_poem)
def save_poem(self):
print("Saving poem")
with open("poem.txt", "w") as f:
f.write(self.state.poem)
def kickoff():
poem_flow = PoemFlow()
poem_flow.kickoff()
def plot():
poem_flow = PoemFlow()
poem_flow.plot("PoemFlowPlot")
if __name__ == "__main__":
kickoff()
plot()
```
In this example, the `PoemFlow` class defines a flow that generates a sentence count, uses the `PoemCrew` to generate a poem, and then saves the poem to a file. The flow is kicked off by calling the `kickoff()` method. The PoemFlowPlot will be generated by `plot()` method.
![Flow Visual image](/images/crewai-flow-8.png)
### Running the Flow
(Optional) Before running the flow, you can install the dependencies by running:
```bash
crewai install
```
Once all of the dependencies are installed, you need to activate the virtual environment by running:
```bash
source .venv/bin/activate
```
After activating the virtual environment, you can run the flow by executing one of the following commands:
```bash
crewai flow kickoff
```
or
```bash
uv run kickoff
```
The flow will execute, and you should see the output in the console.
## Plot Flows
Visualizing your AI workflows can provide valuable insights into the structure and execution paths of your flows. CrewAI offers a powerful visualization tool that allows you to generate interactive plots of your flows, making it easier to understand and optimize your AI workflows.
### What are Plots?
Plots in CrewAI are graphical representations of your AI workflows. They display the various tasks, their connections, and the flow of data between them. This visualization helps in understanding the sequence of operations, identifying bottlenecks, and ensuring that the workflow logic aligns with your expectations.
### How to Generate a Plot
CrewAI provides two convenient methods to generate plots of your flows:
#### Option 1: Using the `plot()` Method
If you are working directly with a flow instance, you can generate a plot by calling the `plot()` method on your flow object. This method will create an HTML file containing the interactive plot of your flow.
```python Code
# Assuming you have a flow instance
flow.plot("my_flow_plot")
```
This will generate a file named `my_flow_plot.html` in your current directory. You can open this file in a web browser to view the interactive plot.
#### Option 2: Using the Command Line
If you are working within a structured CrewAI project, you can generate a plot using the command line. This is particularly useful for larger projects where you want to visualize the entire flow setup.
```bash
crewai flow plot
```
This command will generate an HTML file with the plot of your flow, similar to the `plot()` method. The file will be saved in your project directory, and you can open it in a web browser to explore the flow.
### Understanding the Plot
The generated plot will display nodes representing the tasks in your flow, with directed edges indicating the flow of execution. The plot is interactive, allowing you to zoom in and out, and hover over nodes to see additional details.
By visualizing your flows, you can gain a clearer understanding of the workflow's structure, making it easier to debug, optimize, and communicate your AI processes to others.
### Conclusion
Plotting your flows is a powerful feature of CrewAI that enhances your ability to design and manage complex AI workflows. Whether you choose to use the `plot()` method or the command line, generating plots will provide you with a visual representation of your workflows, aiding in both development and presentation.
## Next Steps
If you're interested in exploring additional examples of flows, we have a variety of recommendations in our examples repository. Here are four specific flow examples, each showcasing unique use cases to help you match your current problem type to a specific example:
1. **Email Auto Responder Flow**: This example demonstrates an infinite loop where a background job continually runs to automate email responses. It's a great use case for tasks that need to be performed repeatedly without manual intervention. [View Example](https://github.com/crewAIInc/crewAI-examples/tree/main/email_auto_responder_flow)
2. **Lead Score Flow**: This flow showcases adding human-in-the-loop feedback and handling different conditional branches using the router. It's an excellent example of how to incorporate dynamic decision-making and human oversight into your workflows. [View Example](https://github.com/crewAIInc/crewAI-examples/tree/main/lead-score-flow)
3. **Write a Book Flow**: This example excels at chaining multiple crews together, where the output of one crew is used by another. Specifically, one crew outlines an entire book, and another crew generates chapters based on the outline. Eventually, everything is connected to produce a complete book. This flow is perfect for complex, multi-step processes that require coordination between different tasks. [View Example](https://github.com/crewAIInc/crewAI-examples/tree/main/write_a_book_with_flows)
4. **Meeting Assistant Flow**: This flow demonstrates how to broadcast one event to trigger multiple follow-up actions. For instance, after a meeting is completed, the flow can update a Trello board, send a Slack message, and save the results. It's a great example of handling multiple outcomes from a single event, making it ideal for comprehensive task management and notification systems. [View Example](https://github.com/crewAIInc/crewAI-examples/tree/main/meeting_assistant_flow)
By exploring these examples, you can gain insights into how to leverage CrewAI Flows for various use cases, from automating repetitive tasks to managing complex, multi-step processes with dynamic decision-making and human feedback.
Also, check out our YouTube video on how to use flows in CrewAI below!
<iframe
className="w-full aspect-video rounded-xl"
src="https://www.youtube.com/embed/MTb5my6VOT8"
title="CrewAI Flows overview"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
></iframe>
## Running Flows
@@ -801,7 +893,7 @@ There are two ways to run a flow:
You can run a flow programmatically by creating an instance of your flow class and calling the `kickoff()` method:
```python
flow = SupportTriageFlow()
flow = ExampleFlow()
result = flow.kickoff()
```
@@ -830,79 +922,6 @@ result = streaming.result
Learn more about streaming in the [Streaming Flow Execution](/en/learn/streaming-flow-execution) guide.
## Memory in Flows
Every Flow automatically has access to CrewAI's unified [Memory](/concepts/memory) system. You can store, recall, and extract memories directly inside any flow method using three built-in convenience methods.
### Built-in Methods
| Method | Description |
| :--- | :--- |
| `self.remember(content, **kwargs)` | Store content in memory. Accepts optional `scope`, `categories`, `metadata`, `importance`. |
| `self.recall(query, **kwargs)` | Retrieve relevant memories. Accepts optional `scope`, `categories`, `limit`, `depth`. |
| `self.extract_memories(content)` | Break raw text into discrete, self-contained memory statements. |
A default `Memory()` instance is created automatically when the Flow initializes. You can also pass a custom one:
```python
from crewai.flow.flow import Flow
from crewai import Memory
custom_memory = Memory(
recency_weight=0.5,
recency_half_life_days=7,
embedder={"provider": "ollama", "config": {"model_name": "mxbai-embed-large"}},
)
flow = MyFlow(memory=custom_memory)
```
### Example: Research and Analyze Flow
```python
from crewai.flow.flow import Flow, listen, start
class ResearchAnalysisFlow(Flow):
@start()
def gather_data(self):
# Simulate research findings
findings = (
"PostgreSQL handles 10k concurrent connections with connection pooling. "
"MySQL caps at around 5k. MongoDB scales horizontally but adds complexity."
)
# Extract atomic facts and remember each one
memories = self.extract_memories(findings)
for mem in memories:
self.remember(mem, scope="/research/databases")
return findings
@listen(gather_data)
def analyze(self, raw_findings):
# Recall relevant past research (from this run or previous runs)
past = self.recall("database performance and scaling", limit=10, depth="shallow")
context_lines = [f"- {m.record.content}" for m in past]
context = "\n".join(context_lines) if context_lines else "No prior context."
return {
"new_findings": raw_findings,
"prior_context": context,
"total_memories": len(past),
}
flow = ResearchAnalysisFlow()
result = flow.kickoff()
print(result)
```
Because memory persists across runs (backed by LanceDB on disk), the `analyze` step will recall findings from previous executions too -- enabling flows that learn and accumulate knowledge over time.
See the [Memory documentation](/concepts/memory) for details on scopes, slices, composite scoring, embedder configuration, and more.
### Using the CLI
Starting from version 0.103.0, you can run flows using the `crewai run` command:
@@ -920,21 +939,3 @@ crewai flow kickoff
```
However, the `crewai run` command is now the preferred method as it works for both crews and flows.
## Common Failure Modes
### Router branch not firing
- Cause: returned label does not match a `@listen("label")` value.
- Fix: align router return strings with listener labels exactly.
### State fields missing at runtime
- Cause: untyped dynamic fields or missing kickoff inputs.
- Fix: use typed state and validate required fields in `@start()`.
### Prompt/token growth over time
- Cause: appending unbounded message history in state.
- Fix: apply sliding-window state and summary compaction patterns.
### Non-idempotent retries
- Cause: side effects executed on retried steps.
- Fix: add idempotency keys/markers to state and guard external writes.

View File

@@ -9,17 +9,6 @@ mode: "wide"
CrewAI integrates with multiple LLM providers through providers native sdks, giving you the flexibility to choose the right model for your specific use case. This guide will help you understand how to configure and use different LLM providers in your CrewAI projects.
## When to Use Advanced LLM Configuration
- You need strict control of latency, cost, and output format.
- You need model routing by task type.
- You need reproducible, policy-sensitive behavior in production.
## When Not to Over-Configure
- You are in early prototyping with one simple task path.
- You do not yet need structured outputs or model routing.
## What are LLMs?
@@ -117,115 +106,893 @@ There are different places in CrewAI code where you can specify the model to use
</Tab>
</Tabs>
## Production LLM Patterns
## Provider Configuration Examples
The basics above show how to configure one model. In real systems, you usually combine several LLM patterns for cost, quality, and reliability.
CrewAI supports a multitude of LLM providers, each offering unique features, authentication methods, and model capabilities.
In this section, you'll find detailed examples that help you select, configure, and optimize the LLM that best fits your project's needs.
### Pattern 1: Route models by agent role
<AccordionGroup>
<Accordion title="OpenAI">
CrewAI provides native integration with OpenAI through the OpenAI Python SDK.
Use faster/cheaper models for extraction and heavier models for synthesis or critical decisions.
```toml Code
# Required
OPENAI_API_KEY=sk-...
```python Code
from crewai import Agent, Crew, Process, Task
# Optional
OPENAI_BASE_URL=<custom-base-url>
```
researcher = Agent(
role="Researcher",
goal="Collect factual inputs quickly",
backstory="Fast information-gathering specialist",
llm="openai/gpt-4o-mini",
)
**Basic Usage:**
```python Code
from crewai import LLM
reviewer = Agent(
role="Reviewer",
goal="Validate claims and produce final answer",
backstory="Careful editor focused on correctness",
llm="provider/model-id",
)
llm = LLM(
model="openai/gpt-4o",
api_key="your-api-key", # Or set OPENAI_API_KEY
temperature=0.7,
max_tokens=4000
)
```
crew = Crew(
agents=[researcher, reviewer],
tasks=[
Task(
description="Find the latest policy changes and list the key points",
expected_output="Bullet list of validated policy changes",
agent=researcher,
),
Task(
description="Review findings and produce a final executive summary",
expected_output="Concise, decision-ready summary",
agent=reviewer,
),
],
process=Process.sequential,
)
```
**Advanced Configuration:**
```python Code
from crewai import LLM
### Pattern 2: Set reliability defaults once
llm = LLM(
model="openai/gpt-4o",
api_key="your-api-key",
base_url="https://api.openai.com/v1", # Optional custom endpoint
organization="org-...", # Optional organization ID
project="proj_...", # Optional project ID
temperature=0.7,
max_tokens=4000,
max_completion_tokens=4000, # For newer models
top_p=0.9,
frequency_penalty=0.1,
presence_penalty=0.1,
stop=["END"],
seed=42, # For reproducible outputs
stream=True, # Enable streaming
timeout=60.0, # Request timeout in seconds
max_retries=3, # Maximum retry attempts
logprobs=True, # Return log probabilities
top_logprobs=5, # Number of most likely tokens
reasoning_effort="medium" # For o1 models: low, medium, high
)
```
Configure retry, timeout, and deterministic sampling in one reusable `LLM` object.
**Structured Outputs:**
```python Code
from pydantic import BaseModel
from crewai import LLM
```python Code
from crewai import LLM
class ResponseFormat(BaseModel):
name: str
age: int
summary: str
reliable_llm = LLM(
model="openai/gpt-4o-mini",
temperature=0.1,
timeout=45,
max_retries=3,
max_tokens=1200,
seed=7,
)
```
llm = LLM(
model="openai/gpt-4o",
)
```
Use this for extraction, classification, and policy-sensitive tasks where variance should be low.
**Supported Environment Variables:**
- `OPENAI_API_KEY`: Your OpenAI API key (required)
- `OPENAI_BASE_URL`: Custom base URL for OpenAI API (optional)
### Pattern 3: Use structured outputs for machine-readable responses
**Features:**
- Native function calling support (except o1 models)
- Structured outputs with JSON schema
- Streaming support for real-time responses
- Token usage tracking
- Stop sequences support (except o1 models)
- Log probabilities for token-level insights
- Reasoning effort control for o1 models
For downstream automation, force JSON-shaped outputs rather than free-form prose.
**Supported Models:**
```python Code
from crewai import LLM
| Model | Context Window | Best For |
|---------------------|------------------|-----------------------------------------------|
| gpt-4.1 | 1M tokens | Latest model with enhanced capabilities |
| gpt-4.1-mini | 1M tokens | Efficient version with large context |
| gpt-4.1-nano | 1M tokens | Ultra-efficient variant |
| gpt-4o | 128,000 tokens | Optimized for speed and intelligence |
| gpt-4o-mini | 200,000 tokens | Cost-effective with large context |
| gpt-4-turbo | 128,000 tokens | Long-form content, document analysis |
| gpt-4 | 8,192 tokens | High-accuracy tasks, complex reasoning |
| o1 | 200,000 tokens | Advanced reasoning, complex problem-solving |
| o1-preview | 128,000 tokens | Preview of reasoning capabilities |
| o1-mini | 128,000 tokens | Efficient reasoning model |
| o3-mini | 200,000 tokens | Lightweight reasoning model |
| o4-mini | 200,000 tokens | Next-gen efficient reasoning |
json_llm = LLM(
model="openai/gpt-4o",
response_format={"type": "json"},
temperature=0.0,
)
```
**Note:** To use OpenAI, install the required dependencies:
```bash
uv add "crewai[openai]"
```
</Accordion>
This reduces parser fragility in pipelines that feed APIs, databases, or workflow routers.
<Accordion title="Meta-Llama">
Meta's Llama API provides access to Meta's family of large language models.
The API is available through the [Meta Llama API](https://llama.developer.meta.com?utm_source=partner-crewai&utm_medium=website).
Set the following environment variables in your `.env` file:
### Pattern 4: Use OpenAI Responses API for multi-turn reasoning flows
```toml Code
# Meta Llama API Key Configuration
LLAMA_API_KEY=LLM|your_api_key_here
```
When you need built-in tools, response chaining, or reasoning-model workflows, enable the Responses API explicitly.
Example usage in your CrewAI project:
```python Code
from crewai import LLM
```python Code
from crewai import LLM
# Initialize Meta Llama LLM
llm = LLM(
model="meta_llama/Llama-4-Scout-17B-16E-Instruct-FP8",
temperature=0.8,
stop=["END"],
seed=42
)
```
reasoning_llm = LLM(
model="openai/o4-mini",
api="responses",
auto_chain=True,
store=True,
reasoning_effort="medium",
)
```
All models listed here https://llama.developer.meta.com/docs/models/ are supported.
This is especially useful in long-running assistants where you want conversation continuity and controllable reasoning depth.
| Model ID | Input context length | Output context length | Input Modalities | Output Modalities |
| --- | --- | --- | --- | --- |
| `meta_llama/Llama-4-Scout-17B-16E-Instruct-FP8` | 128k | 4028 | Text, Image | Text |
| `meta_llama/Llama-4-Maverick-17B-128E-Instruct-FP8` | 128k | 4028 | Text, Image | Text |
| `meta_llama/Llama-3.3-70B-Instruct` | 128k | 4028 | Text | Text |
| `meta_llama/Llama-3.3-8B-Instruct` | 128k | 4028 | Text | Text |
</Accordion>
## Provider Configuration
<Accordion title="Anthropic">
CrewAI provides native integration with Anthropic through the Anthropic Python SDK.
For concept-level usage, keep provider setup minimal and explicit:
```toml Code
# Required
ANTHROPIC_API_KEY=sk-ant-...
```
1. Set provider credentials via environment variables.
2. Pin model IDs explicitly in code or YAML.
3. Set reliability defaults (`timeout`, `max_retries`, low `temperature`) for production.
**Basic Usage:**
```python Code
from crewai import LLM
Use these pages for deeper provider setup and runtime decisions:
- Connections and provider setup: [/en/learn/llm-connections](/en/learn/llm-connections)
- Custom provider integration: [/en/learn/custom-llm](/en/learn/custom-llm)
- Production routing and reliability patterns: [/en/ai/llms/patterns](/en/ai/llms/patterns)
- Parameter contract reference: [/en/ai/llms/reference](/en/ai/llms/reference)
llm = LLM(
model="anthropic/claude-3-5-sonnet-20241022",
api_key="your-api-key", # Or set ANTHROPIC_API_KEY
max_tokens=4096 # Required for Anthropic
)
```
**Advanced Configuration:**
```python Code
from crewai import LLM
llm = LLM(
model="anthropic/claude-3-5-sonnet-20241022",
api_key="your-api-key",
base_url="https://api.anthropic.com", # Optional custom endpoint
temperature=0.7,
max_tokens=4096, # Required parameter
top_p=0.9,
stop_sequences=["END", "STOP"], # Anthropic uses stop_sequences
stream=True, # Enable streaming
timeout=60.0, # Request timeout in seconds
max_retries=3 # Maximum retry attempts
)
```
**Supported Environment Variables:**
- `ANTHROPIC_API_KEY`: Your Anthropic API key (required)
**Features:**
- Native tool use support for Claude 3+ models
- Streaming support for real-time responses
- Automatic system message handling
- Stop sequences for controlled output
- Token usage tracking
- Multi-turn tool use conversations
**Important Notes:**
- `max_tokens` is a **required** parameter for all Anthropic models
- Claude uses `stop_sequences` instead of `stop`
- System messages are handled separately from conversation messages
- First message must be from the user (automatically handled)
- Messages must alternate between user and assistant
**Supported Models:**
| Model | Context Window | Best For |
|------------------------------|----------------|-----------------------------------------------|
| claude-3-7-sonnet | 200,000 tokens | Advanced reasoning and agentic tasks |
| claude-3-5-sonnet-20241022 | 200,000 tokens | Latest Sonnet with best performance |
| claude-3-5-haiku | 200,000 tokens | Fast, compact model for quick responses |
| claude-3-opus | 200,000 tokens | Most capable for complex tasks |
| claude-3-sonnet | 200,000 tokens | Balanced intelligence and speed |
| claude-3-haiku | 200,000 tokens | Fastest for simple tasks |
| claude-2.1 | 200,000 tokens | Extended context, reduced hallucinations |
| claude-2 | 100,000 tokens | Versatile model for various tasks |
| claude-instant | 100,000 tokens | Fast, cost-effective for everyday tasks |
**Note:** To use Anthropic, install the required dependencies:
```bash
uv add "crewai[anthropic]"
```
</Accordion>
<Accordion title="Google (Gemini API)">
CrewAI provides native integration with Google Gemini through the Google Gen AI Python SDK.
Set your API key in your `.env` file. If you need a key, check [AI Studio](https://aistudio.google.com/apikey).
```toml .env
# Required (one of the following)
GOOGLE_API_KEY=<your-api-key>
GEMINI_API_KEY=<your-api-key>
# Optional - for Vertex AI
GOOGLE_CLOUD_PROJECT=<your-project-id>
GOOGLE_CLOUD_LOCATION=<location> # Defaults to us-central1
GOOGLE_GENAI_USE_VERTEXAI=true # Set to use Vertex AI
```
**Basic Usage:**
```python Code
from crewai import LLM
llm = LLM(
model="gemini/gemini-2.0-flash",
api_key="your-api-key", # Or set GOOGLE_API_KEY/GEMINI_API_KEY
temperature=0.7
)
```
**Advanced Configuration:**
```python Code
from crewai import LLM
llm = LLM(
model="gemini/gemini-2.5-flash",
api_key="your-api-key",
temperature=0.7,
top_p=0.9,
top_k=40, # Top-k sampling parameter
max_output_tokens=8192,
stop_sequences=["END", "STOP"],
stream=True, # Enable streaming
safety_settings={
"HARM_CATEGORY_HARASSMENT": "BLOCK_NONE",
"HARM_CATEGORY_HATE_SPEECH": "BLOCK_NONE"
}
)
```
**Vertex AI Configuration:**
```python Code
from crewai import LLM
llm = LLM(
model="gemini/gemini-1.5-pro",
project="your-gcp-project-id",
location="us-central1" # GCP region
)
```
**Supported Environment Variables:**
- `GOOGLE_API_KEY` or `GEMINI_API_KEY`: Your Google API key (required for Gemini API)
- `GOOGLE_CLOUD_PROJECT`: Google Cloud project ID (for Vertex AI)
- `GOOGLE_CLOUD_LOCATION`: GCP location (defaults to `us-central1`)
- `GOOGLE_GENAI_USE_VERTEXAI`: Set to `true` to use Vertex AI
**Features:**
- Native function calling support for Gemini 1.5+ and 2.x models
- Streaming support for real-time responses
- Multimodal capabilities (text, images, video)
- Safety settings configuration
- Support for both Gemini API and Vertex AI
- Automatic system instruction handling
- Token usage tracking
**Gemini Models:**
Google offers a range of powerful models optimized for different use cases.
| Model | Context Window | Best For |
|--------------------------------|----------------|-------------------------------------------------------------------|
| gemini-2.5-flash | 1M tokens | Adaptive thinking, cost efficiency |
| gemini-2.5-pro | 1M tokens | Enhanced thinking and reasoning, multimodal understanding |
| gemini-2.0-flash | 1M tokens | Next generation features, speed, thinking |
| gemini-2.0-flash-thinking | 32,768 tokens | Advanced reasoning with thinking process |
| gemini-2.0-flash-lite | 1M tokens | Cost efficiency and low latency |
| gemini-1.5-pro | 2M tokens | Best performing, logical reasoning, coding |
| gemini-1.5-flash | 1M tokens | Balanced multimodal model, good for most tasks |
| gemini-1.5-flash-8b | 1M tokens | Fastest, most cost-efficient |
| gemini-1.0-pro | 32,768 tokens | Earlier generation model |
**Gemma Models:**
The Gemini API also supports [Gemma models](https://ai.google.dev/gemma/docs) hosted on Google infrastructure.
| Model | Context Window | Best For |
|----------------|----------------|------------------------------------|
| gemma-3-1b | 32,000 tokens | Ultra-lightweight tasks |
| gemma-3-4b | 128,000 tokens | Efficient general-purpose tasks |
| gemma-3-12b | 128,000 tokens | Balanced performance and efficiency|
| gemma-3-27b | 128,000 tokens | High-performance tasks |
**Note:** To use Google Gemini, install the required dependencies:
```bash
uv add "crewai[google-genai]"
```
The full list of models is available in the [Gemini model docs](https://ai.google.dev/gemini-api/docs/models).
</Accordion>
<Accordion title="Google (Vertex AI)">
Get credentials from your Google Cloud Console and save it to a JSON file, then load it with the following code:
```python Code
import json
file_path = 'path/to/vertex_ai_service_account.json'
# Load the JSON file
with open(file_path, 'r') as file:
vertex_credentials = json.load(file)
# Convert the credentials to a JSON string
vertex_credentials_json = json.dumps(vertex_credentials)
```
Example usage in your CrewAI project:
```python Code
from crewai import LLM
llm = LLM(
model="gemini-1.5-pro-latest", # or vertex_ai/gemini-1.5-pro-latest
temperature=0.7,
vertex_credentials=vertex_credentials_json
)
```
Google offers a range of powerful models optimized for different use cases:
| Model | Context Window | Best For |
|--------------------------------|----------------|-------------------------------------------------------------------|
| gemini-2.5-flash-preview-04-17 | 1M tokens | Adaptive thinking, cost efficiency |
| gemini-2.5-pro-preview-05-06 | 1M tokens | Enhanced thinking and reasoning, multimodal understanding, advanced coding, and more |
| gemini-2.0-flash | 1M tokens | Next generation features, speed, thinking, and realtime streaming |
| gemini-2.0-flash-lite | 1M tokens | Cost efficiency and low latency |
| gemini-1.5-flash | 1M tokens | Balanced multimodal model, good for most tasks |
| gemini-1.5-flash-8B | 1M tokens | Fastest, most cost-efficient, good for high-frequency tasks |
| gemini-1.5-pro | 2M tokens | Best performing, wide variety of reasoning tasks including logical reasoning, coding, and creative collaboration |
</Accordion>
<Accordion title="Azure">
CrewAI provides native integration with Azure AI Inference and Azure OpenAI through the Azure AI Inference Python SDK.
```toml Code
# Required
AZURE_API_KEY=<your-api-key>
AZURE_ENDPOINT=<your-endpoint-url>
# Optional
AZURE_API_VERSION=<api-version> # Defaults to 2024-06-01
```
**Endpoint URL Formats:**
For Azure OpenAI deployments:
```
https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>
```
For Azure AI Inference endpoints:
```
https://<resource-name>.inference.azure.com
```
**Basic Usage:**
```python Code
llm = LLM(
model="azure/gpt-4",
api_key="<your-api-key>", # Or set AZURE_API_KEY
endpoint="<your-endpoint-url>",
api_version="2024-06-01"
)
```
**Advanced Configuration:**
```python Code
llm = LLM(
model="azure/gpt-4o",
temperature=0.7,
max_tokens=4000,
top_p=0.9,
frequency_penalty=0.0,
presence_penalty=0.0,
stop=["END"],
stream=True,
timeout=60.0,
max_retries=3
)
```
**Supported Environment Variables:**
- `AZURE_API_KEY`: Your Azure API key (required)
- `AZURE_ENDPOINT`: Your Azure endpoint URL (required, also checks `AZURE_OPENAI_ENDPOINT` and `AZURE_API_BASE`)
- `AZURE_API_VERSION`: API version (optional, defaults to `2024-06-01`)
**Features:**
- Native function calling support for Azure OpenAI models (gpt-4, gpt-4o, gpt-3.5-turbo, etc.)
- Streaming support for real-time responses
- Automatic endpoint URL validation and correction
- Comprehensive error handling with retry logic
- Token usage tracking
**Note:** To use Azure AI Inference, install the required dependencies:
```bash
uv add "crewai[azure-ai-inference]"
```
</Accordion>
<Accordion title="AWS Bedrock">
CrewAI provides native integration with AWS Bedrock through the boto3 SDK using the Converse API.
```toml Code
# Required
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-key>
# Optional
AWS_SESSION_TOKEN=<your-session-token> # For temporary credentials
AWS_DEFAULT_REGION=<your-region> # Defaults to us-east-1
```
**Basic Usage:**
```python Code
from crewai import LLM
llm = LLM(
model="bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
region_name="us-east-1"
)
```
**Advanced Configuration:**
```python Code
from crewai import LLM
llm = LLM(
model="bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
aws_access_key_id="your-access-key", # Or set AWS_ACCESS_KEY_ID
aws_secret_access_key="your-secret-key", # Or set AWS_SECRET_ACCESS_KEY
aws_session_token="your-session-token", # For temporary credentials
region_name="us-east-1",
temperature=0.7,
max_tokens=4096,
top_p=0.9,
top_k=250, # For Claude models
stop_sequences=["END", "STOP"],
stream=True, # Enable streaming
guardrail_config={ # Optional content filtering
"guardrailIdentifier": "your-guardrail-id",
"guardrailVersion": "1"
},
additional_model_request_fields={ # Model-specific parameters
"top_k": 250
}
)
```
**Supported Environment Variables:**
- `AWS_ACCESS_KEY_ID`: AWS access key (required)
- `AWS_SECRET_ACCESS_KEY`: AWS secret key (required)
- `AWS_SESSION_TOKEN`: AWS session token for temporary credentials (optional)
- `AWS_DEFAULT_REGION`: AWS region (defaults to `us-east-1`)
**Features:**
- Native tool calling support via Converse API
- Streaming and non-streaming responses
- Comprehensive error handling with retry logic
- Guardrail configuration for content filtering
- Model-specific parameters via `additional_model_request_fields`
- Token usage tracking and stop reason logging
- Support for all Bedrock foundation models
- Automatic conversation format handling
**Important Notes:**
- Uses the modern Converse API for unified model access
- Automatic handling of model-specific conversation requirements
- System messages are handled separately from conversation
- First message must be from user (automatically handled)
- Some models (like Cohere) require conversation to end with user message
[Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html) is a managed service that provides access to multiple foundation models from top AI companies through a unified API.
| Model | Context Window | Best For |
|-------------------------|----------------------|-------------------------------------------------------------------|
| Amazon Nova Pro | Up to 300k tokens | High-performance, model balancing accuracy, speed, and cost-effectiveness across diverse tasks. |
| Amazon Nova Micro | Up to 128k tokens | High-performance, cost-effective text-only model optimized for lowest latency responses. |
| Amazon Nova Lite | Up to 300k tokens | High-performance, affordable multimodal processing for images, video, and text with real-time capabilities. |
| Claude 3.7 Sonnet | Up to 128k tokens | High-performance, best for complex reasoning, coding & AI agents |
| Claude 3.5 Sonnet v2 | Up to 200k tokens | State-of-the-art model specialized in software engineering, agentic capabilities, and computer interaction at optimized cost. |
| Claude 3.5 Sonnet | Up to 200k tokens | High-performance model delivering superior intelligence and reasoning across diverse tasks with optimal speed-cost balance. |
| Claude 3.5 Haiku | Up to 200k tokens | Fast, compact multimodal model optimized for quick responses and seamless human-like interactions |
| Claude 3 Sonnet | Up to 200k tokens | Multimodal model balancing intelligence and speed for high-volume deployments. |
| Claude 3 Haiku | Up to 200k tokens | Compact, high-speed multimodal model optimized for quick responses and natural conversational interactions |
| Claude 3 Opus | Up to 200k tokens | Most advanced multimodal model exceling at complex tasks with human-like reasoning and superior contextual understanding. |
| Claude 2.1 | Up to 200k tokens | Enhanced version with expanded context window, improved reliability, and reduced hallucinations for long-form and RAG applications |
| Claude | Up to 100k tokens | Versatile model excelling in sophisticated dialogue, creative content, and precise instruction following. |
| Claude Instant | Up to 100k tokens | Fast, cost-effective model for everyday tasks like dialogue, analysis, summarization, and document Q&A |
| Llama 3.1 405B Instruct | Up to 128k tokens | Advanced LLM for synthetic data generation, distillation, and inference for chatbots, coding, and domain-specific tasks. |
| Llama 3.1 70B Instruct | Up to 128k tokens | Powers complex conversations with superior contextual understanding, reasoning and text generation. |
| Llama 3.1 8B Instruct | Up to 128k tokens | Advanced state-of-the-art model with language understanding, superior reasoning, and text generation. |
| Llama 3 70B Instruct | Up to 8k tokens | Powers complex conversations with superior contextual understanding, reasoning and text generation. |
| Llama 3 8B Instruct | Up to 8k tokens | Advanced state-of-the-art LLM with language understanding, superior reasoning, and text generation. |
| Titan Text G1 - Lite | Up to 4k tokens | Lightweight, cost-effective model optimized for English tasks and fine-tuning with focus on summarization and content generation. |
| Titan Text G1 - Express | Up to 8k tokens | Versatile model for general language tasks, chat, and RAG applications with support for English and 100+ languages. |
| Cohere Command | Up to 4k tokens | Model specialized in following user commands and delivering practical enterprise solutions. |
| Jurassic-2 Mid | Up to 8,191 tokens | Cost-effective model balancing quality and affordability for diverse language tasks like Q&A, summarization, and content generation. |
| Jurassic-2 Ultra | Up to 8,191 tokens | Model for advanced text generation and comprehension, excelling in complex tasks like analysis and content creation. |
| Jamba-Instruct | Up to 256k tokens | Model with extended context window optimized for cost-effective text generation, summarization, and Q&A. |
| Mistral 7B Instruct | Up to 32k tokens | This LLM follows instructions, completes requests, and generates creative text. |
| Mistral 8x7B Instruct | Up to 32k tokens | An MOE LLM that follows instructions, completes requests, and generates creative text. |
| DeepSeek R1 | 32,768 tokens | Advanced reasoning model |
**Note:** To use AWS Bedrock, install the required dependencies:
```bash
uv add "crewai[bedrock]"
```
</Accordion>
<Accordion title="Amazon SageMaker">
```toml Code
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-key>
AWS_DEFAULT_REGION=<your-region>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="sagemaker/<my-endpoint>"
)
```
</Accordion>
<Accordion title="Mistral">
Set the following environment variables in your `.env` file:
```toml Code
MISTRAL_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="mistral/mistral-large-latest",
temperature=0.7
)
```
</Accordion>
<Accordion title="Nvidia NIM">
Set the following environment variables in your `.env` file:
```toml Code
NVIDIA_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="nvidia_nim/meta/llama3-70b-instruct",
temperature=0.7
)
```
Nvidia NIM provides a comprehensive suite of models for various use cases, from general-purpose tasks to specialized applications.
| Model | Context Window | Best For |
|-------------------------------------------------------------------------|----------------|-------------------------------------------------------------------|
| nvidia/mistral-nemo-minitron-8b-8k-instruct | 8,192 tokens | State-of-the-art small language model delivering superior accuracy for chatbot, virtual assistants, and content generation. |
| nvidia/nemotron-4-mini-hindi-4b-instruct | 4,096 tokens | A bilingual Hindi-English SLM for on-device inference, tailored specifically for Hindi Language. |
| nvidia/llama-3.1-nemotron-70b-instruct | 128k tokens | Customized for enhanced helpfulness in responses |
| nvidia/llama3-chatqa-1.5-8b | 128k tokens | Advanced LLM to generate high-quality, context-aware responses for chatbots and search engines. |
| nvidia/llama3-chatqa-1.5-70b | 128k tokens | Advanced LLM to generate high-quality, context-aware responses for chatbots and search engines. |
| nvidia/vila | 128k tokens | Multi-modal vision-language model that understands text/img/video and creates informative responses |
| nvidia/neva-22 | 4,096 tokens | Multi-modal vision-language model that understands text/images and generates informative responses |
| nvidia/nemotron-mini-4b-instruct | 8,192 tokens | General-purpose tasks |
| nvidia/usdcode-llama3-70b-instruct | 128k tokens | State-of-the-art LLM that answers OpenUSD knowledge queries and generates USD-Python code. |
| nvidia/nemotron-4-340b-instruct | 4,096 tokens | Creates diverse synthetic data that mimics the characteristics of real-world data. |
| meta/codellama-70b | 100k tokens | LLM capable of generating code from natural language and vice versa. |
| meta/llama2-70b | 4,096 tokens | Cutting-edge large language AI model capable of generating text and code in response to prompts. |
| meta/llama3-8b-instruct | 8,192 tokens | Advanced state-of-the-art LLM with language understanding, superior reasoning, and text generation. |
| meta/llama3-70b-instruct | 8,192 tokens | Powers complex conversations with superior contextual understanding, reasoning and text generation. |
| meta/llama-3.1-8b-instruct | 128k tokens | Advanced state-of-the-art model with language understanding, superior reasoning, and text generation. |
| meta/llama-3.1-70b-instruct | 128k tokens | Powers complex conversations with superior contextual understanding, reasoning and text generation. |
| meta/llama-3.1-405b-instruct | 128k tokens | Advanced LLM for synthetic data generation, distillation, and inference for chatbots, coding, and domain-specific tasks. |
| meta/llama-3.2-1b-instruct | 128k tokens | Advanced state-of-the-art small language model with language understanding, superior reasoning, and text generation. |
| meta/llama-3.2-3b-instruct | 128k tokens | Advanced state-of-the-art small language model with language understanding, superior reasoning, and text generation. |
| meta/llama-3.2-11b-vision-instruct | 128k tokens | Advanced state-of-the-art small language model with language understanding, superior reasoning, and text generation. |
| meta/llama-3.2-90b-vision-instruct | 128k tokens | Advanced state-of-the-art small language model with language understanding, superior reasoning, and text generation. |
| google/gemma-7b | 8,192 tokens | Cutting-edge text generation model text understanding, transformation, and code generation. |
| google/gemma-2b | 8,192 tokens | Cutting-edge text generation model text understanding, transformation, and code generation. |
| google/codegemma-7b | 8,192 tokens | Cutting-edge model built on Google's Gemma-7B specialized for code generation and code completion. |
| google/codegemma-1.1-7b | 8,192 tokens | Advanced programming model for code generation, completion, reasoning, and instruction following. |
| google/recurrentgemma-2b | 8,192 tokens | Novel recurrent architecture based language model for faster inference when generating long sequences. |
| google/gemma-2-9b-it | 8,192 tokens | Cutting-edge text generation model text understanding, transformation, and code generation. |
| google/gemma-2-27b-it | 8,192 tokens | Cutting-edge text generation model text understanding, transformation, and code generation. |
| google/gemma-2-2b-it | 8,192 tokens | Cutting-edge text generation model text understanding, transformation, and code generation. |
| google/deplot | 512 tokens | One-shot visual language understanding model that translates images of plots into tables. |
| google/paligemma | 8,192 tokens | Vision language model adept at comprehending text and visual inputs to produce informative responses. |
| mistralai/mistral-7b-instruct-v0.2 | 32k tokens | This LLM follows instructions, completes requests, and generates creative text. |
| mistralai/mixtral-8x7b-instruct-v0.1 | 8,192 tokens | An MOE LLM that follows instructions, completes requests, and generates creative text. |
| mistralai/mistral-large | 4,096 tokens | Creates diverse synthetic data that mimics the characteristics of real-world data. |
| mistralai/mixtral-8x22b-instruct-v0.1 | 8,192 tokens | Creates diverse synthetic data that mimics the characteristics of real-world data. |
| mistralai/mistral-7b-instruct-v0.3 | 32k tokens | This LLM follows instructions, completes requests, and generates creative text. |
| nv-mistralai/mistral-nemo-12b-instruct | 128k tokens | Most advanced language model for reasoning, code, multilingual tasks; runs on a single GPU. |
| mistralai/mamba-codestral-7b-v0.1 | 256k tokens | Model for writing and interacting with code across a wide range of programming languages and tasks. |
| microsoft/phi-3-mini-128k-instruct | 128K tokens | Lightweight, state-of-the-art open LLM with strong math and logical reasoning skills. |
| microsoft/phi-3-mini-4k-instruct | 4,096 tokens | Lightweight, state-of-the-art open LLM with strong math and logical reasoning skills. |
| microsoft/phi-3-small-8k-instruct | 8,192 tokens | Lightweight, state-of-the-art open LLM with strong math and logical reasoning skills. |
| microsoft/phi-3-small-128k-instruct | 128K tokens | Lightweight, state-of-the-art open LLM with strong math and logical reasoning skills. |
| microsoft/phi-3-medium-4k-instruct | 4,096 tokens | Lightweight, state-of-the-art open LLM with strong math and logical reasoning skills. |
| microsoft/phi-3-medium-128k-instruct | 128K tokens | Lightweight, state-of-the-art open LLM with strong math and logical reasoning skills. |
| microsoft/phi-3.5-mini-instruct | 128K tokens | Lightweight multilingual LLM powering AI applications in latency bound, memory/compute constrained environments |
| microsoft/phi-3.5-moe-instruct | 128K tokens | Advanced LLM based on Mixture of Experts architecture to deliver compute efficient content generation |
| microsoft/kosmos-2 | 1,024 tokens | Groundbreaking multimodal model designed to understand and reason about visual elements in images. |
| microsoft/phi-3-vision-128k-instruct | 128k tokens | Cutting-edge open multimodal model exceling in high-quality reasoning from images. |
| microsoft/phi-3.5-vision-instruct | 128k tokens | Cutting-edge open multimodal model exceling in high-quality reasoning from images. |
| databricks/dbrx-instruct | 12k tokens | A general-purpose LLM with state-of-the-art performance in language understanding, coding, and RAG. |
| snowflake/arctic | 1,024 tokens | Delivers high efficiency inference for enterprise applications focused on SQL generation and coding. |
| aisingapore/sea-lion-7b-instruct | 4,096 tokens | LLM to represent and serve the linguistic and cultural diversity of Southeast Asia |
| ibm/granite-8b-code-instruct | 4,096 tokens | Software programming LLM for code generation, completion, explanation, and multi-turn conversion. |
| ibm/granite-34b-code-instruct | 8,192 tokens | Software programming LLM for code generation, completion, explanation, and multi-turn conversion. |
| ibm/granite-3.0-8b-instruct | 4,096 tokens | Advanced Small Language Model supporting RAG, summarization, classification, code, and agentic AI |
| ibm/granite-3.0-3b-a800m-instruct | 4,096 tokens | Highly efficient Mixture of Experts model for RAG, summarization, entity extraction, and classification |
| mediatek/breeze-7b-instruct | 4,096 tokens | Creates diverse synthetic data that mimics the characteristics of real-world data. |
| upstage/solar-10.7b-instruct | 4,096 tokens | Excels in NLP tasks, particularly in instruction-following, reasoning, and mathematics. |
| writer/palmyra-med-70b-32k | 32k tokens | Leading LLM for accurate, contextually relevant responses in the medical domain. |
| writer/palmyra-med-70b | 32k tokens | Leading LLM for accurate, contextually relevant responses in the medical domain. |
| writer/palmyra-fin-70b-32k | 32k tokens | Specialized LLM for financial analysis, reporting, and data processing |
| 01-ai/yi-large | 32k tokens | Powerful model trained on English and Chinese for diverse tasks including chatbot and creative writing. |
| deepseek-ai/deepseek-coder-6.7b-instruct | 2k tokens | Powerful coding model offering advanced capabilities in code generation, completion, and infilling |
| rakuten/rakutenai-7b-instruct | 1,024 tokens | Advanced state-of-the-art LLM with language understanding, superior reasoning, and text generation. |
| rakuten/rakutenai-7b-chat | 1,024 tokens | Advanced state-of-the-art LLM with language understanding, superior reasoning, and text generation. |
| baichuan-inc/baichuan2-13b-chat | 4,096 tokens | Support Chinese and English chat, coding, math, instruction following, solving quizzes |
</Accordion>
<Accordion title="Local NVIDIA NIM Deployed using WSL2">
NVIDIA NIM enables you to run powerful LLMs locally on your Windows machine using WSL2 (Windows Subsystem for Linux).
This approach allows you to leverage your NVIDIA GPU for private, secure, and cost-effective AI inference without relying on cloud services.
Perfect for development, testing, or production scenarios where data privacy or offline capabilities are required.
Here is a step-by-step guide to setting up a local NVIDIA NIM model:
1. Follow installation instructions from [NVIDIA Website](https://docs.nvidia.com/nim/wsl2/latest/getting-started.html)
2. Install the local model. For Llama 3.1-8b follow [instructions](https://build.nvidia.com/meta/llama-3_1-8b-instruct/deploy)
3. Configure your crewai local models:
```python Code
from crewai.llm import LLM
local_nvidia_nim_llm = LLM(
model="openai/meta/llama-3.1-8b-instruct", # it's an openai-api compatible model
base_url="http://localhost:8000/v1",
api_key="<your_api_key|any text if you have not configured it>", # api_key is required, but you can use any text
)
# Then you can use it in your crew:
@CrewBase
class MyCrew():
# ...
@agent
def researcher(self) -> Agent:
return Agent(
config=self.agents_config['researcher'], # type: ignore[index]
llm=local_nvidia_nim_llm
)
# ...
```
</Accordion>
<Accordion title="Groq">
Set the following environment variables in your `.env` file:
```toml Code
GROQ_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="groq/llama-3.2-90b-text-preview",
temperature=0.7
)
```
| Model | Context Window | Best For |
|-------------------|------------------|--------------------------------------------|
| Llama 3.1 70B/8B | 131,072 tokens | High-performance, large context tasks |
| Llama 3.2 Series | 8,192 tokens | General-purpose tasks |
| Mixtral 8x7B | 32,768 tokens | Balanced performance and context |
</Accordion>
<Accordion title="IBM watsonx.ai">
Set the following environment variables in your `.env` file:
```toml Code
# Required
WATSONX_URL=<your-url>
WATSONX_APIKEY=<your-apikey>
WATSONX_PROJECT_ID=<your-project-id>
# Optional
WATSONX_TOKEN=<your-token>
WATSONX_DEPLOYMENT_SPACE_ID=<your-space-id>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="watsonx/meta-llama/llama-3-1-70b-instruct",
base_url="https://api.watsonx.ai/v1"
)
```
</Accordion>
<Accordion title="Ollama (Local LLMs)">
1. Install Ollama: [ollama.ai](https://ollama.ai/)
2. Run a model: `ollama run llama3`
3. Configure:
```python Code
llm = LLM(
model="ollama/llama3:70b",
base_url="http://localhost:11434"
)
```
</Accordion>
<Accordion title="Fireworks AI">
Set the following environment variables in your `.env` file:
```toml Code
FIREWORKS_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="fireworks_ai/accounts/fireworks/models/llama-v3-70b-instruct",
temperature=0.7
)
```
</Accordion>
<Accordion title="Perplexity AI">
Set the following environment variables in your `.env` file:
```toml Code
PERPLEXITY_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="llama-3.1-sonar-large-128k-online",
base_url="https://api.perplexity.ai/"
)
```
</Accordion>
<Accordion title="Hugging Face">
Set the following environment variables in your `.env` file:
```toml Code
HF_TOKEN=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="huggingface/meta-llama/Meta-Llama-3.1-8B-Instruct"
)
```
</Accordion>
<Accordion title="SambaNova">
Set the following environment variables in your `.env` file:
```toml Code
SAMBANOVA_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="sambanova/Meta-Llama-3.1-8B-Instruct",
temperature=0.7
)
```
| Model | Context Window | Best For |
|--------------------|------------------------|----------------------------------------------|
| Llama 3.1 70B/8B | Up to 131,072 tokens | High-performance, large context tasks |
| Llama 3.1 405B | 8,192 tokens | High-performance and output quality |
| Llama 3.2 Series | 8,192 tokens | General-purpose, multimodal tasks |
| Llama 3.3 70B | Up to 131,072 tokens | High-performance and output quality |
| Qwen2 familly | 8,192 tokens | High-performance and output quality |
</Accordion>
<Accordion title="Cerebras">
Set the following environment variables in your `.env` file:
```toml Code
# Required
CEREBRAS_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="cerebras/llama3.1-70b",
temperature=0.7,
max_tokens=8192
)
```
<Info>
Cerebras features:
- Fast inference speeds
- Competitive pricing
- Good balance of speed and quality
- Support for long context windows
</Info>
</Accordion>
<Accordion title="Open Router">
Set the following environment variables in your `.env` file:
```toml Code
OPENROUTER_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="openrouter/deepseek/deepseek-r1",
base_url="https://openrouter.ai/api/v1",
api_key=OPENROUTER_API_KEY
)
```
<Info>
Open Router models:
- openrouter/deepseek/deepseek-r1
- openrouter/deepseek/deepseek-chat
</Info>
</Accordion>
<Accordion title="Nebius AI Studio">
Set the following environment variables in your `.env` file:
```toml Code
NEBIUS_API_KEY=<your-api-key>
```
Example usage in your CrewAI project:
```python Code
llm = LLM(
model="nebius/Qwen/Qwen3-30B-A3B"
)
```
<Info>
Nebius AI Studio features:
- Large collection of open source models
- Higher rate limits
- Competitive pricing
- Good balance of speed and quality
</Info>
</Accordion>
</AccordionGroup>
## Streaming Responses

File diff suppressed because it is too large Load Diff

View File

@@ -10,17 +10,6 @@ mode: "wide"
The planning feature in CrewAI allows you to add planning capability to your crew. When enabled, before each Crew iteration,
all Crew information is sent to an AgentPlanner that will plan the tasks step by step, and this plan will be added to each task description.
## When to Use Planning
- Tasks require multi-step decomposition before execution.
- You need more consistent execution quality on complex tasks.
- You want transparent planning traces in crew runs.
## When Not to Use Planning
- Tasks are simple and deterministic.
- Latency and token budget are strict and planning overhead is not justified.
### Using the Planning Feature
Getting started with the planning feature is very easy, the only step required is to add `planning=True` to your Crew:
@@ -42,7 +31,7 @@ my_crew = Crew(
From this point on, your crew will have planning enabled, and the tasks will be planned before each iteration.
<Warning>
Planning model defaults can vary by version and environment. To avoid implicit provider dependencies, set `planning_llm` explicitly in your crew configuration.
When planning is enabled, crewAI will use `gpt-4o-mini` as the default LLM for planning, which requires a valid OpenAI API key. Since your agents might be using different LLMs, this could cause confusion if you don't have an OpenAI API key configured or if you're experiencing unexpected behavior related to LLM API calls.
</Warning>
#### Planning LLM
@@ -163,14 +152,4 @@ A list with 10 bullet points of the most relevant information about AI LLMs.
**Expected Output:**
A fully fledged report with the main topics, each with a full section of information. Formatted as markdown without '```'.
```
</CodeGroup>
## Common Failure Modes
### Planning adds cost/latency without quality gains
- Cause: planning enabled for simple tasks.
- Fix: disable `planning` for straightforward pipelines.
### Unexpected provider authentication errors
- Cause: implicit planner model/provider assumptions.
- Fix: set `planning_llm` explicitly and ensure matching credentials are configured.
</CodeGroup>

View File

@@ -12,20 +12,11 @@ mode: "wide"
These processes ensure tasks are distributed and executed efficiently, in alignment with a predefined strategy.
</Tip>
## When to Use Each Process
- Use `sequential` when task order is fixed and outputs feed directly into the next task.
- Use `hierarchical` when you need a manager to delegate and validate work dynamically.
## When Not to Use Hierarchical
- You do not need dynamic delegation.
- You cannot provide a reliable `manager_llm` or `manager_agent`.
## Process Implementations
- **Sequential**: Executes tasks sequentially, ensuring tasks are completed in an orderly progression.
- **Hierarchical**: Organizes tasks in a managerial hierarchy, where tasks are delegated and executed based on a structured chain of command. A manager language model (`manager_llm`) or a custom manager agent (`manager_agent`) must be specified in the crew to enable the hierarchical process, facilitating the creation and management of tasks by the manager.
- **Consensual Process (Planned)**: Aiming for collaborative decision-making among agents on task execution, this process type introduces a democratic approach to task management within CrewAI. It is planned for future development and is not currently implemented in the codebase.
## The Role of Processes in Teamwork
Processes enable individual agents to operate as a cohesive unit, streamlining their efforts to achieve common objectives with efficiency and coherence.
@@ -68,17 +59,9 @@ Emulates a corporate hierarchy, CrewAI allows specifying a custom manager agent
## Process Class: Detailed Overview
The `Process` class is implemented as an enumeration (`Enum`), ensuring type safety and restricting process values to the defined types (`sequential`, `hierarchical`).
The `Process` class is implemented as an enumeration (`Enum`), ensuring type safety and restricting process values to the defined types (`sequential`, `hierarchical`). The consensual process is planned for future inclusion, emphasizing our commitment to continuous development and innovation.
## Conclusion
The structured collaboration facilitated by processes within CrewAI is crucial for enabling systematic teamwork among agents.
## Common Failure Modes
### Hierarchical process fails at startup
- Cause: missing `manager_llm` or `manager_agent`.
- Fix: provide one of them explicitly in crew configuration.
### Sequential process produces weak outputs
- Cause: task boundaries/context are underspecified.
- Fix: improve task descriptions, expected outputs, and task context chaining.
This documentation has been updated to reflect the latest features, enhancements, and the planned integration of the Consensual Process, ensuring users have access to the most current and comprehensive information.

View File

@@ -1,154 +0,0 @@
---
title: Production Architecture
description: Best practices for building production-ready AI applications with CrewAI
icon: server
mode: "wide"
---
# The Flow-First Mindset
When building production AI applications with CrewAI, **we recommend starting with a Flow**.
While it's possible to run individual Crews or Agents, wrapping them in a Flow provides the necessary structure for a robust, scalable application.
## Why Flows?
1. **State Management**: Flows provide a built-in way to manage state across different steps of your application. This is crucial for passing data between Crews, maintaining context, and handling user inputs.
2. **Control**: Flows allow you to define precise execution paths, including loops, conditionals, and branching logic. This is essential for handling edge cases and ensuring your application behaves predictably.
3. **Observability**: Flows provide a clear structure that makes it easier to trace execution, debug issues, and monitor performance. We recommend using [CrewAI Tracing](/en/observability/tracing) for detailed insights. Simply run `crewai login` to enable free observability features.
## The Architecture
A typical production CrewAI application looks like this:
```mermaid
graph TD
Start((Start)) --> Flow[Flow Orchestrator]
Flow --> State{State Management}
State --> Step1[Step 1: Data Gathering]
Step1 --> Crew1[Research Crew]
Crew1 --> State
State --> Step2{Condition Check}
Step2 -- "Valid" --> Step3[Step 3: Execution]
Step3 --> Crew2[Action Crew]
Step2 -- "Invalid" --> End((End))
Crew2 --> End
```
### 1. The Flow Class
Your `Flow` class is the entry point. It defines the state schema and the methods that execute your logic.
```python
from crewai.flow.flow import Flow, listen, start
from pydantic import BaseModel
class AppState(BaseModel):
user_input: str = ""
research_results: str = ""
final_report: str = ""
class ProductionFlow(Flow[AppState]):
@start()
def gather_input(self):
# ... logic to get input ...
pass
@listen(gather_input)
def run_research_crew(self):
# ... trigger a Crew ...
pass
```
### 2. State Management
Use Pydantic models to define your state. This ensures type safety and makes it clear what data is available at each step.
- **Keep it minimal**: Store only what you need to persist between steps.
- **Use structured data**: Avoid unstructured dictionaries when possible.
### 3. Crews as Units of Work
Delegate complex tasks to Crews. A Crew should be focused on a specific goal (e.g., "Research a topic", "Write a blog post").
- **Don't over-engineer Crews**: Keep them focused.
- **Pass state explicitly**: Pass the necessary data from the Flow state to the Crew inputs.
```python
@listen(gather_input)
def run_research_crew(self):
crew = ResearchCrew()
result = crew.kickoff(inputs={"topic": self.state.user_input})
self.state.research_results = result.raw
```
## Control Primitives
Leverage CrewAI's control primitives to add robustness and control to your Crews.
### 1. Task Guardrails
Use [Task Guardrails](/en/concepts/tasks#task-guardrails) to validate task outputs before they are accepted. This ensures that your agents produce high-quality results.
```python
def validate_content(result: TaskOutput) -> Tuple[bool, Any]:
if len(result.raw) < 100:
return (False, "Content is too short. Please expand.")
return (True, result.raw)
task = Task(
...,
guardrail=validate_content
)
```
### 2. Structured Outputs
Always use structured outputs (`output_pydantic` or `output_json`) when passing data between tasks or to your application. This prevents parsing errors and ensures type safety.
```python
class ResearchResult(BaseModel):
summary: str
sources: List[str]
task = Task(
...,
output_pydantic=ResearchResult
)
```
### 3. LLM Hooks
Use [LLM Hooks](/en/learn/llm-hooks) to inspect or modify messages before they are sent to the LLM, or to sanitize responses.
```python
@before_llm_call
def log_request(context):
print(f"Agent {context.agent.role} is calling the LLM...")
```
## Deployment Patterns
When deploying your Flow, consider the following:
### CrewAI Enterprise
The easiest way to deploy your Flow is using CrewAI Enterprise. It handles the infrastructure, authentication, and monitoring for you.
Check out the [Deployment Guide](/en/enterprise/guides/deploy-crew) to get started.
```bash
crewai deploy create
```
### Async Execution
For long-running tasks, use `kickoff_async` to avoid blocking your API.
### Persistence
Use the `@persist` decorator to save the state of your Flow to a database. This allows you to resume execution if the process crashes or if you need to wait for human input.
```python
@persist
class ProductionFlow(Flow[AppState]):
# ...
```
## Summary
- **Start with a Flow.**
- **Define a clear State.**
- **Use Crews for complex tasks.**
- **Deploy with an API and persistence.**

View File

@@ -14,12 +14,11 @@ Tasks provide all necessary details for execution, such as a description, the ag
Tasks within CrewAI can be collaborative, requiring multiple agents to work together. This is managed through the task properties and orchestrated by the Crew's process, enhancing teamwork and efficiency.
<Note type="info" title="Enterprise Enhancement: Visual Task Builder">
CrewAI AMP includes a Visual Task Builder in Crew Studio that simplifies complex task creation and chaining. Design your task flows visually and test them in real-time without writing code.
CrewAI AOP includes a Visual Task Builder in Crew Studio that simplifies complex task creation and chaining. Design your task flows visually and test them in real-time without writing code.
![Task Builder Screenshot](/images/enterprise/crew-studio-interface.png)
The Visual Task Builder enables:
- Drag-and-drop task creation
- Visual task dependencies and flow
- Real-time testing and validation
@@ -29,12 +28,10 @@ The Visual Task Builder enables:
### Task Execution Flow
Tasks can be executed in two ways:
- **Sequential**: Tasks are executed in the order they are defined
- **Hierarchical**: Tasks are assigned to agents based on their roles and expertise
The execution flow is defined when creating the crew:
```python Code
crew = Crew(
agents=[agent1, agent2],
@@ -45,31 +42,30 @@ crew = Crew(
## Task Attributes
| Attribute | Parameters | Type | Description |
| :------------------------------------- | :---------------------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------- |
| **Description** | `description` | `str` | A clear, concise statement of what the task entails. |
| **Expected Output** | `expected_output` | `str` | A detailed description of what the task's completion looks like. |
| **Name** _(optional)_ | `name` | `Optional[str]` | A name identifier for the task. |
| **Agent** _(optional)_ | `agent` | `Optional[BaseAgent]` | The agent responsible for executing the task. |
| **Tools** _(optional)_ | `tools` | `List[BaseTool]` | The tools/resources the agent is limited to use for this task. |
| **Context** _(optional)_ | `context` | `Optional[List["Task"]]` | Other tasks whose outputs will be used as context for this task. |
| **Async Execution** _(optional)_ | `async_execution` | `Optional[bool]` | Whether the task should be executed asynchronously. Defaults to False. |
| **Human Input** _(optional)_ | `human_input` | `Optional[bool]` | Whether the task should have a human review the final answer of the agent. Defaults to False. |
| **Markdown** _(optional)_ | `markdown` | `Optional[bool]` | Whether the task should instruct the agent to return the final answer formatted in Markdown. Defaults to False. |
| **Config** _(optional)_ | `config` | `Optional[Dict[str, Any]]` | Task-specific configuration parameters. |
| **Output File** _(optional)_ | `output_file` | `Optional[str]` | File path for storing the task output. |
| **Create Directory** _(optional)_ | `create_directory` | `Optional[bool]` | Whether to create the directory for output_file if it doesn't exist. Defaults to True. |
| **Output JSON** _(optional)_ | `output_json` | `Optional[Type[BaseModel]]` | A Pydantic model to structure the JSON output. |
| **Output Pydantic** _(optional)_ | `output_pydantic` | `Optional[Type[BaseModel]]` | A Pydantic model for task output. |
| **Callback** _(optional)_ | `callback` | `Optional[Any]` | Function/object to be executed after task completion. |
| **Guardrail** _(optional)_ | `guardrail` | `Optional[Callable]` | Function to validate task output before proceeding to next task. |
| **Guardrails** _(optional)_ | `guardrails` | `Optional[List[Callable]]` | List of guardrails to validate task output before proceeding to next task. |
| **Guardrail Max Retries** _(optional)_ | `guardrail_max_retries` | `Optional[int]` | Maximum number of retries when guardrail validation fails. Defaults to 3. |
| Attribute | Parameters | Type | Description |
| :------------------------------- | :---------------- | :---------------------------- | :------------------------------------------------------------------------------------------------------------------- |
| **Description** | `description` | `str` | A clear, concise statement of what the task entails. |
| **Expected Output** | `expected_output` | `str` | A detailed description of what the task's completion looks like. |
| **Name** _(optional)_ | `name` | `Optional[str]` | A name identifier for the task. |
| **Agent** _(optional)_ | `agent` | `Optional[BaseAgent]` | The agent responsible for executing the task. |
| **Tools** _(optional)_ | `tools` | `List[BaseTool]` | The tools/resources the agent is limited to use for this task. |
| **Context** _(optional)_ | `context` | `Optional[List["Task"]]` | Other tasks whose outputs will be used as context for this task. |
| **Async Execution** _(optional)_ | `async_execution` | `Optional[bool]` | Whether the task should be executed asynchronously. Defaults to False. |
| **Human Input** _(optional)_ | `human_input` | `Optional[bool]` | Whether the task should have a human review the final answer of the agent. Defaults to False. |
| **Markdown** _(optional)_ | `markdown` | `Optional[bool]` | Whether the task should instruct the agent to return the final answer formatted in Markdown. Defaults to False. |
| **Config** _(optional)_ | `config` | `Optional[Dict[str, Any]]` | Task-specific configuration parameters. |
| **Output File** _(optional)_ | `output_file` | `Optional[str]` | File path for storing the task output. |
| **Create Directory** _(optional)_ | `create_directory` | `Optional[bool]` | Whether to create the directory for output_file if it doesn't exist. Defaults to True. |
| **Output JSON** _(optional)_ | `output_json` | `Optional[Type[BaseModel]]` | A Pydantic model to structure the JSON output. |
| **Output Pydantic** _(optional)_ | `output_pydantic` | `Optional[Type[BaseModel]]` | A Pydantic model for task output. |
| **Callback** _(optional)_ | `callback` | `Optional[Any]` | Function/object to be executed after task completion. |
| **Guardrail** _(optional)_ | `guardrail` | `Optional[Callable]` | Function to validate task output before proceeding to next task. |
| **Guardrails** _(optional)_ | `guardrails` | `Optional[List[Callable] | List[str]]` | List of guardrails to validate task output before proceeding to next task. |
| **Guardrail Max Retries** _(optional)_ | `guardrail_max_retries` | `Optional[int]` | Maximum number of retries when guardrail validation fails. Defaults to 3. |
<Note type="warning" title="Deprecated: max_retries">
The task attribute `max_retries` is deprecated and will be removed in v1.0.0.
Use `guardrail_max_retries` instead to control retry attempts when a guardrail
fails.
Use `guardrail_max_retries` instead to control retry attempts when a guardrail fails.
</Note>
## Creating Tasks
@@ -91,7 +87,7 @@ crew.kickoff(inputs={'topic': 'AI Agents'})
Here's an example of how to configure tasks using YAML:
````yaml tasks.yaml
```yaml tasks.yaml
research_task:
description: >
Conduct a thorough research about {topic}
@@ -111,7 +107,7 @@ reporting_task:
agent: reporting_analyst
markdown: true
output_file: report.md
````
```
To use this YAML configuration in your code, create a crew class that inherits from `CrewBase`:
@@ -169,8 +165,7 @@ class LatestAiDevelopmentCrew():
```
<Note>
The names you use in your YAML files (`agents.yaml` and `tasks.yaml`) should
match the method names in your Python code.
The names you use in your YAML files (`agents.yaml` and `tasks.yaml`) should match the method names in your Python code.
</Note>
### Direct Code Definition (Alternative)
@@ -207,8 +202,7 @@ reporting_task = Task(
```
<Tip>
Directly specify an `agent` for assignment or let the `hierarchical` CrewAI's
process decide based on roles, availability, etc.
Directly specify an `agent` for assignment or let the `hierarchical` CrewAI's process decide based on roles, availability, etc.
</Tip>
## Task Output
@@ -230,7 +224,7 @@ By default, the `TaskOutput` will only include the `raw` output. A `TaskOutput`
| **JSON Dict** | `json_dict` | `Optional[Dict[str, Any]]` | A dictionary representing the JSON output of the task. |
| **Agent** | `agent` | `str` | The agent that executed the task. |
| **Output Format** | `output_format` | `OutputFormat` | The format of the task output, with options including RAW, JSON, and Pydantic. The default is RAW. |
| **Messages** | `messages` | `list[LLMMessage]` | The messages from the last task execution. |
| **Messages** | `messages` | `list[LLMMessage]` | The messages from the last task execution. |
### Task Methods and Properties
@@ -293,13 +287,12 @@ formatted_task = Task(
```
When `markdown=True`, the agent will receive additional instructions to format the output using:
- `#` for headers
- `**text**` for bold text
- `*text*` for italic text
- `-` or `*` for bullet points
- `` `code` `` for inline code
- ` `language ``` for code blocks
- ``` ```language ``` for code blocks
### YAML Configuration with Markdown
@@ -310,7 +303,7 @@ analysis_task:
expected_output: >
A comprehensive analysis with charts and key findings
agent: analyst
markdown: true # Enable markdown formatting
markdown: true # Enable markdown formatting
output_file: analysis.md
```
@@ -322,9 +315,7 @@ analysis_task:
- **Cross-Platform Compatibility**: Markdown is universally supported
<Note>
The markdown formatting instructions are automatically added to the task
prompt when `markdown=True`, so you don't need to specify formatting
requirements in your task description.
The markdown formatting instructions are automatically added to the task prompt when `markdown=True`, so you don't need to specify formatting requirements in your task description.
</Note>
## Task Dependencies and Context
@@ -392,7 +383,6 @@ blog_task = Task(
Instead of writing custom validation functions, you can use string descriptions that leverage LLM-based validation. When you provide a string to the `guardrail` or `guardrails` parameter, CrewAI automatically creates an `LLMGuardrail` that uses the agent's LLM to validate the output based on your description.
**Requirements**:
- The task must have an `agent` assigned (the guardrail uses the agent's LLM)
- Provide a clear, descriptive string explaining the validation criteria
@@ -409,13 +399,11 @@ blog_task = Task(
```
LLM-based guardrails are particularly useful for:
- **Complex validation logic** that's difficult to express programmatically
- **Subjective criteria** like tone, style, or quality assessments
- **Natural language requirements** that are easier to describe than code
The LLM guardrail will:
1. Analyze the task output against your description
2. Return `(True, output)` if the output complies with the criteria
3. Return `(False, feedback)` with specific feedback if validation fails
@@ -443,7 +431,6 @@ research_task = Task(
You can apply multiple guardrails to a task using the `guardrails` parameter. Multiple guardrails are executed sequentially, with each guardrail receiving the output from the previous one. This allows you to chain validation and transformation steps.
The `guardrails` parameter accepts:
- A list of guardrail functions or string descriptions
- A single guardrail function or string (same as `guardrail`)
@@ -493,7 +480,6 @@ blog_task = Task(
```
In this example, the guardrails execute in order:
1. `validate_word_count` checks the word count
2. `validate_no_profanity` checks for inappropriate language (using the output from step 1)
3. `format_output` formats the final result (using the output from step 2)
@@ -536,7 +522,6 @@ This approach combines the precision of programmatic validation with the flexibi
### Guardrail Function Requirements
1. **Function Signature**:
- Must accept exactly one parameter (the task output)
- Should return a tuple of `(bool, Any)`
- Type hints are recommended but optional
@@ -545,10 +530,11 @@ This approach combines the precision of programmatic validation with the flexibi
- On success: it returns a tuple of `(bool, Any)`. For example: `(True, validated_result)`
- On Failure: it returns a tuple of `(bool, str)`. For example: `(False, "Error message explain the failure")`
### Error Handling Best Practices
1. **Structured Error Responses**:
```python Code
from crewai import TaskOutput, LLMGuardrail
@@ -564,13 +550,11 @@ def validate_with_context(result: TaskOutput) -> Tuple[bool, Any]:
```
2. **Error Categories**:
- Use specific error codes
- Include relevant context
- Provide actionable feedback
3. **Validation Chain**:
```python Code
from typing import Any, Dict, List, Tuple, Union
from crewai import TaskOutput
@@ -597,7 +581,6 @@ def complex_validation(result: TaskOutput) -> Tuple[bool, Any]:
### Handling Guardrail Results
When a guardrail returns `(False, error)`:
1. The error is sent back to the agent
2. The agent attempts to fix the issue
3. The process repeats until:
@@ -605,7 +588,6 @@ When a guardrail returns `(False, error)`:
- Maximum retries are reached (`guardrail_max_retries`)
Example with retry handling:
```python Code
from typing import Optional, Tuple, Union
from crewai import TaskOutput, Task
@@ -631,12 +613,10 @@ task = Task(
## Getting Structured Consistent Outputs from Tasks
<Note>
It's also important to note that the output of the final task of a crew
becomes the final output of the actual crew itself.
It's also important to note that the output of the final task of a crew becomes the final output of the actual crew itself.
</Note>
### Using `output_pydantic`
The `output_pydantic` property allows you to define a Pydantic model that the task output should conform to. This ensures that the output is not only structured but also validated according to the Pydantic model.
Here's an example demonstrating how to use output_pydantic:
@@ -706,22 +686,18 @@ print("Accessing Properties - Option 5")
print("Blog:", result)
```
In this example:
- A Pydantic model Blog is defined with title and content fields.
- The task task1 uses the output_pydantic property to specify that its output should conform to the Blog model.
- After executing the crew, you can access the structured output in multiple ways as shown.
* A Pydantic model Blog is defined with title and content fields.
* The task task1 uses the output_pydantic property to specify that its output should conform to the Blog model.
* After executing the crew, you can access the structured output in multiple ways as shown.
#### Explanation of Accessing the Output
1. Dictionary-Style Indexing: You can directly access the fields using result["field_name"]. This works because the CrewOutput class implements the **getitem** method.
1. Dictionary-Style Indexing: You can directly access the fields using result["field_name"]. This works because the CrewOutput class implements the __getitem__ method.
2. Directly from Pydantic Model: Access the attributes directly from the result.pydantic object.
3. Using to_dict() Method: Convert the output to a dictionary and access the fields.
4. Printing the Entire Object: Simply print the result object to see the structured output.
### Using `output_json`
The `output_json` property allows you to define the expected output in JSON format. This ensures that the task's output is a valid JSON structure that can be easily parsed and used in your application.
Here's an example demonstrating how to use `output_json`:
@@ -781,15 +757,14 @@ print("Blog:", result)
```
In this example:
- A Pydantic model Blog is defined with title and content fields, which is used to specify the structure of the JSON output.
- The task task1 uses the output_json property to indicate that it expects a JSON output conforming to the Blog model.
- After executing the crew, you can access the structured JSON output in two ways as shown.
* A Pydantic model Blog is defined with title and content fields, which is used to specify the structure of the JSON output.
* The task task1 uses the output_json property to indicate that it expects a JSON output conforming to the Blog model.
* After executing the crew, you can access the structured JSON output in two ways as shown.
#### Explanation of Accessing the Output
1. Accessing Properties Using Dictionary-Style Indexing: You can access the fields directly using result["field_name"]. This is possible because the CrewOutput class implements the **getitem** method, allowing you to treat the output like a dictionary. In this option, we're retrieving the title and content from the result.
2. Printing the Entire Blog Object: By printing result, you get the string representation of the CrewOutput object. Since the **str** method is implemented to return the JSON output, this will display the entire output as a formatted string representing the Blog object.
1. Accessing Properties Using Dictionary-Style Indexing: You can access the fields directly using result["field_name"]. This is possible because the CrewOutput class implements the __getitem__ method, allowing you to treat the output like a dictionary. In this option, we're retrieving the title and content from the result.
2. Printing the Entire Blog Object: By printing result, you get the string representation of the CrewOutput object. Since the __str__ method is implemented to return the JSON output, this will display the entire output as a formatted string representing the Blog object.
---
@@ -979,6 +954,8 @@ While creating and executing tasks, certain validation mechanisms are in place t
These validations help in maintaining the consistency and reliability of task executions within the crewAI framework.
## Creating Directories when Saving Files
The `create_directory` parameter controls whether CrewAI should automatically create directories when saving task outputs to files. This feature is particularly useful for organizing outputs and ensuring that file paths are correctly structured, especially when working with complex project hierarchies.
@@ -1025,7 +1002,7 @@ analysis_task:
A comprehensive financial report with quarterly insights
agent: financial_analyst
output_file: reports/quarterly/q4_2024_analysis.pdf
create_directory: true # Automatically create 'reports/quarterly/' directory
create_directory: true # Automatically create 'reports/quarterly/' directory
audit_task:
description: >
@@ -1034,20 +1011,18 @@ audit_task:
A compliance audit report
agent: auditor
output_file: audit/compliance_report.md
create_directory: false # Directory must already exist
create_directory: false # Directory must already exist
```
### Use Cases
**Automatic Directory Creation (`create_directory=True`):**
- Development and prototyping environments
- Dynamic report generation with date-based folders
- Automated workflows where directory structure may vary
- Multi-tenant applications with user-specific folders
**Manual Directory Management (`create_directory=False`):**
- Production environments with strict file system controls
- Security-sensitive applications where directories must be pre-configured
- Systems with specific permission requirements

View File

@@ -9,20 +9,9 @@ mode: "wide"
Testing is a crucial part of the development process, and it is essential to ensure that your crew is performing as expected. With crewAI, you can easily test your crew and evaluate its performance using the built-in testing capabilities.
## When to Use Testing
- Before promoting a crew to production.
- After changing prompts, tools, or model configurations.
- When benchmarking quality/cost/latency tradeoffs.
## When Not to Rely on Testing Alone
- For safety-critical deployments without human review gates.
- When test datasets are too small or unrepresentative.
### Using the Testing Feature
Use the CLI command `crewai test` to run repeated crew executions and compare outputs across iterations. The parameters are `n_iterations` and `model`, which are optional and default to `2` and `gpt-4o-mini`.
We added the CLI command `crewai test` to make it easy to test your crew. This command will run your crew for a specified number of iterations and provide detailed performance metrics. The parameters are `n_iterations` and `model`, which are optional and default to 2 and `gpt-4o-mini` respectively. For now, the only provider available is OpenAI.
```bash
crewai test
@@ -58,13 +47,3 @@ A table of scores at the end will show the performance of the crew in terms of t
| Execution Time (s) | 126 | 145 | **135** | | |
The example above shows the test results for two runs of the crew with two tasks, with the average total score for each task and the crew as a whole.
## Common Failure Modes
### Scores fluctuate too much between runs
- Cause: high sampling randomness or unstable prompts.
- Fix: lower temperature and tighten output constraints.
### Good test scores but poor production quality
- Cause: test prompts do not match real workload.
- Fix: build a representative test set from real production inputs.

View File

@@ -10,17 +10,6 @@ mode: "wide"
CrewAI tools empower agents with capabilities ranging from web searching and data analysis to collaboration and delegating tasks among coworkers.
This documentation outlines how to create, integrate, and leverage these tools within the CrewAI framework, including a new focus on collaboration tools.
## When to Use Tools
- Agents need external data or side effects.
- You need deterministic actions wrapped in reusable interfaces.
- You need to connect APIs, files, databases, or browser actions into agent workflows.
## When Not to Use Tools
- The task can be solved entirely from prompt context.
- The external side effect cannot be made safe or idempotent.
## What is a Tool?
A tool in CrewAI is a skill or function that agents can utilize to perform various actions.
@@ -28,10 +17,9 @@ This includes tools from the [CrewAI Toolkit](https://github.com/joaomdmoura/cre
enabling everything from simple searches to complex interactions and effective teamwork among agents.
<Note type="info" title="Enterprise Enhancement: Tools Repository">
CrewAI AMP provides a comprehensive Tools Repository with pre-built integrations for common business systems and APIs. Deploy agents with enterprise tools in minutes instead of days.
CrewAI AOP provides a comprehensive Tools Repository with pre-built integrations for common business systems and APIs. Deploy agents with enterprise tools in minutes instead of days.
The Enterprise Tools Repository includes:
- Pre-built connectors for popular enterprise systems
- Custom tool creation interface
- Version control and sharing capabilities
@@ -296,17 +284,3 @@ writer1 = Agent(
Tools are pivotal in extending the capabilities of CrewAI agents, enabling them to undertake a broad spectrum of tasks and collaborate effectively.
When building solutions with CrewAI, leverage both custom and existing tools to empower your agents and enhance the AI ecosystem. Consider utilizing error handling,
caching mechanisms, and the flexibility of tool arguments to optimize your agents' performance and capabilities.
## Common Failure Modes
### Tool schema mismatch
- Cause: model-generated arguments do not match tool signature.
- Fix: tighten tool descriptions and validate input schemas.
### Repeated side effects
- Cause: retries trigger duplicate writes/actions.
- Fix: add idempotency keys and deduplication checks in tool logic.
### Tool timeouts under load
- Cause: unbounded retries or slow external services.
- Fix: set explicit timeout/retry policy and graceful fallbacks.

View File

@@ -1,558 +0,0 @@
---
title: "Flow HITL Management"
description: "Enterprise-grade human review for Flows with email-first notifications, routing rules, and auto-response capabilities"
icon: "users-gear"
mode: "wide"
---
<Note>
Flow HITL Management features require the `@human_feedback` decorator, available in **CrewAI version 1.8.0 or higher**. These features apply specifically to **Flows**, not Crews.
</Note>
CrewAI Enterprise provides a comprehensive Human-in-the-Loop (HITL) management system for Flows that transforms AI workflows into collaborative human-AI processes. The platform uses an **email-first architecture** that enables anyone with an email address to respond to review requests—no platform account required.
## Overview
<CardGroup cols={3}>
<Card title="Email-First Design" icon="envelope">
Responders can reply directly to notification emails to provide feedback
</Card>
<Card title="Flexible Routing" icon="route">
Route requests to specific emails based on method patterns or flow state
</Card>
<Card title="Auto-Response" icon="clock">
Configure automatic fallback responses when no human replies in time
</Card>
</CardGroup>
### Key Benefits
- **Simple mental model**: Email addresses are universal; no need to manage platform users or roles
- **External responders**: Anyone with an email can respond, even non-platform users
- **Dynamic assignment**: Pull assignee email directly from flow state (e.g., `sales_rep_email`)
- **Reduced configuration**: Fewer settings to configure, faster time to value
- **Email as primary channel**: Most users prefer responding via email over logging into a dashboard
## Setting Up Human Review Points in Flows
Configure human review checkpoints within your Flows using the `@human_feedback` decorator. When execution reaches a review point, the system pauses, notifies the assignee via email, and waits for a response.
```python
from crewai.flow.flow import Flow, start, listen, or_
from crewai.flow.human_feedback import human_feedback, HumanFeedbackResult
class ContentApprovalFlow(Flow):
@start()
def generate_content(self):
return "Generated marketing copy for Q1 campaign..."
@human_feedback(
message="Please review this content for brand compliance:",
emit=["approved", "rejected", "needs_revision"],
)
@listen(or_("generate_content", "needs_revision"))
def review_content(self):
return "Marketing copy for review..."
@listen("approved")
def publish_content(self, result: HumanFeedbackResult):
print(f"Publishing approved content. Reviewer notes: {result.feedback}")
@listen("rejected")
def archive_content(self, result: HumanFeedbackResult):
print(f"Content rejected. Reason: {result.feedback}")
```
For complete implementation details, see the [Human Feedback in Flows](/en/learn/human-feedback-in-flows) guide.
### Decorator Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| `message` | `str` | The message displayed to the human reviewer |
| `emit` | `list[str]` | Valid response options (displayed as buttons in UI) |
## Platform Configuration
Access HITL configuration from: **Deployment → Settings → Human in the Loop Configuration**
<Frame>
<img src="/images/enterprise/hitl-settings-overview.png" alt="HITL Configuration Settings" />
</Frame>
### Email Notifications
Toggle to enable or disable email notifications for HITL requests.
| Setting | Default | Description |
|---------|---------|-------------|
| Email Notifications | Enabled | Send emails when feedback is requested |
<Note>
When disabled, responders must use the dashboard UI or you must configure webhooks for custom notification systems.
</Note>
### SLA Target
Set a target response time for tracking and metrics purposes.
| Setting | Description |
|---------|-------------|
| SLA Target (minutes) | Target response time. Used for dashboard metrics and SLA tracking |
Leave empty to disable SLA tracking.
## Email Notifications & Responses
The HITL system uses an email-first architecture where responders can reply directly to notification emails.
### How Email Responses Work
<Steps>
<Step title="Notification Sent">
When a HITL request is created, an email is sent to the assigned responder with the review content and context.
</Step>
<Step title="Reply-To Address">
The email includes a special reply-to address with a signed token for authentication.
</Step>
<Step title="User Replies">
The responder simply replies to the email with their feedback—no login required.
</Step>
<Step title="Token Validation">
The platform receives the reply, verifies the signed token, and matches the sender email.
</Step>
<Step title="Flow Resumes">
The feedback is recorded and the flow continues with the human's input.
</Step>
</Steps>
### Response Format
Responders can reply with:
- **Emit option**: If the reply matches an `emit` option (e.g., "approved"), it's used directly
- **Free-form text**: Any text response is passed to the flow as feedback
- **Plain text**: The first line of the reply body is used as feedback
### Confirmation Emails
After processing a reply, the responder receives a confirmation email indicating whether the feedback was successfully submitted or if an error occurred.
### Email Token Security
- Tokens are cryptographically signed for security
- Tokens expire after 7 days
- Sender email must match the token's authorized email
- Confirmation/error emails are sent after processing
## Routing Rules
Route HITL requests to specific email addresses based on method patterns.
<Frame>
<img src="/images/enterprise/hitl-settings-routing-rules.png" alt="HITL Routing Rules Configuration" />
</Frame>
### Rule Structure
```json
{
"name": "Approvals to Finance",
"match": {
"method_name": "approve_*"
},
"assign_to_email": "finance@company.com",
"assign_from_input": "manager_email"
}
```
### Matching Patterns
| Pattern | Description | Example Match |
|---------|-------------|---------------|
| `approve_*` | Wildcard (any chars) | `approve_payment`, `approve_vendor` |
| `review_?` | Single char | `review_a`, `review_1` |
| `validate_payment` | Exact match | `validate_payment` only |
### Assignment Priority
1. **Dynamic assignment** (`assign_from_input`): If configured, pulls email from flow state
2. **Static email** (`assign_to_email`): Falls back to configured email
3. **Deployment creator**: If no rule matches, the deployment creator's email is used
### Dynamic Assignment Example
If your flow state contains `{"sales_rep_email": "alice@company.com"}`, configure:
```json
{
"name": "Route to Sales Rep",
"match": {
"method_name": "review_*"
},
"assign_from_input": "sales_rep_email"
}
```
The request will be assigned to `alice@company.com` automatically.
<Tip>
**Use Case**: Pull the assignee from your CRM, database, or previous flow step to dynamically route reviews to the right person.
</Tip>
## Auto-Response
Automatically respond to HITL requests if no human responds within a timeout. This ensures flows don't hang indefinitely.
### Configuration
| Setting | Description |
|---------|-------------|
| Enabled | Toggle to enable auto-response |
| Timeout (minutes) | Time to wait before auto-responding |
| Default Outcome | The response value (must match an `emit` option) |
<Frame>
<img src="/images/enterprise/hitl-settings-auto-respond.png" alt="HITL Auto-Response Configuration" />
</Frame>
### Use Cases
- **SLA compliance**: Ensure flows don't hang indefinitely
- **Default approval**: Auto-approve low-risk requests after timeout
- **Graceful degradation**: Continue with a safe default when reviewers are unavailable
<Warning>
Use auto-response carefully. Only enable it for non-critical reviews where a default response is acceptable.
</Warning>
## Review Process
### Dashboard Interface
The HITL review interface provides a clean, focused experience for reviewers:
- **Markdown Rendering**: Rich formatting for review content with syntax highlighting
- **Context Panel**: View flow state, execution history, and related information
- **Feedback Input**: Provide detailed feedback and comments with your decision
- **Quick Actions**: One-click emit option buttons with optional comments
<Frame>
<img src="/images/enterprise/hitl-list-pending-feedbacks.png" alt="HITL Pending Requests List" />
</Frame>
### Response Methods
Reviewers can respond via three channels:
| Method | Description |
|--------|-------------|
| **Email Reply** | Reply directly to the notification email |
| **Dashboard** | Use the Enterprise dashboard UI |
| **API/Webhook** | Programmatic response via API |
### History & Audit Trail
Every HITL interaction is tracked with a complete timeline:
- Decision history (approve/reject/revise)
- Reviewer identity and timestamp
- Feedback and comments provided
- Response method (email/dashboard/API)
- Response time metrics
## Analytics & Monitoring
Track HITL performance with comprehensive analytics.
### Performance Dashboard
<Frame>
<img src="/images/enterprise/hitl-metrics.png" alt="HITL Metrics Dashboard" />
</Frame>
<CardGroup cols={2}>
<Card title="Response Times" icon="stopwatch">
Monitor average and median response times by reviewer or flow.
</Card>
<Card title="Volume Trends" icon="chart-bar">
Analyze review volume patterns to optimize team capacity.
</Card>
<Card title="Decision Distribution" icon="chart-pie">
View approval/rejection rates across different review types.
</Card>
<Card title="SLA Tracking" icon="chart-line">
Track percentage of reviews completed within SLA targets.
</Card>
</CardGroup>
### Audit & Compliance
Enterprise-ready audit capabilities for regulatory requirements:
- Complete decision history with timestamps
- Reviewer identity verification
- Immutable audit logs
- Export capabilities for compliance reporting
## Common Use Cases
<AccordionGroup>
<Accordion title="Security Reviews" icon="shield-halved">
**Use Case**: Internal security questionnaire automation with human validation
- AI generates responses to security questionnaires
- Security team reviews and validates accuracy via email
- Approved responses are compiled into final submission
- Full audit trail for compliance
</Accordion>
<Accordion title="Content Approval" icon="file-lines">
**Use Case**: Marketing content requiring legal/brand review
- AI generates marketing copy or social media content
- Route to brand team email for voice/tone review
- Automatic publishing upon approval
</Accordion>
<Accordion title="Financial Approvals" icon="money-bill">
**Use Case**: Expense reports, contract terms, budget allocations
- AI pre-processes and categorizes financial requests
- Route based on amount thresholds using dynamic assignment
- Maintain complete audit trail for financial compliance
</Accordion>
<Accordion title="Dynamic Assignment from CRM" icon="database">
**Use Case**: Route reviews to account owners from your CRM
- Flow fetches account owner email from CRM
- Store email in flow state (e.g., `account_owner_email`)
- Use `assign_from_input` to route to the right person automatically
</Accordion>
<Accordion title="Quality Assurance" icon="magnifying-glass">
**Use Case**: AI output validation before customer delivery
- AI generates customer-facing content or responses
- QA team reviews via email notification
- Feedback loops improve AI performance over time
</Accordion>
</AccordionGroup>
## Webhooks API
When your Flows pause for human feedback, you can configure webhooks to send request data to your own application. This enables:
- Building custom approval UIs
- Integrating with internal tools (Jira, ServiceNow, custom dashboards)
- Routing approvals to third-party systems
- Mobile app notifications
- Automated decision systems
<Frame>
<img src="/images/enterprise/hitl-settings-webhook.png" alt="HITL Webhook Configuration" />
</Frame>
### Configuring Webhooks
<Steps>
<Step title="Navigate to Settings">
Go to your **Deployment** → **Settings** → **Human in the Loop**
</Step>
<Step title="Expand Webhooks Section">
Click to expand the **Webhooks** configuration
</Step>
<Step title="Add Your Webhook URL">
Enter your webhook URL (must be HTTPS in production)
</Step>
<Step title="Save Configuration">
Click **Save Configuration** to activate
</Step>
</Steps>
You can configure multiple webhooks. Each active webhook receives all HITL events.
### Webhook Events
Your endpoint will receive HTTP POST requests for these events:
| Event Type | When Triggered |
|------------|----------------|
| `new_request` | A flow pauses and requests human feedback |
### Webhook Payload
All webhooks receive a JSON payload with this structure:
```json
{
"event": "new_request",
"request": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"flow_id": "flow_abc123",
"method_name": "review_article",
"message": "Please review this article for publication.",
"emit_options": ["approved", "rejected", "request_changes"],
"state": {
"article_id": 12345,
"author": "john@example.com",
"category": "technology"
},
"metadata": {},
"created_at": "2026-01-14T12:00:00Z"
},
"deployment": {
"id": 456,
"name": "Content Review Flow",
"organization_id": 789
},
"callback_url": "https://api.crewai.com/...",
"assigned_to_email": "reviewer@company.com"
}
```
### Responding to Requests
To submit feedback, **POST to the `callback_url`** included in the webhook payload.
```http
POST {callback_url}
Content-Type: application/json
{
"feedback": "Approved. Great article!",
"source": "my_custom_app"
}
```
### Security
<Info>
All webhook requests are cryptographically signed using HMAC-SHA256 to ensure authenticity and prevent tampering.
</Info>
#### Webhook Security
- **HMAC-SHA256 signatures**: Every webhook includes a cryptographic signature
- **Per-webhook secrets**: Each webhook has its own unique signing secret
- **Encrypted at rest**: Signing secrets are encrypted in our database
- **Timestamp verification**: Prevents replay attacks
#### Signature Headers
Each webhook request includes these headers:
| Header | Description |
|--------|-------------|
| `X-Signature` | HMAC-SHA256 signature: `sha256=<hex_digest>` |
| `X-Timestamp` | Unix timestamp when the request was signed |
#### Verification
Verify by computing:
```python
import hmac
import hashlib
expected = hmac.new(
signing_secret.encode(),
f"{timestamp}.{payload}".encode(),
hashlib.sha256
).hexdigest()
if hmac.compare_digest(expected, signature):
# Valid signature
```
### Error Handling
Your webhook endpoint should return a 2xx status code to acknowledge receipt:
| Your Response | Our Behavior |
|---------------|--------------|
| 2xx | Webhook delivered successfully |
| 4xx/5xx | Logged as failed, no retry |
| Timeout (30s) | Logged as failed, no retry |
## Security & RBAC
### Dashboard Access
HITL access is controlled at the deployment level:
| Permission | Capability |
|------------|------------|
| `manage_human_feedback` | Configure HITL settings, view all requests |
| `respond_to_human_feedback` | Respond to requests, view assigned requests |
### Email Response Authorization
For email replies:
1. The reply-to token encodes the authorized email
2. Sender email must match the token's email
3. Token must not be expired (7-day default)
4. Request must still be pending
### Audit Trail
All HITL actions are logged:
- Request creation
- Assignment changes
- Response submission (with source: dashboard/email/API)
- Flow resume status
## Troubleshooting
### Emails Not Sending
1. Check "Email Notifications" is enabled in configuration
2. Verify routing rules match the method name
3. Verify assignee email is valid
4. Check deployment creator fallback if no routing rules match
### Email Replies Not Processing
1. Check token hasn't expired (7-day default)
2. Verify sender email matches assigned email
3. Ensure request is still pending (not already responded)
### Flow Not Resuming
1. Check request status in dashboard
2. Verify callback URL is accessible
3. Ensure deployment is still running
## Best Practices
<Tip>
**Start Simple**: Begin with email notifications to deployment creator, then add routing rules as your workflows mature.
</Tip>
1. **Use Dynamic Assignment**: Pull assignee emails from your flow state for flexible routing.
2. **Configure Auto-Response**: Set up a fallback for non-critical reviews to prevent flows from hanging.
3. **Monitor Response Times**: Use analytics to identify bottlenecks and optimize your review process.
4. **Keep Review Messages Clear**: Write clear, actionable messages in the `@human_feedback` decorator.
5. **Test Email Flow**: Send test requests to verify email delivery before going to production.
## Related Resources
<CardGroup cols={2}>
<Card title="Human Feedback in Flows" icon="code" href="/en/learn/human-feedback-in-flows">
Implementation guide for the `@human_feedback` decorator
</Card>
<Card title="Flow HITL Workflow Guide" icon="route" href="/en/enterprise/guides/human-in-the-loop">
Step-by-step guide for setting up HITL workflows
</Card>
<Card title="RBAC Configuration" icon="shield-check" href="/en/enterprise/features/rbac">
Configure role-based access control for your organization
</Card>
<Card title="Webhook Streaming" icon="bolt" href="/en/enterprise/features/webhook-streaming">
Set up real-time event notifications
</Card>
</CardGroup>

View File

@@ -1,342 +0,0 @@
---
title: PII Redaction for Traces
description: "Automatically redact sensitive data from crew and flow execution traces"
icon: "lock"
mode: "wide"
---
## Overview
PII Redaction is a CrewAI AMP feature that automatically detects and masks Personally Identifiable Information (PII) in your crew and flow execution traces. This ensures sensitive data like credit card numbers, social security numbers, email addresses, and names are not exposed in your CrewAI AMP traces. You can also create custom recognizers to protect organization-specific data.
<Info>
PII Redaction is available on the Enterprise plan.
Deployment must be version 1.8.0 or higher.
</Info>
<Frame>
![PII Redaction Overview](/images/enterprise/pii_mask_recognizer_trace_example.png)
</Frame>
## Why PII Redaction Matters
When running AI agents in production, sensitive information often flows through your crews:
- Customer data from CRM integrations
- Financial information from payment processors
- Personal details from form submissions
- Internal employee data
Without proper redaction, this data appears in traces, making compliance with regulations like GDPR, HIPAA, and PCI-DSS challenging. PII Redaction solves this by automatically masking sensitive data before it's stored in traces.
## How It Works
1. **Detect** - Scan trace event data for known PII patterns
2. **Classify** - Identify the type of sensitive data (credit card, SSN, email, etc.)
3. **Mask/Redact** - Replace the sensitive data with masked values based on your configuration
```
Original: "Contact john.doe@company.com or call 555-123-4567"
Redacted: "Contact <EMAIL_ADDRESS> or call <PHONE_NUMBER>"
```
## Enabling PII Redaction
<Info>
You must be on the Enterprise plan and your deployment must be version 1.8.0 or higher to use this feature.
</Info>
<Steps>
<Step title="Navigate to Crew Settings">
In the CrewAI AMP dashboard, select your deployed crew and go to one of your deployments/automations, then navigate to **Settings** → **PII Protection**.
</Step>
<Step title="Enable PII Protection">
Toggle on **PII Redaction for Traces**. This will enable automatic scanning and redaction of trace data.
<Info>
You need to manually enable PII Redaction for each deployment.
</Info>
<Frame>
![Enable PII Redaction](/images/enterprise/pii_mask_recognizer_enable.png)
</Frame>
</Step>
<Step title="Configure Entity Types">
Select which types of PII to detect and redact. Each entity can be individually enabled or disabled.
<Frame>
![Configure Entities](/images/enterprise/pii_mask_recognizer_supported_entities.png)
</Frame>
</Step>
<Step title="Save">
Save your configuration. PII redaction will be active on all subsequent crew executions, no redeployment is needed.
</Step>
</Steps>
## Supported Entity Types
CrewAI supports the following PII entity types, organized by category.
### Global Entities
| Entity | Description | Example |
|--------|-------------|---------|
| `CREDIT_CARD` | Credit/debit card numbers | "4111-1111-1111-1111" |
| `CRYPTO` | Cryptocurrency wallet addresses | "bc1qxy2kgd..." |
| `DATE_TIME` | Dates and times | "January 15, 2024" |
| `EMAIL_ADDRESS` | Email addresses | "john@example.com" |
| `IBAN_CODE` | International bank account numbers | "DE89 3704 0044 0532 0130 00" |
| `IP_ADDRESS` | IPv4 and IPv6 addresses | "192.168.1.1" |
| `LOCATION` | Geographic locations | "New York City" |
| `MEDICAL_LICENSE` | Medical license numbers | "MD12345" |
| `NRP` | Nationalities, religious, or political groups | - |
| `PERSON` | Personal names | "John Doe" |
| `PHONE_NUMBER` | Phone numbers in various formats | "+1 (555) 123-4567" |
| `URL` | Web URLs | "https://example.com" |
### US-Specific Entities
| Entity | Description | Example |
|--------|-------------|---------|
| `US_BANK_NUMBER` | US Bank account numbers | "1234567890" |
| `US_DRIVER_LICENSE` | US Driver's license numbers | "D1234567" |
| `US_ITIN` | Individual Taxpayer ID | "900-70-0000" |
| `US_PASSPORT` | US Passport numbers | "123456789" |
| `US_SSN` | Social Security Numbers | "123-45-6789" |
## Redaction Actions
For each enabled entity, you can configure how the data is redacted:
| Action | Description | Example Output |
|--------|-------------|----------------|
| `mask` | Replace with the entity type label | `<CREDIT_CARD>` |
| `redact` | Completely remove the text | *(empty)* |
## Custom Recognizers
In addition to built-in entities, you can create **custom recognizers** to detect organization-specific PII patterns.
<Frame>
![Custom Recognizers](/images/enterprise/pii_mask_recognizer.png)
</Frame>
### Recognizer Types
You have two options for custom recognizers:
| Type | Best For | Example Use Case |
|------|----------|------------------|
| **Pattern-based (Regex)** | Structured data with predictable formats | Salary amounts, employee IDs, project codes |
| **Deny-list** | Exact string matches | Company names, internal codenames, specific terms |
### Creating a Custom Recognizer
<Steps>
<Step title="Navigate to Custom Recognizers">
Go to your Organization **Settings** → **Organization** → **Add Recognizer**.
</Step>
<Step title="Configure the Recognizer">
<Frame>
![Configure Recognizer](/images/enterprise/pii_mask_recognizer_create.png)
</Frame>
Configure the following fields:
- **Name**: A descriptive name for the recognizer
- **Entity Type**: The entity label that will appear in redacted output (e.g., `EMPLOYEE_ID`, `SALARY`)
- **Type**: Choose between Regex Pattern or Deny List
- **Pattern/Values**: Regex pattern or list of strings to match
- **Confidence Threshold**: Minimum score (0.0-1.0) required for a match to trigger redaction. Higher values (e.g., 0.8) reduce false positives but may miss some matches. Lower values (e.g., 0.5) catch more matches but may over-redact. Default is 0.8.
- **Context Words** (optional): Words that increase detection confidence when found nearby
</Step>
<Step title="Save">
Save the recognizer. It will be available to enable on your deployments.
</Step>
</Steps>
### Understanding Entity Types
The **Entity Type** determines how matched content appears in redacted traces:
```
Entity Type: SALARY
Pattern: salary:\s*\$\s*\d+
Input: "Employee salary: $50,000"
Output: "Employee <SALARY>"
```
### Using Context Words
Context words improve accuracy by increasing confidence when specific terms appear near the matched pattern:
```
Context Words: "project", "code", "internal"
Entity Type: PROJECT_CODE
Pattern: PRJ-\d{4}
```
When "project" or "code" appears near "PRJ-1234", the recognizer has higher confidence it's a true match, reducing false positives.
## Viewing Redacted Traces
Once PII redaction is enabled, your traces will show redacted values in place of sensitive data:
```
Task Output: "Customer <PERSON> placed order #12345.
Contact email: <EMAIL_ADDRESS>, phone: <PHONE_NUMBER>.
Payment processed for card ending in <CREDIT_CARD>."
```
Redacted values are clearly marked with angle brackets and the entity type label (e.g., `<EMAIL_ADDRESS>`), making it easy to understand what data was protected while still allowing you to debug and monitor crew behavior.
## Best Practices
### Performance Considerations
<Steps>
<Step title="Enable Only Needed Entities">
Each enabled entity adds processing overhead. Only enable entities relevant to your data.
</Step>
<Step title="Use Specific Patterns">
For custom recognizers, use specific patterns to reduce false positives and improve performance. Regex patterns are best when identifying specific patterns in the traces such as salary, employee id, project code, etc. Deny-list recognizers are best when identifying exact strings in the traces such as company names, internal codenames, etc.
</Step>
<Step title="Leverage Context Words">
Context words improve accuracy by only triggering detection when surrounding text matches.
</Step>
</Steps>
## Troubleshooting
<Accordion title="PII Not Being Redacted">
**Possible Causes:**
- Entity type not enabled in configuration
- Pattern doesn't match the data format
- Custom recognizer has syntax errors
**Solutions:**
- Verify entity is enabled in Settings → Security
- Test regex patterns with sample data
- Check logs for configuration errors
</Accordion>
<Accordion title="Too Much Data Being Redacted">
**Possible Causes:**
- Overly broad entity types enabled (e.g., `DATE_TIME` catches dates everywhere)
- Custom recognizer patterns are too general
**Solutions:**
- Disable entities that cause false positives
- Make custom patterns more specific
- Add context words to improve accuracy
</Accordion>
<Accordion title="Performance Issues">
**Possible Causes:**
- Too many entities enabled
- NLP-based entities (`PERSON`, `LOCATION`, `NRP`) are computationally expensive as they use machine learning models
**Solutions:**
- Only enable entities you actually need
- Consider using pattern-based alternatives where possible
- Monitor trace processing times in the dashboard
</Accordion>
---
## Practical Example: Salary Pattern Matching
This example demonstrates how to create a custom recognizer to detect and mask salary information in your traces.
### Use Case
Your crew processes employee or financial data that includes salary information in formats like:
- `salary: $50,000`
- `salary: $125,000.00`
- `salary:$1,500.50`
You want to automatically mask these values to protect sensitive compensation data.
### Configuration
<Frame>
![Salary Recognizer Configuration](/images/enterprise/pii_mask_custom_recognizer_salary.png)
</Frame>
| Field | Value |
|-------|-------|
| **Name** | `SALARY` |
| **Entity Type** | `SALARY` |
| **Type** | Regex Pattern |
| **Regex Pattern** | `salary:\s*\$\s*\d{1,3}(,\d{3})*(\.\d{2})?` |
| **Action** | Mask |
| **Confidence Threshold** | `0.8` |
| **Context Words** | `salary, compensation, pay, wage, income` |
### Regex Pattern Breakdown
| Pattern Component | Meaning |
|-------------------|---------|
| `salary:` | Matches the literal text "salary:" |
| `\s*` | Matches zero or more whitespace characters |
| `\$` | Matches the dollar sign (escaped) |
| `\s*` | Matches zero or more whitespace characters after $ |
| `\d{1,3}` | Matches 1-3 digits (e.g., "1", "50", "125") |
| `(,\d{3})*` | Matches comma-separated thousands (e.g., ",000", ",500,000") |
| `(\.\d{2})?` | Optionally matches cents (e.g., ".00", ".50") |
### Example Results
```
Original: "Employee record shows salary: $125,000.00 annually"
Redacted: "Employee record shows <SALARY> annually"
Original: "Base salary:$50,000 with bonus potential"
Redacted: "Base <SALARY> with bonus potential"
```
<Tip>
Adding context words like "salary", "compensation", "pay", "wage", and "income" helps increase detection confidence when these terms appear near the matched pattern, reducing false positives.
</Tip>
### Enable the Recognizer for Your Deployments
<Warning>
Creating a custom recognizer at the organization level does not automatically enable it for your deployments. You must manually enable each recognizer for every deployment where you want it applied.
</Warning>
After creating your custom recognizer, enable it for each deployment:
<Steps>
<Step title="Navigate to Your Deployment">
Go to your deployment/automation and open **Settings** → **PII Protection**.
</Step>
<Step title="Select Custom Recognizers">
Under **Mask Recognizers**, you'll see your organization-defined recognizers. Check the box next to the recognizers you want to enable.
<Frame>
![Enable Custom Recognizer](/images/enterprise/pii_mask_recognizers_options.png)
</Frame>
</Step>
<Step title="Save Configuration">
Save your changes. The recognizer will be active on all subsequent executions for this deployment.
</Step>
</Steps>
<Info>
Repeat this process for each deployment where you need the custom recognizer. This gives you granular control over which recognizers are active in different environments (e.g., development vs. production).
</Info>

View File

@@ -7,10 +7,10 @@ mode: "wide"
## Overview
RBAC in CrewAI AMP enables secure, scalable access management through a combination of organizationlevel roles and automationlevel visibility controls.
RBAC in CrewAI AOP enables secure, scalable access management through a combination of organizationlevel roles and automationlevel visibility controls.
<Frame>
<img src="/images/enterprise/users_and_roles.png" alt="RBAC overview in CrewAI AMP" />
<img src="/images/enterprise/users_and_roles.png" alt="RBAC overview in CrewAI AOP" />
</Frame>
@@ -28,11 +28,10 @@ You can configure users and roles in Settings → Roles.
<Steps>
<Step title="Open Roles settings">
Go to <b>Settings → Roles</b> in CrewAI AMP.
Go to <b>Settings → Roles</b> in CrewAI AOP.
</Step>
<Step title="Choose a role type">
Use a predefined role (<b>Owner</b>, <b>Member</b>) or click{" "}
<b>Create role</b> to define a custom one.
Use a predefined role (<b>Owner</b>, <b>Member</b>) or click <b>Create role</b> to define a custom one.
</Step>
<Step title="Assign to members">
Select users and assign the role. You can change this anytime.
@@ -41,10 +40,10 @@ You can configure users and roles in Settings → Roles.
### Configuration summary
| Area | Where to configure | Options |
| :-------------------- | :--------------------------------- | :-------------------------------------- |
| Users & Roles | Settings → Roles | Predefined: Owner, Member; Custom roles |
| Automation visibility | Automation → Settings → Visibility | Private; Whitelist users/roles |
| Area | Where to configure | Options |
|:---|:---|:---|
| Users & Roles | Settings → Roles | Predefined: Owner, Member; Custom roles |
| Automation visibility | Automation → Settings → Visibility | Private; Whitelist users/roles |
## Automationlevel Access Control
@@ -71,34 +70,30 @@ You can configure automationlevel access control in Automation → Settings
Navigate to <b>Automation → Settings → Visibility</b>.
</Step>
<Step title="Set visibility">
Choose <b>Private</b> to restrict access. The organization owner always
retains access.
Choose <b>Private</b> to restrict access. The organization owner always retains access.
</Step>
<Step title="Whitelist access">
Add specific users and roles allowed to view, run, and access
logs/metrics/settings.
Add specific users and roles allowed to view, run, and access logs/metrics/settings.
</Step>
<Step title="Save and verify">
Save changes, then confirm that nonwhitelisted users cannot view or run the
automation.
Save changes, then confirm that nonwhitelisted users cannot view or run the automation.
</Step>
</Steps>
### Private visibility: access outcomes
| Action | Owner | Whitelisted user/role | Not whitelisted |
| :--------------------------- | :---- | :-------------------- | :-------------- |
| View automation | ✓ | ✓ | ✗ |
| Run automation/API | ✓ | ✓ | ✗ |
| Access logs/metrics/settings | ✓ | ✓ | ✗ |
| Action | Owner | Whitelisted user/role | Not whitelisted |
|:---|:---|:---|:---|
| View automation | ✓ | ✓ | ✗ |
| Run automation/API | ✓ | ✓ | ✗ |
| Access logs/metrics/settings | ✓ | ✓ | ✗ |
<Tip>
The organization owner always has access. In private mode, only whitelisted
users and roles can view, run, and access logs/metrics/settings.
The organization owner always has access. In private mode, only whitelisted users and roles can view, run, and access logs/metrics/settings.
</Tip>
<Frame>
<img src="/images/enterprise/visibility.png" alt="Automation Visibility settings in CrewAI AMP" />
<img src="/images/enterprise/visibility.png" alt="Automation Visibility settings in CrewAI AOP" />
</Frame>

View File

@@ -18,226 +18,222 @@ Tools & Integrations is the central hub for connecting thirdparty apps and ma
<Tabs>
<Tab title="Integrations" icon="plug">
## Agent Apps (Integrations)
## Agent Apps (Integrations)
Connect enterprisegrade applications (e.g., Gmail, Google Drive, HubSpot, Slack) via OAuth to enable agent actions.
Connect enterprisegrade applications (e.g., Gmail, Google Drive, HubSpot, Slack) via OAuth to enable agent actions.
{" "}
<Steps>
<Step title="Connect">
Click <b>Connect</b> on an app and complete OAuth.
</Step>
<Step title="Configure">
Optionally adjust scopes, triggers, and action availability.
</Step>
<Step title="Use in Agents">
Connected services become available as tools for your agents.
</Step>
</Steps>
<Steps>
<Step title="Connect">
Click <b>Connect</b> on an app and complete OAuth.
</Step>
<Step title="Configure">
Optionally adjust scopes, triggers, and action availability.
</Step>
<Step title="Use in Agents">
Connected services become available as tools for your agents.
</Step>
</Steps>
{" "}
<Frame>![Integrations Grid](/images/enterprise/agent-apps.png)</Frame>
<Frame>
![Integrations Grid](/images/enterprise/agent-apps.png)
</Frame>
### Connect your Account
### Connect your Account
1. Go to <Link href="https://app.crewai.com/crewai_plus/connectors">Integrations</Link>
2. Click <b>Connect</b> on the desired service
3. Complete the OAuth flow and grant scopes
4. Copy your Enterprise Token from <Link href="https://app.crewai.com/crewai_plus/settings/integrations">Integration Settings</Link>
1. Go to <Link href="https://app.crewai.com/crewai_plus/connectors">Integrations</Link>
2. Click <b>Connect</b> on the desired service
3. Complete the OAuth flow and grant scopes
4. Copy your Enterprise Token from <Link href="https://app.crewai.com/crewai_plus/settings/integrations">Integration Settings</Link>
{" "}
<Frame>
![Enterprise Token](/images/enterprise/enterprise_action_auth_token.png)
</Frame>
<Frame>
![Enterprise Token](/images/enterprise/enterprise_action_auth_token.png)
</Frame>
### Install Integration Tools
### Install Integration Tools
To use the integrations locally, you need to install the latest `crewai-tools` package.
To use the integrations locally, you need to install the latest `crewai-tools` package.
```bash
uv add crewai-tools
```
```bash
uv add crewai-tools
```
### Environment Variable Setup
### Environment Variable Setup
{" "}
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
</Note>
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
### Usage Example
### Usage Example
{" "}
<Tip>
Use the new streamlined approach to integrate enterprise apps. Simply specify
the app and its actions directly in the Agent configuration.
</Tip>
<Tip>
Use the new streamlined approach to integrate enterprise apps. Simply specify the app and its actions directly in the Agent configuration.
</Tip>
```python
from crewai import Agent, Task, Crew
```python
from crewai import Agent, Task, Crew
# Create an agent with Gmail capabilities
email_agent = Agent(
role="Email Manager",
goal="Manage and organize email communications",
backstory="An AI assistant specialized in email management and communication.",
apps=['gmail', 'gmail/send_email'] # Using canonical name 'gmail'
)
# Create an agent with Gmail capabilities
email_agent = Agent(
role="Email Manager",
goal="Manage and organize email communications",
backstory="An AI assistant specialized in email management and communication.",
apps=['gmail', 'gmail/send_email'] # Using canonical name 'gmail'
)
# Task to send an email
email_task = Task(
description="Draft and send a follow-up email to john@example.com about the project update",
agent=email_agent,
expected_output="Confirmation that email was sent successfully"
)
# Task to send an email
email_task = Task(
description="Draft and send a follow-up email to john@example.com about the project update",
agent=email_agent,
expected_output="Confirmation that email was sent successfully"
)
# Run the task
crew = Crew(
agents=[email_agent],
tasks=[email_task]
)
# Run the task
crew = Crew(
agents=[email_agent],
tasks=[email_task]
)
# Run the crew
crew.kickoff()
```
# Run the crew
crew.kickoff()
```
### Filtering Tools
### Filtering Tools
```python
from crewai import Agent, Task, Crew
```python
from crewai import Agent, Task, Crew
# Create agent with specific Gmail actions only
gmail_agent = Agent(
role="Gmail Manager",
goal="Manage gmail communications and notifications",
backstory="An AI assistant that helps coordinate gmail communications.",
apps=['gmail/fetch_emails'] # Using canonical name with specific action
)
# Create agent with specific Gmail actions only
gmail_agent = Agent(
role="Gmail Manager",
goal="Manage gmail communications and notifications",
backstory="An AI assistant that helps coordinate gmail communications.",
apps=['gmail/fetch_emails'] # Using canonical name with specific action
)
notification_task = Task(
description="Find the email from john@example.com",
agent=gmail_agent,
expected_output="Email found from john@example.com"
)
notification_task = Task(
description="Find the email from john@example.com",
agent=gmail_agent,
expected_output="Email found from john@example.com"
)
crew = Crew(
agents=[gmail_agent],
tasks=[notification_task]
)
```
crew = Crew(
agents=[gmail_agent],
tasks=[notification_task]
)
```
On a deployed crew, you can specify which actions are available for each integration from the service settings page.
On a deployed crew, you can specify which actions are available for each integration from the service settings page.
{" "}
<Frame>
![Filter Actions](/images/enterprise/filtering_enterprise_action_tools.png)
</Frame>
<Frame>
![Filter Actions](/images/enterprise/filtering_enterprise_action_tools.png)
</Frame>
### Scoped Deployments (multiuser orgs)
### Scoped Deployments (multiuser orgs)
You can scope each integration to a specific user. For example, a crew that connects to Google can use a specific users Gmail account.
You can scope each integration to a specific user. For example, a crew that connects to Google can use a specific users Gmail account.
{" "}
<Tip>Useful when different teams/users must keep data access separated.</Tip>
<Tip>
Useful when different teams/users must keep data access separated.
</Tip>
Use the `user_bearer_token` to scope authentication to the requesting user. If the user isnt logged in, the crew wont use connected integrations. Otherwise it falls back to the default bearer token configured for the deployment.
Use the `user_bearer_token` to scope authentication to the requesting user. If the user isnt logged in, the crew wont use connected integrations. Otherwise it falls back to the default bearer token configured for the deployment.
{" "}
<Frame>![User Bearer Token](/images/enterprise/user_bearer_token.png)</Frame>
<Frame>
![User Bearer Token](/images/enterprise/user_bearer_token.png)
</Frame>
{" "}
<div id="catalog"></div>
### Catalog
<div id="catalog"></div>
### Catalog
#### Communication & Collaboration
#### Communication & Collaboration
- Gmail — Manage emails and drafts
- Slack — Workspace notifications and alerts
- Microsoft — Office 365 and Teams integration
- Gmail — Manage emails and drafts
- Slack — Workspace notifications and alerts
- Microsoft — Office 365 and Teams integration
#### Project Management
- Jira — Issue tracking and project management
- ClickUp — Task and productivity management
- Asana — Team task and project coordination
- Notion — Page and database management
- Linear — Software project and bug tracking
- GitHub — Repository and issue management
#### Project Management
#### Customer Relationship Management
- Salesforce — CRM account and opportunity management
- HubSpot — Sales pipeline and contact management
- Zendesk — Customer support ticket management
- Jira — Issue tracking and project management
- ClickUp — Task and productivity management
- Asana — Team task and project coordination
- Notion — Page and database management
- Linear — Software project and bug tracking
- GitHub — Repository and issue management
#### Business & Finance
- Stripe — Payment processing and customer management
- Shopify — Ecommerce store and product management
#### Customer Relationship Management
#### Productivity & Storage
- Google Sheets — Spreadsheet data synchronization
- Google Calendar — Event and schedule management
- Box — File storage and document management
- Salesforce — CRM account and opportunity management
- HubSpot — Sales pipeline and contact management
- Zendesk — Customer support ticket management
#### Business & Finance
- Stripe — Payment processing and customer management
- Shopify — Ecommerce store and product management
#### Productivity & Storage
- Google Sheets — Spreadsheet data synchronization
- Google Calendar — Event and schedule management
- Box — File storage and document management
…and more to come!
…and more to come!
</Tab>
<Tab title="Internal Tools" icon="toolbox">
## Internal Tools
## Internal Tools
Create custom tools locally, publish them on CrewAI AMP Tool Repository and use them in your agents.
Create custom tools locally, publish them on CrewAI AOP Tool Repository and use them in your agents.
{" "}
<Tip>
Before running the commands below, make sure you log in to your CrewAI AMP
account by running this command: ```bash crewai login ```
</Tip>
<Tip>
Before running the commands below, make sure you log in to your CrewAI AOP account by running this command:
```bash
crewai login
```
</Tip>
{" "}
<Frame>
![Internal Tool Detail](/images/enterprise/tools-integrations-internal.png)
</Frame>
<Frame>
![Internal Tool Detail](/images/enterprise/tools-integrations-internal.png)
</Frame>
{" "}
<Steps>
<Step title="Create">
Create a new tool locally. ```bash crewai tool create your-tool ```
</Step>
<Step title="Publish">
Publish the tool to the CrewAI AMP Tool Repository. ```bash crewai tool
publish ```
</Step>
<Step title="Install">
Install the tool from the CrewAI AMP Tool Repository. ```bash crewai tool
install your-tool ```
</Step>
</Steps>
<Steps>
<Step title="Create">
Create a new tool locally.
```bash
crewai tool create your-tool
```
</Step>
<Step title="Publish">
Publish the tool to the CrewAI AOP Tool Repository.
```bash
crewai tool publish
```
</Step>
<Step title="Install">
Install the tool from the CrewAI AOP Tool Repository.
```bash
crewai tool install your-tool
```
</Step>
</Steps>
Manage:
Manage:
- Name and description
- Visibility (Private / Public)
- Required environment variables
- Version history and downloads
- Team and role access
- Name and description
- Visibility (Private / Public)
- Required environment variables
- Version history and downloads
- Team and role access
{" "}
<Frame>![Internal Tool Detail](/images/enterprise/tool-configs.png)</Frame>
<Frame>
![Internal Tool Detail](/images/enterprise/tool-configs.png)
</Frame>
</Tab>
</Tabs>
@@ -245,18 +241,10 @@ Manage:
## Related
<CardGroup cols={2}>
<Card
title="Tool Repository"
href="/en/enterprise/guides/tool-repository#tool-repository"
icon="toolbox"
>
<Card title="Tool Repository" href="/en/enterprise/guides/tool-repository#tool-repository" icon="toolbox">
Create, publish, and version custom tools for your organization.
</Card>
<Card
title="Webhook Automation"
href="/en/enterprise/guides/webhook-automation"
icon="bolt"
>
<Card title="Webhook Automation" href="/en/enterprise/guides/webhook-automation" icon="bolt">
Automate workflows and integrate with external platforms and services.
</Card>
</CardGroup>

View File

@@ -11,7 +11,7 @@ Traces provide comprehensive visibility into your crew executions, helping you m
## What are Traces?
Traces in CrewAI AMP are detailed execution records that capture every aspect of your crew's operation, from initial inputs to final outputs. They record:
Traces in CrewAI AOP are detailed execution records that capture every aspect of your crew's operation, from initial inputs to final outputs. They record:
- Agent thoughts and reasoning
- Task execution details
@@ -20,13 +20,15 @@ Traces in CrewAI AMP are detailed execution records that capture every aspect of
- Execution times
- Cost estimates
<Frame>![Traces Overview](/images/enterprise/traces-overview.png)</Frame>
<Frame>
![Traces Overview](/images/enterprise/traces-overview.png)
</Frame>
## Accessing Traces
<Steps>
<Step title="Navigate to the Traces Tab">
Once in your CrewAI AMP dashboard, click on the **Traces** to view all execution records.
Once in your CrewAI AOP dashboard, click on the **Traces** to view all execution records.
</Step>
<Step title="Select an Execution">
@@ -49,7 +51,9 @@ The top section displays high-level metrics about the execution:
- **Execution Time**: Total duration of the crew run
- **Estimated Cost**: Approximate cost based on token usage
<Frame>![Execution Summary](/images/enterprise/trace-summary.png)</Frame>
<Frame>
![Execution Summary](/images/enterprise/trace-summary.png)
</Frame>
### 2. Tasks & Agents
@@ -60,25 +64,33 @@ This section shows all tasks and agents that were part of the crew execution:
- Status (completed/failed)
- Individual execution time of the task
<Frame>![Task List](/images/enterprise/trace-tasks.png)</Frame>
<Frame>
![Task List](/images/enterprise/trace-tasks.png)
</Frame>
### 3. Final Output
Displays the final result produced by the crew after all tasks are completed.
<Frame>![Final Output](/images/enterprise/final-output.png)</Frame>
<Frame>
![Final Output](/images/enterprise/final-output.png)
</Frame>
### 4. Execution Timeline
A visual representation of when each task started and ended, helping you identify bottlenecks or parallel execution patterns.
<Frame>![Execution Timeline](/images/enterprise/trace-timeline.png)</Frame>
<Frame>
![Execution Timeline](/images/enterprise/trace-timeline.png)
</Frame>
### 5. Detailed Task View
When you click on a specific task in the timeline or task list, you'll see:
<Frame>![Detailed Task View](/images/enterprise/trace-detailed-task.png)</Frame>
<Frame>
![Detailed Task View](/images/enterprise/trace-detailed-task.png)
</Frame>
- **Task Key**: Unique identifier for the task
- **Task ID**: Technical identifier in the system
@@ -92,6 +104,7 @@ When you click on a specific task in the timeline or task list, you'll see:
- **Input**: Any input provided to this task from previous tasks
- **Output**: The actual result produced by the agent
## Using Traces for Debugging
Traces are invaluable for troubleshooting issues with your crews:
@@ -108,7 +121,6 @@ Traces are invaluable for troubleshooting issues with your crews:
<Frame>
![Failure Points](/images/enterprise/failure.png)
</Frame>
</Step>
<Step title="Optimize Performance">
@@ -118,7 +130,6 @@ Traces are invaluable for troubleshooting issues with your crews:
- Excessive token usage
- Redundant tool operations
- Unnecessary API calls
</Step>
<Step title="Improve Cost Efficiency">
@@ -128,7 +139,6 @@ Traces are invaluable for troubleshooting issues with your crews:
- Refine prompts to be more concise
- Cache frequently accessed information
- Structure tasks to minimize redundant operations
</Step>
</Steps>
@@ -143,6 +153,5 @@ CrewAI batches trace uploads to reduce overhead on high-volume runs:
This yields more stable tracing under load while preserving detailed task/agent telemetry.
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with trace analysis or any other
CrewAI AMP features.
Contact our support team for assistance with trace analysis or any other CrewAI AOP features.
</Card>

View File

@@ -8,7 +8,7 @@ mode: "wide"
## Overview
Enterprise Event Streaming lets you receive real-time webhook updates about your crews and flows deployed to
CrewAI AMP, such as model calls, tool usage, and flow steps.
CrewAI AOP, such as model calls, tool usage, and flow steps.
## Usage
@@ -16,7 +16,7 @@ When using the Kickoff API, include a `webhooks` object to your request, for exa
```json
{
"inputs": { "foo": "bar" },
"inputs": {"foo": "bar"},
"webhooks": {
"events": ["crew_kickoff_started", "llm_call_started"],
"url": "https://your.endpoint/webhook",
@@ -46,8 +46,8 @@ Each webhook sends a list of events:
"data": {
"model": "gpt-4",
"messages": [
{ "role": "system", "content": "You are an assistant." },
{ "role": "user", "content": "Summarize this article." }
{"role": "system", "content": "You are an assistant."},
{"role": "user", "content": "Summarize this article."}
]
}
}
@@ -55,7 +55,7 @@ Each webhook sends a list of events:
}
```
The `data` object structure varies by event type. Refer to the [event list](https://github.com/crewAIInc/crewAI/tree/main/lib/crewai/src/crewai/events/types) on GitHub.
The `data` object structure varies by event type. Refer to the [event list](https://github.com/crewAIInc/crewAI/tree/main/src/crewai/utilities/events) on GitHub.
As requests are sent over HTTP, the order of events can't be guaranteed. If you need ordering, use the `timestamp` field.
@@ -65,109 +65,104 @@ CrewAI supports both system events and custom events in Enterprise Event Streami
### Flow Events:
- `flow_created`
- `flow_started`
- `flow_finished`
- `flow_plot`
- `method_execution_started`
- `method_execution_finished`
- `method_execution_failed`
- `flow_created`
- `flow_started`
- `flow_finished`
- `flow_plot`
- `method_execution_started`
- `method_execution_finished`
- `method_execution_failed`
### Agent Events:
- `agent_execution_started`
- `agent_execution_completed`
- `agent_execution_error`
- `lite_agent_execution_started`
- `lite_agent_execution_completed`
- `lite_agent_execution_error`
- `agent_logs_started`
- `agent_logs_execution`
- `agent_evaluation_started`
- `agent_evaluation_completed`
- `agent_evaluation_failed`
- `agent_execution_started`
- `agent_execution_completed`
- `agent_execution_error`
- `lite_agent_execution_started`
- `lite_agent_execution_completed`
- `lite_agent_execution_error`
- `agent_logs_started`
- `agent_logs_execution`
- `agent_evaluation_started`
- `agent_evaluation_completed`
- `agent_evaluation_failed`
### Crew Events:
- `crew_kickoff_started`
- `crew_kickoff_completed`
- `crew_kickoff_failed`
- `crew_train_started`
- `crew_train_completed`
- `crew_train_failed`
- `crew_test_started`
- `crew_test_completed`
- `crew_test_failed`
- `crew_test_result`
- `crew_kickoff_started`
- `crew_kickoff_completed`
- `crew_kickoff_failed`
- `crew_train_started`
- `crew_train_completed`
- `crew_train_failed`
- `crew_test_started`
- `crew_test_completed`
- `crew_test_failed`
- `crew_test_result`
### Task Events:
- `task_started`
- `task_completed`
- `task_failed`
- `task_evaluation`
- `task_started`
- `task_completed`
- `task_failed`
- `task_evaluation`
### Tool Usage Events:
- `tool_usage_started`
- `tool_usage_finished`
- `tool_usage_error`
- `tool_validate_input_error`
- `tool_selection_error`
- `tool_execution_error`
- `tool_usage_started`
- `tool_usage_finished`
- `tool_usage_error`
- `tool_validate_input_error`
- `tool_selection_error`
- `tool_execution_error`
### LLM Events:
- `llm_call_started`
- `llm_call_completed`
- `llm_call_failed`
- `llm_stream_chunk`
- `llm_call_started`
- `llm_call_completed`
- `llm_call_failed`
- `llm_stream_chunk`
### LLM Guardrail Events:
- `llm_guardrail_started`
- `llm_guardrail_completed`
- `llm_guardrail_started`
- `llm_guardrail_completed`
### Memory Events:
- `memory_query_started`
- `memory_query_completed`
- `memory_query_failed`
- `memory_save_started`
- `memory_save_completed`
- `memory_save_failed`
- `memory_retrieval_started`
- `memory_retrieval_completed`
- `memory_query_started`
- `memory_query_completed`
- `memory_query_failed`
- `memory_save_started`
- `memory_save_completed`
- `memory_save_failed`
- `memory_retrieval_started`
- `memory_retrieval_completed`
### Knowledge Events:
- `knowledge_search_query_started`
- `knowledge_search_query_completed`
- `knowledge_search_query_failed`
- `knowledge_query_started`
- `knowledge_query_completed`
- `knowledge_query_failed`
- `knowledge_search_query_started`
- `knowledge_search_query_completed`
- `knowledge_search_query_failed`
- `knowledge_query_started`
- `knowledge_query_completed`
- `knowledge_query_failed`
### Reasoning Events:
- `agent_reasoning_started`
- `agent_reasoning_completed`
- `agent_reasoning_failed`
- `agent_reasoning_started`
- `agent_reasoning_completed`
- `agent_reasoning_failed`
Event names match the internal event bus. See GitHub for the full list of events.
You can emit your own custom events, and they will be delivered through the webhook stream alongside system events.
<CardGroup>
<Card
title="GitHub"
icon="github"
href="https://github.com/crewAIInc/crewAI/tree/main/src/crewai/utilities/events"
>
Full list of events
</Card>
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with webhook integration or
troubleshooting.
</Card>
<Card title="GitHub" icon="github" href="https://github.com/crewAIInc/crewAI/tree/main/src/crewai/utilities/events">
Full list of events
</Card>
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with webhook integration or troubleshooting.
</Card>
</CardGroup>

View File

@@ -1,11 +1,11 @@
---
title: "Triggers Overview"
description: "Understand how CrewAI AMP triggers work, how to manage them, and where to find integration-specific playbooks"
description: "Understand how CrewAI AOP triggers work, how to manage them, and where to find integration-specific playbooks"
icon: "face-smile"
mode: "wide"
---
CrewAI AMP triggers connect your automations to real-time events across the tools your teams already use. Instead of polling systems or relying on manual kickoffs, triggers listen for changes—new emails, calendar updates, CRM status changes—and immediately launch the crew or flow you specify.
CrewAI AOP triggers connect your automations to real-time events across the tools your teams already use. Instead of polling systems or relying on manual kickoffs, triggers listen for changes—new emails, calendar updates, CRM status changes—and immediately launch the crew or flow you specify.
<Frame>
![Automation Triggers Overview](/images/enterprise/crew_connectors.png)
@@ -20,61 +20,37 @@ Deep-dive guides walk through setup and sample workflows for each integration:
<a href="/en/enterprise/guides/gmail-trigger">Enable crews when emails arrive or threads update.</a>
</Card>
{" "}
<Card title="Google Calendar Trigger" icon="calendar-days">
<a href="/en/enterprise/guides/google-calendar-trigger">
React to calendar events as they are created, updated, or cancelled.
</a>
</Card>
<Card title="Google Calendar Trigger" icon="calendar-days">
<a href="/en/enterprise/guides/google-calendar-trigger">React to calendar events as they are created, updated, or cancelled.</a>
</Card>
{" "}
<Card title="Google Drive Trigger" icon="folder-open">
<a href="/en/enterprise/guides/google-drive-trigger">
Handle Drive file uploads, edits, and deletions.
</a>
</Card>
<Card title="Google Drive Trigger" icon="folder-open">
<a href="/en/enterprise/guides/google-drive-trigger">Handle Drive file uploads, edits, and deletions.</a>
</Card>
{" "}
<Card title="Outlook Trigger" icon="envelope-open">
<a href="/en/enterprise/guides/outlook-trigger">
Automate responses to new Outlook messages and calendar updates.
</a>
</Card>
<Card title="Outlook Trigger" icon="envelope-open">
<a href="/en/enterprise/guides/outlook-trigger">Automate responses to new Outlook messages and calendar updates.</a>
</Card>
{" "}
<Card title="OneDrive Trigger" icon="cloud">
<a href="/en/enterprise/guides/onedrive-trigger">
Audit file activity and sharing changes in OneDrive.
</a>
</Card>
<Card title="OneDrive Trigger" icon="cloud">
<a href="/en/enterprise/guides/onedrive-trigger">Audit file activity and sharing changes in OneDrive.</a>
</Card>
{" "}
<Card title="Microsoft Teams Trigger" icon="comments">
<a href="/en/enterprise/guides/microsoft-teams-trigger">
Kick off workflows when new Teams chats start.
</a>
</Card>
<Card title="Microsoft Teams Trigger" icon="comments">
<a href="/en/enterprise/guides/microsoft-teams-trigger">Kick off workflows when new Teams chats start.</a>
</Card>
{" "}
<Card title="HubSpot Trigger" icon="hubspot">
<a href="/en/enterprise/guides/hubspot-trigger">
Launch automations from HubSpot workflows and lifecycle events.
</a>
</Card>
<Card title="HubSpot Trigger" icon="hubspot">
<a href="/en/enterprise/guides/hubspot-trigger">Launch automations from HubSpot workflows and lifecycle events.</a>
</Card>
{" "}
<Card title="Salesforce Trigger" icon="salesforce">
<a href="/en/enterprise/guides/salesforce-trigger">
Connect Salesforce processes to CrewAI for CRM automation.
</a>
</Card>
<Card title="Salesforce Trigger" icon="salesforce">
<a href="/en/enterprise/guides/salesforce-trigger">Connect Salesforce processes to CrewAI for CRM automation.</a>
</Card>
{" "}
<Card title="Slack Trigger" icon="slack">
<a href="/en/enterprise/guides/slack-trigger">
Start crews directly from Slack slash commands.
</a>
</Card>
<Card title="Slack Trigger" icon="slack">
<a href="/en/enterprise/guides/slack-trigger">Start crews directly from Slack slash commands.</a>
</Card>
<Card title="Zapier Trigger" icon="bolt">
<a href="/en/enterprise/guides/zapier-trigger">Bridge CrewAI with thousands of Zapier-supported apps.</a>
@@ -100,10 +76,7 @@ To access and manage your automation triggers:
2. Click on the **Triggers** tab to view all available trigger integrations
<Frame caption="Example of available automation triggers for a Gmail deployment">
<img
src="/images/enterprise/list-available-triggers.png"
alt="List of available automation triggers"
/>
<img src="/images/enterprise/list-available-triggers.png" alt="List of available automation triggers" />
</Frame>
This view shows all the trigger integrations available for your deployment, along with their current connection status.
@@ -113,10 +86,7 @@ This view shows all the trigger integrations available for your deployment, alon
Each trigger can be easily enabled or disabled using the toggle switch:
<Frame caption="Enable or disable triggers with toggle">
<img
src="/images/enterprise/trigger-selected.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/trigger-selected.png" alt="Enable or disable triggers with toggle" />
</Frame>
- **Enabled (blue toggle)**: The trigger is active and will automatically execute your deployment when the specified events occur
@@ -129,10 +99,7 @@ Simply click the toggle to change the trigger state. Changes take effect immedia
Track the performance and history of your triggered executions:
<Frame caption="List of executions triggered by automation">
<img
src="/images/enterprise/list-executions.png"
alt="List of executions triggered by automation"
/>
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
</Frame>
## Building Trigger-Driven Automations
@@ -163,7 +130,6 @@ crewai triggers list
```
This command displays all triggers available based on your connected integrations, showing:
- Integration name and connection status
- Available trigger types
- Trigger names and descriptions
@@ -183,7 +149,6 @@ crewai triggers run microsoft_onedrive/file_changed
```
This command:
- Executes your crew locally
- Passes a complete, realistic trigger payload
- Simulates exactly how your crew will be called in production
@@ -196,6 +161,7 @@ This command:
- If your crew expects parameters that aren't in the trigger payload, execution may fail
</Warning>
### Triggers with Crew
Your existing crew definitions work seamlessly with triggers, you just need to have a task to parse the received payload:
@@ -227,12 +193,10 @@ class MyAutomatedCrew:
The crew will automatically receive and can access the trigger payload through the standard CrewAI context mechanisms.
<Note>
Crew and Flow inputs can include `crewai_trigger_payload`. CrewAI
automatically injects this payload: - Tasks: appended to the first task's
description by default ("Trigger Payload: {crewai_trigger_payload}") - Control
via `allow_crewai_trigger_context`: set `True` to always inject, `False` to
never inject - Flows: any `@start()` method that accepts a
`crewai_trigger_payload` parameter will receive it
Crew and Flow inputs can include `crewai_trigger_payload`. CrewAI automatically injects this payload:
- Tasks: appended to the first task's description by default ("Trigger Payload: {crewai_trigger_payload}")
- Control via `allow_crewai_trigger_context`: set `True` to always inject, `False` to never inject
- Flows: any `@start()` method that accepts a `crewai_trigger_payload` parameter will receive it
</Note>
### Integration with Flows
@@ -300,20 +264,17 @@ def delegate_to_crew(self, crewai_trigger_payload: dict = None):
## Troubleshooting
**Trigger not firing:**
- Verify the trigger is enabled in your deployment's Triggers tab
- Check integration connection status under Tools & Integrations
- Ensure all required environment variables are properly configured
**Execution failures:**
- Check the execution logs for error details
- Use `crewai triggers run <trigger_name>` to test locally and see the exact payload structure
- Verify your crew can handle the `crewai_trigger_payload` parameter
- Ensure your crew doesn't expect parameters that aren't included in the trigger payload
**Development issues:**
- Always test with `crewai triggers run <trigger>` before deploying to see the complete payload
- Remember that `crewai run` does NOT simulate trigger calls—use `crewai triggers run` instead
- Use `crewai triggers list` to verify which triggers are available for your connected integrations

View File

@@ -19,8 +19,8 @@ This guide walks you through connecting Azure OpenAI with Crew Studio for seamle
</Frame>
</Step>
<Step title="Configure CrewAI AMP Connection">
4. In another tab, open `CrewAI AMP > LLM Connections`. Name your LLM Connection, select Azure as the provider, and choose the same model you selected in Azure.
<Step title="Configure CrewAI AOP Connection">
4. In another tab, open `CrewAI AOP > LLM Connections`. Name your LLM Connection, select Azure as the provider, and choose the same model you selected in Azure.
5. On the same page, add environment variables from step 3:
- One named `AZURE_DEPLOYMENT_TARGET_URL` (using the Target URI). The URL should look like this: https://your-deployment.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-08-01-preview
- Another named `AZURE_API_KEY` (using the Key).
@@ -28,7 +28,7 @@ This guide walks you through connecting Azure OpenAI with Crew Studio for seamle
</Step>
<Step title="Set Default Configuration">
7. In `CrewAI AMP > Settings > Defaults > Crew Studio LLM Settings`, set the new LLM Connection and model as defaults.
7. In `CrewAI AOP > Settings > Defaults > Crew Studio LLM Settings`, set the new LLM Connection and model as defaults.
</Step>
<Step title="Configure Network Access">
@@ -37,7 +37,6 @@ This guide walks you through connecting Azure OpenAI with Crew Studio for seamle
- Navigate to `Resource Management > Networking`.
- Ensure that `Allow access from all networks` is enabled. If this setting is restricted, CrewAI may be blocked from accessing your Azure OpenAI endpoint.
</Step>
</Steps>
## Verification
@@ -47,7 +46,6 @@ You're all set! Crew Studio will now use your Azure OpenAI connection. Test the
## Troubleshooting
If you encounter issues:
- Verify the Target URI format matches the expected pattern
- Check that the API key is correct and has proper permissions
- Ensure network access is configured to allow CrewAI connections

View File

@@ -7,7 +7,7 @@ mode: "wide"
## Overview
[CrewAI AMP](https://app.crewai.com) streamlines the process of **creating**, **deploying**, and **managing** your AI agents in production environments.
[CrewAI AOP](https://app.crewai.com) streamlines the process of **creating**, **deploying**, and **managing** your AI agents in production environments.
## Getting Started
@@ -22,27 +22,21 @@ mode: "wide"
### Installation and Setup
<Card
title="Follow Standard Installation"
icon="wrench"
href="/en/installation"
>
Follow our standard installation guide to set up CrewAI CLI and create your
first project.
<Card title="Follow Standard Installation" icon="wrench" href="/en/installation">
Follow our standard installation guide to set up CrewAI CLI and create your first project.
</Card>
### Building Your Crew
<Card title="Quickstart Tutorial" icon="rocket" href="/en/quickstart">
Follow our quickstart guide to create your first agent crew using YAML
configuration.
Follow our quickstart guide to create your first agent crew using YAML configuration.
</Card>
## Support and Resources
For Enterprise-specific support or questions, contact our dedicated support team at [support@crewai.com](mailto:support@crewai.com).
<Card title="Schedule a Demo" icon="calendar" href="mailto:support@crewai.com">
Book time with our team to learn more about Enterprise features and how they
can benefit your organization.
Book time with our team to learn more about Enterprise features and how they can benefit your organization.
</Card>

View File

@@ -1,11 +1,11 @@
---
title: "Open Telemetry Logs"
description: "Understand how to capture telemetry logs from your CrewAI AMP deployments"
description: "Understand how to capture telemetry logs from your CrewAI AOP deployments"
icon: "magnifying-glass-chart"
mode: "wide"
---
CrewAI AMP provides a powerful way to capture telemetry logs from your deployments. This allows you to monitor the performance of your agents and workflows, and to debug issues that may arise.
CrewAI AOP provides a powerful way to capture telemetry logs from your deployments. This allows you to monitor the performance of your agents and workflows, and to debug issues that may arise.
## Prerequisites
@@ -14,17 +14,22 @@ CrewAI AMP provides a powerful way to capture telemetry logs from your deploymen
Your organization should have ENTERPRISE OTEL SETUP enabled
</Card>
<Card title="OTEL collector setup" icon="server">
Your organization should have an OTEL collector setup or a provider like
Datadog log intake setup
Your organization should have an OTEL collector setup or a provider like Datadog log intake setup
</Card>
</CardGroup>
## How to capture telemetry logs
1. Go to settings/organization tab
2. Configure your OTEL collector setup
3. Save
Example to setup OTEL log collection capture to Datadog.
<Frame>![Capture Telemetry Logs](/images/crewai-otel-export.png)</Frame>
<Frame>
![Capture Telemetry Logs](/images/crewai-otel-export.png)
</Frame>

View File

@@ -0,0 +1,291 @@
---
title: "Deploy Crew"
description: "Deploying a Crew on CrewAI AOP"
icon: "rocket"
mode: "wide"
---
<Note>
After creating a crew locally or through Crew Studio, the next step is deploying it to the CrewAI AOP platform. This guide covers multiple deployment methods to help you choose the best approach for your workflow.
</Note>
## Prerequisites
<CardGroup cols={2}>
<Card title="Crew Ready for Deployment" icon="users">
You should have a working crew either built locally or created through Crew Studio
</Card>
<Card title="GitHub Repository" icon="github">
Your crew code should be in a GitHub repository (for GitHub integration method)
</Card>
</CardGroup>
## Option 1: Deploy Using CrewAI CLI
The CLI provides the fastest way to deploy locally developed crews to the Enterprise platform.
<Steps>
<Step title="Install CrewAI CLI">
If you haven't already, install the CrewAI CLI:
```bash
pip install crewai[tools]
```
<Tip>
The CLI comes with the main CrewAI package, but the `[tools]` extra ensures you have all deployment dependencies.
</Tip>
</Step>
<Step title="Authenticate with the Enterprise Platform">
First, you need to authenticate your CLI with the CrewAI AOP platform:
```bash
# If you already have a CrewAI AOP account, or want to create one:
crewai login
```
When you run either command, the CLI will:
1. Display a URL and a unique device code
2. Open your browser to the authentication page
3. Prompt you to confirm the device
4. Complete the authentication process
Upon successful authentication, you'll see a confirmation message in your terminal!
</Step>
<Step title="Create a Deployment">
From your project directory, run:
```bash
crewai deploy create
```
This command will:
1. Detect your GitHub repository information
2. Identify environment variables in your local `.env` file
3. Securely transfer these variables to the Enterprise platform
4. Create a new deployment with a unique identifier
On successful creation, you'll see a message like:
```shell
Deployment created successfully!
Name: your_project_name
Deployment ID: 01234567-89ab-cdef-0123-456789abcdef
Current Status: Deploy Enqueued
```
</Step>
<Step title="Monitor Deployment Progress">
Track the deployment status with:
```bash
crewai deploy status
```
For detailed logs of the build process:
```bash
crewai deploy logs
```
<Tip>
The first deployment typically takes 10-15 minutes as it builds the container images. Subsequent deployments are much faster.
</Tip>
</Step>
</Steps>
## Additional CLI Commands
The CrewAI CLI offers several commands to manage your deployments:
```bash
# List all your deployments
crewai deploy list
# Get the status of your deployment
crewai deploy status
# View the logs of your deployment
crewai deploy logs
# Push updates after code changes
crewai deploy push
# Remove a deployment
crewai deploy remove <deployment_id>
```
## Option 2: Deploy Directly via Web Interface
You can also deploy your crews directly through the CrewAI AOP web interface by connecting your GitHub account. This approach doesn't require using the CLI on your local machine.
<Steps>
<Step title="Pushing to GitHub">
You need to push your crew to a GitHub repository. If you haven't created a crew yet, you can [follow this tutorial](/en/quickstart).
</Step>
<Step title="Connecting GitHub to CrewAI AOP">
1. Log in to [CrewAI AOP](https://app.crewai.com)
2. Click on the button "Connect GitHub"
<Frame>
![Connect GitHub Button](/images/enterprise/connect-github.png)
</Frame>
</Step>
<Step title="Select the Repository">
After connecting your GitHub account, you'll be able to select which repository to deploy:
<Frame>
![Select Repository](/images/enterprise/select-repo.png)
</Frame>
</Step>
<Step title="Set Environment Variables">
Before deploying, you'll need to set up your environment variables to connect to your LLM provider or other services:
1. You can add variables individually or in bulk
2. Enter your environment variables in `KEY=VALUE` format (one per line)
<Frame>
![Set Environment Variables](/images/enterprise/set-env-variables.png)
</Frame>
</Step>
<Step title="Deploy Your Crew">
1. Click the "Deploy" button to start the deployment process
2. You can monitor the progress through the progress bar
3. The first deployment typically takes around 10-15 minutes; subsequent deployments will be faster
<Frame>
![Deploy Progress](/images/enterprise/deploy-progress.png)
</Frame>
Once deployment is complete, you'll see:
- Your crew's unique URL
- A Bearer token to protect your crew API
- A "Delete" button if you need to remove the deployment
</Step>
</Steps>
## ⚠️ Environment Variable Security Requirements
<Warning>
**Important**: CrewAI AOP has security restrictions on environment variable names that can cause deployment failures if not followed.
</Warning>
### Blocked Environment Variable Patterns
For security reasons, the following environment variable naming patterns are **automatically filtered** and will cause deployment issues:
**Blocked Patterns:**
- Variables ending with `_TOKEN` (e.g., `MY_API_TOKEN`)
- Variables ending with `_PASSWORD` (e.g., `DB_PASSWORD`)
- Variables ending with `_SECRET` (e.g., `API_SECRET`)
- Variables ending with `_KEY` in certain contexts
**Specific Blocked Variables:**
- `GITHUB_USER`, `GITHUB_TOKEN`
- `AWS_REGION`, `AWS_DEFAULT_REGION`
- Various internal CrewAI system variables
### Allowed Exceptions
Some variables are explicitly allowed despite matching blocked patterns:
- `AZURE_AD_TOKEN`
- `AZURE_OPENAI_AD_TOKEN`
- `ENTERPRISE_ACTION_TOKEN`
- `CREWAI_ENTEPRISE_TOOLS_TOKEN`
### How to Fix Naming Issues
If your deployment fails due to environment variable restrictions:
```bash
# ❌ These will cause deployment failures
OPENAI_TOKEN=sk-...
DATABASE_PASSWORD=mypassword
API_SECRET=secret123
# ✅ Use these naming patterns instead
OPENAI_API_KEY=sk-...
DATABASE_CREDENTIALS=mypassword
API_CONFIG=secret123
```
### Best Practices
1. **Use standard naming conventions**: `PROVIDER_API_KEY` instead of `PROVIDER_TOKEN`
2. **Test locally first**: Ensure your crew works with the renamed variables
3. **Update your code**: Change any references to the old variable names
4. **Document changes**: Keep track of renamed variables for your team
<Tip>
If you encounter deployment failures with cryptic environment variable errors, check your variable names against these patterns first.
</Tip>
### Interact with Your Deployed Crew
Once deployment is complete, you can access your crew through:
1. **REST API**: The platform generates a unique HTTPS endpoint with these key routes:
- `/inputs`: Lists the required input parameters
- `/kickoff`: Initiates an execution with provided inputs
- `/status/{kickoff_id}`: Checks the execution status
2. **Web Interface**: Visit [app.crewai.com](https://app.crewai.com) to access:
- **Status tab**: View deployment information, API endpoint details, and authentication token
- **Run tab**: Visual representation of your crew's structure
- **Executions tab**: History of all executions
- **Metrics tab**: Performance analytics
- **Traces tab**: Detailed execution insights
### Trigger an Execution
From the Enterprise dashboard, you can:
1. Click on your crew's name to open its details
2. Select "Trigger Crew" from the management interface
3. Enter the required inputs in the modal that appears
4. Monitor progress as the execution moves through the pipeline
### Monitoring and Analytics
The Enterprise platform provides comprehensive observability features:
- **Execution Management**: Track active and completed runs
- **Traces**: Detailed breakdowns of each execution
- **Metrics**: Token usage, execution times, and costs
- **Timeline View**: Visual representation of task sequences
### Advanced Features
The Enterprise platform also offers:
- **Environment Variables Management**: Securely store and manage API keys
- **LLM Connections**: Configure integrations with various LLM providers
- **Custom Tools Repository**: Create, share, and install tools
- **Crew Studio**: Build crews through a chat interface without writing code
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with deployment issues or questions about the Enterprise platform.
</Card>

View File

@@ -1,440 +0,0 @@
---
title: "Deploy to AMP"
description: "Deploy your Crew or Flow to CrewAI AMP"
icon: "rocket"
mode: "wide"
---
<Note>
After creating a Crew or Flow locally (or through Crew Studio), the next step is
deploying it to the CrewAI AMP platform. This guide covers multiple deployment
methods to help you choose the best approach for your workflow.
</Note>
## Prerequisites
<CardGroup cols={2}>
<Card title="Project Ready for Deployment" icon="check-circle">
You should have a working Crew or Flow that runs successfully locally.
Follow our [preparation guide](/en/enterprise/guides/prepare-for-deployment) to verify your project structure.
</Card>
<Card title="GitHub Repository" icon="github">
Your code should be in a GitHub repository (for GitHub integration
method)
</Card>
</CardGroup>
<Info>
**Crews vs Flows**: Both project types can be deployed as "automations" on CrewAI AMP.
The deployment process is the same, but they have different project structures.
See [Prepare for Deployment](/en/enterprise/guides/prepare-for-deployment) for details.
</Info>
## Option 1: Deploy Using CrewAI CLI
The CLI provides the fastest way to deploy locally developed Crews or Flows to the AMP platform.
The CLI automatically detects your project type from `pyproject.toml` and builds accordingly.
<Steps>
<Step title="Install CrewAI CLI">
If you haven't already, install the CrewAI CLI:
```bash
pip install crewai[tools]
```
<Tip>
The CLI comes with the main CrewAI package, but the `[tools]` extra ensures you have all deployment dependencies.
</Tip>
</Step>
<Step title="Authenticate with the Enterprise Platform">
First, you need to authenticate your CLI with the CrewAI AMP platform:
```bash
# If you already have a CrewAI AMP account, or want to create one:
crewai login
```
When you run either command, the CLI will:
1. Display a URL and a unique device code
2. Open your browser to the authentication page
3. Prompt you to confirm the device
4. Complete the authentication process
Upon successful authentication, you'll see a confirmation message in your terminal!
</Step>
<Step title="Create a Deployment">
From your project directory, run:
```bash
crewai deploy create
```
This command will:
1. Detect your GitHub repository information
2. Identify environment variables in your local `.env` file
3. Securely transfer these variables to the Enterprise platform
4. Create a new deployment with a unique identifier
On successful creation, you'll see a message like:
```shell
Deployment created successfully!
Name: your_project_name
Deployment ID: 01234567-89ab-cdef-0123-456789abcdef
Current Status: Deploy Enqueued
```
</Step>
<Step title="Monitor Deployment Progress">
Track the deployment status with:
```bash
crewai deploy status
```
For detailed logs of the build process:
```bash
crewai deploy logs
```
<Tip>
The first deployment typically takes 10-15 minutes as it builds the container images. Subsequent deployments are much faster.
</Tip>
</Step>
</Steps>
## Additional CLI Commands
The CrewAI CLI offers several commands to manage your deployments:
```bash
# List all your deployments
crewai deploy list
# Get the status of your deployment
crewai deploy status
# View the logs of your deployment
crewai deploy logs
# Push updates after code changes
crewai deploy push
# Remove a deployment
crewai deploy remove <deployment_id>
```
## Option 2: Deploy Directly via Web Interface
You can also deploy your Crews or Flows directly through the CrewAI AMP web interface by connecting your GitHub account. This approach doesn't require using the CLI on your local machine. The platform automatically detects your project type and handles the build appropriately.
<Steps>
<Step title="Pushing to GitHub">
You need to push your crew to a GitHub repository. If you haven't created a crew yet, you can [follow this tutorial](/en/quickstart).
</Step>
<Step title="Connecting GitHub to CrewAI AMP">
1. Log in to [CrewAI AMP](https://app.crewai.com)
2. Click on the button "Connect GitHub"
<Frame>
![Connect GitHub Button](/images/enterprise/connect-github.png)
</Frame>
</Step>
<Step title="Select the Repository">
After connecting your GitHub account, you'll be able to select which repository to deploy:
<Frame>
![Select Repository](/images/enterprise/select-repo.png)
</Frame>
</Step>
<Step title="Set Environment Variables">
Before deploying, you'll need to set up your environment variables to connect to your LLM provider or other services:
1. You can add variables individually or in bulk
2. Enter your environment variables in `KEY=VALUE` format (one per line)
<Frame>
![Set Environment Variables](/images/enterprise/set-env-variables.png)
</Frame>
</Step>
<Step title="Deploy Your Crew">
1. Click the "Deploy" button to start the deployment process
2. You can monitor the progress through the progress bar
3. The first deployment typically takes around 10-15 minutes; subsequent deployments will be faster
<Frame>
![Deploy Progress](/images/enterprise/deploy-progress.png)
</Frame>
Once deployment is complete, you'll see:
- Your crew's unique URL
- A Bearer token to protect your crew API
- A "Delete" button if you need to remove the deployment
</Step>
</Steps>
## Option 3: Redeploy Using API (CI/CD Integration)
For automated deployments in CI/CD pipelines, you can use the CrewAI API to trigger redeployments of existing crews. This is particularly useful for GitHub Actions, Jenkins, or other automation workflows.
<Steps>
<Step title="Get Your Personal Access Token">
Navigate to your CrewAI AMP account settings to generate an API token:
1. Go to [app.crewai.com](https://app.crewai.com)
2. Click on **Settings** → **Account** → **Personal Access Token**
3. Generate a new token and copy it securely
4. Store this token as a secret in your CI/CD system
</Step>
<Step title="Find Your Automation UUID">
Locate the unique identifier for your deployed crew:
1. Go to **Automations** in your CrewAI AMP dashboard
2. Select your existing automation/crew
3. Click on **Additional Details**
4. Copy the **UUID** - this identifies your specific crew deployment
</Step>
<Step title="Trigger Redeployment via API">
Use the Deploy API endpoint to trigger a redeployment:
```bash
curl -i -X POST \
-H "Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN" \
https://app.crewai.com/crewai_plus/api/v1/crews/YOUR-AUTOMATION-UUID/deploy
# HTTP/2 200
# content-type: application/json
#
# {
# "uuid": "your-automation-uuid",
# "status": "Deploy Enqueued",
# "public_url": "https://your-crew-deployment.crewai.com",
# "token": "your-bearer-token"
# }
```
<Info>
If your automation was first created connected to Git, the API will automatically pull the latest changes from your repository before redeploying.
</Info>
</Step>
<Step title="GitHub Actions Integration Example">
Here's a GitHub Actions workflow with more complex deployment triggers:
```yaml
name: Deploy CrewAI Automation
on:
push:
branches: [ main ]
pull_request:
types: [ labeled ]
release:
types: [ published ]
jobs:
deploy:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy')) ||
(github.event_name == 'release')
steps:
- name: Trigger CrewAI Redeployment
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.CREWAI_PAT }}" \
https://app.crewai.com/crewai_plus/api/v1/crews/${{ secrets.CREWAI_AUTOMATION_UUID }}/deploy
```
<Tip>
Add `CREWAI_PAT` and `CREWAI_AUTOMATION_UUID` as repository secrets. For PR deployments, add a "deploy" label to trigger the workflow.
</Tip>
</Step>
</Steps>
## Interact with Your Deployed Automation
Once deployment is complete, you can access your crew through:
1. **REST API**: The platform generates a unique HTTPS endpoint with these key routes:
- `/inputs`: Lists the required input parameters
- `/kickoff`: Initiates an execution with provided inputs
- `/status/{kickoff_id}`: Checks the execution status
2. **Web Interface**: Visit [app.crewai.com](https://app.crewai.com) to access:
- **Status tab**: View deployment information, API endpoint details, and authentication token
- **Run tab**: Visual representation of your crew's structure
- **Executions tab**: History of all executions
- **Metrics tab**: Performance analytics
- **Traces tab**: Detailed execution insights
### Trigger an Execution
From the Enterprise dashboard, you can:
1. Click on your crew's name to open its details
2. Select "Trigger Crew" from the management interface
3. Enter the required inputs in the modal that appears
4. Monitor progress as the execution moves through the pipeline
### Monitoring and Analytics
The Enterprise platform provides comprehensive observability features:
- **Execution Management**: Track active and completed runs
- **Traces**: Detailed breakdowns of each execution
- **Metrics**: Token usage, execution times, and costs
- **Timeline View**: Visual representation of task sequences
### Advanced Features
The Enterprise platform also offers:
- **Environment Variables Management**: Securely store and manage API keys
- **LLM Connections**: Configure integrations with various LLM providers
- **Custom Tools Repository**: Create, share, and install tools
- **Crew Studio**: Build crews through a chat interface without writing code
## Troubleshooting Deployment Failures
If your deployment fails, check these common issues:
### Build Failures
#### Missing uv.lock File
**Symptom**: Build fails early with dependency resolution errors
**Solution**: Generate and commit the lock file:
```bash
uv lock
git add uv.lock
git commit -m "Add uv.lock for deployment"
git push
```
<Warning>
The `uv.lock` file is required for all deployments. Without it, the platform
cannot reliably install your dependencies.
</Warning>
#### Wrong Project Structure
**Symptom**: "Could not find entry point" or "Module not found" errors
**Solution**: Verify your project matches the expected structure:
- **Both Crews and Flows**: Must have entry point at `src/project_name/main.py`
- **Crews**: Use a `run()` function as entry point
- **Flows**: Use a `kickoff()` function as entry point
See [Prepare for Deployment](/en/enterprise/guides/prepare-for-deployment) for detailed structure diagrams.
#### Missing CrewBase Decorator
**Symptom**: "Crew not found", "Config not found", or agent/task configuration errors
**Solution**: Ensure **all** crew classes use the `@CrewBase` decorator:
```python
from crewai.project import CrewBase, agent, crew, task
@CrewBase # This decorator is REQUIRED
class YourCrew():
"""Your crew description"""
@agent
def my_agent(self) -> Agent:
return Agent(
config=self.agents_config['my_agent'], # type: ignore[index]
verbose=True
)
# ... rest of crew definition
```
<Info>
This applies to standalone Crews AND crews embedded inside Flow projects.
Every crew class needs the decorator.
</Info>
#### Incorrect pyproject.toml Type
**Symptom**: Build succeeds but runtime fails, or unexpected behavior
**Solution**: Verify the `[tool.crewai]` section matches your project type:
```toml
# For Crew projects:
[tool.crewai]
type = "crew"
# For Flow projects:
[tool.crewai]
type = "flow"
```
### Runtime Failures
#### LLM Connection Failures
**Symptom**: API key errors, "model not found", or authentication failures
**Solution**:
1. Verify your LLM provider's API key is correctly set in environment variables
2. Ensure the environment variable names match what your code expects
3. Test locally with the exact same environment variables before deploying
#### Crew Execution Errors
**Symptom**: Crew starts but fails during execution
**Solution**:
1. Check the execution logs in the AMP dashboard (Traces tab)
2. Verify all tools have required API keys configured
3. Ensure agent configurations in `agents.yaml` are valid
4. Check task configurations in `tasks.yaml` for syntax errors
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with deployment issues or questions
about the AMP platform.
</Card>

View File

@@ -1,13 +1,12 @@
---
title: "Enable Crew Studio"
description: "Enabling Crew Studio on CrewAI AMP"
description: "Enabling Crew Studio on CrewAI AOP"
icon: "comments"
mode: "wide"
---
<Tip>
Crew Studio is a powerful **no-code/low-code** tool that allows you to quickly
scaffold or build Crews through a conversational interface.
Crew Studio is a powerful **no-code/low-code** tool that allows you to quickly scaffold or build Crews through a conversational interface.
</Tip>
## What is Crew Studio?
@@ -25,7 +24,7 @@ With Crew Studio, you can:
- Select appropriate tools
- Configure necessary inputs
- Generate downloadable code for customization
- Deploy directly to the CrewAI AMP platform
- Deploy directly to the CrewAI AOP platform
## Configuration Steps
@@ -33,7 +32,7 @@ Before you can start using Crew Studio, you need to configure your LLM connectio
<Steps>
<Step title="Set Up LLM Connection">
Go to the **LLM Connections** tab in your CrewAI AMP dashboard and create a new LLM connection.
Go to the **LLM Connections** tab in your CrewAI AOP dashboard and create a new LLM connection.
<Note>
Feel free to use any LLM provider you want that is supported by CrewAI.
@@ -53,7 +52,6 @@ Before you can start using Crew Studio, you need to configure your LLM connectio
<Frame>
![LLM Connection Configuration](/images/enterprise/llm-connection-config.png)
</Frame>
</Step>
<Step title="Verify Connection Added">
@@ -62,7 +60,6 @@ Before you can start using Crew Studio, you need to configure your LLM connectio
<Frame>
![Connection Added](/images/enterprise/connection-added.png)
</Frame>
</Step>
<Step title="Configure LLM Defaults">
@@ -76,7 +73,6 @@ Before you can start using Crew Studio, you need to configure your LLM connectio
<Frame>
![LLM Defaults Configuration](/images/enterprise/llm-defaults.png)
</Frame>
</Step>
</Steps>
@@ -86,7 +82,7 @@ Now that you've configured your LLM connection and default settings, you're read
<Steps>
<Step title="Access Studio">
Navigate to the **Studio** section in your CrewAI AMP dashboard.
Navigate to the **Studio** section in your CrewAI AOP dashboard.
</Step>
<Step title="Start a Conversation">
@@ -97,7 +93,6 @@ Now that you've configured your LLM connection and default settings, you're read
```
The Crew Assistant will ask clarifying questions to better understand your requirements.
</Step>
<Step title="Review Generated Crew">
@@ -109,16 +104,14 @@ Now that you've configured your LLM connection and default settings, you're read
- Tools to be used
This is your opportunity to refine the configuration before proceeding.
</Step>
<Step title="Deploy or Download">
Once you're satisfied with the configuration, you can:
- Download the generated code for local customization
- Deploy the crew directly to the CrewAI AMP platform
- Deploy the crew directly to the CrewAI AOP platform
- Modify the configuration and regenerate the crew
</Step>
<Step title="Test Your Crew">
@@ -127,9 +120,7 @@ Now that you've configured your LLM connection and default settings, you're read
</Steps>
<Tip>
For best results, provide clear, detailed descriptions of what you want your
crew to accomplish. Include specific inputs and expected outputs in your
description.
For best results, provide clear, detailed descriptions of what you want your crew to accomplish. Include specific inputs and expected outputs in your description.
</Tip>
## Example Workflow
@@ -143,14 +134,11 @@ Here's a typical workflow for creating a crew with Crew Studio:
```md
I need a crew that can analyze financial news and provide investment recommendations
```
</Step>
{" "}
<Step title="Answer Questions">
Respond to clarifying questions from the Crew Assistant to refine your
requirements.
</Step>
<Step title="Answer Questions">
Respond to clarifying questions from the Crew Assistant to refine your requirements.
</Step>
<Step title="Review the Plan">
Review the generated crew plan, which might include:
@@ -158,18 +146,15 @@ Here's a typical workflow for creating a crew with Crew Studio:
- A Research Agent to gather financial news
- An Analysis Agent to interpret the data
- A Recommendations Agent to provide investment advice
</Step>
{" "}
<Step title="Approve or Modify">
Approve the plan or request changes if necessary.
</Step>
<Step title="Approve or Modify">
Approve the plan or request changes if necessary.
</Step>
{" "}
<Step title="Download or Deploy">
Download the code for customization or deploy directly to the platform.
</Step>
<Step title="Download or Deploy">
Download the code for customization or deploy directly to the platform.
</Step>
<Step title="Test and Refine">
Test your crew with sample inputs and refine as needed.
@@ -177,6 +162,5 @@ Here's a typical workflow for creating a crew with Crew Studio:
</Steps>
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with Crew Studio or any other CrewAI
AMP features.
Contact our support team for assistance with Crew Studio or any other CrewAI AOP features.
</Card>

View File

@@ -10,21 +10,17 @@ mode: "wide"
Use the Gmail Trigger to kick off your deployed crews when Gmail events happen in connected accounts, such as receiving a new email or messages matching a label/filter.
<Tip>
Make sure Gmail is connected in Tools & Integrations and the trigger is
enabled for your deployment.
Make sure Gmail is connected in Tools & Integrations and the trigger is enabled for your deployment.
</Tip>
## Enabling the Gmail Trigger
1. Open your deployment in CrewAI AMP
1. Open your deployment in CrewAI AOP
2. Go to the **Triggers** tab
3. Locate **Gmail** and switch the toggle to enable
<Frame>
<img
src="/images/enterprise/trigger-selected.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/trigger-selected.png" alt="Enable or disable triggers with toggle" />
</Frame>
## Example: Process new emails
@@ -66,15 +62,13 @@ Test your Gmail trigger integration locally using the CrewAI CLI:
crewai triggers list
# Simulate a Gmail trigger with realistic payload
crewai triggers run gmail/new_email_received
crewai triggers run gmail/new_email
```
The `crewai triggers run` command will execute your crew with a complete Gmail payload, allowing you to test your parsing logic before deployment.
<Warning>
Use `crewai triggers run gmail/new_email_received` (not `crewai run`) to
simulate trigger execution during development. After deployment, your crew
will automatically receive the trigger payload.
Use `crewai triggers run gmail/new_email` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
</Warning>
## Monitoring Executions
@@ -82,16 +76,13 @@ The `crewai triggers run` command will execute your crew with a complete Gmail p
Track history and performance of triggered runs:
<Frame>
<img
src="/images/enterprise/list-executions.png"
alt="List of executions triggered by automation"
/>
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
</Frame>
## Troubleshooting
- Ensure Gmail is connected in Tools & Integrations
- Verify the Gmail Trigger is enabled on the Triggers tab
- Test locally with `crewai triggers run gmail/new_email_received` to see the exact payload structure
- Test locally with `crewai triggers run gmail/new_email` to see the exact payload structure
- Check the execution logs and confirm the payload is passed as `crewai_trigger_payload`
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution

View File

@@ -10,21 +10,17 @@ mode: "wide"
Use the Google Calendar trigger to launch automations whenever calendar events change. Common use cases include briefing a team before a meeting, notifying stakeholders when a critical event is cancelled, or summarizing daily schedules.
<Tip>
Make sure Google Calendar is connected in **Tools & Integrations** and enabled
for the deployment you want to automate.
Make sure Google Calendar is connected in **Tools & Integrations** and enabled for the deployment you want to automate.
</Tip>
## Enabling the Google Calendar Trigger
1. Open your deployment in CrewAI AMP
1. Open your deployment in CrewAI AOP
2. Go to the **Triggers** tab
3. Locate **Google Calendar** and switch the toggle to enable
<Frame>
<img
src="/images/enterprise/calendar-trigger.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/calendar-trigger.png" alt="Enable or disable triggers with toggle" />
</Frame>
## Example: Summarize meeting details
@@ -58,9 +54,7 @@ crewai triggers run google_calendar/event_changed
The `crewai triggers run` command will execute your crew with a complete Calendar payload, allowing you to test your parsing logic before deployment.
<Warning>
Use `crewai triggers run google_calendar/event_changed` (not `crewai run`) to
simulate trigger execution during development. After deployment, your crew
will automatically receive the trigger payload.
Use `crewai triggers run google_calendar/event_changed` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
</Warning>
## Monitoring Executions
@@ -68,10 +62,7 @@ The `crewai triggers run` command will execute your crew with a complete Calenda
The **Executions** list in the deployment dashboard tracks every triggered run and surfaces payload metadata, output summaries, and errors.
<Frame>
<img
src="/images/enterprise/list-executions.png"
alt="List of executions triggered by automation"
/>
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
</Frame>
## Troubleshooting

View File

@@ -10,21 +10,17 @@ mode: "wide"
Trigger your automations when files are created, updated, or removed in Google Drive. Typical workflows include summarizing newly uploaded content, enforcing sharing policies, or notifying owners when critical files change.
<Tip>
Connect Google Drive in **Tools & Integrations** and confirm the trigger is
enabled for the automation you want to monitor.
Connect Google Drive in **Tools & Integrations** and confirm the trigger is enabled for the automation you want to monitor.
</Tip>
## Enabling the Google Drive Trigger
1. Open your deployment in CrewAI AMP
1. Open your deployment in CrewAI AOP
2. Go to the **Triggers** tab
3. Locate **Google Drive** and switch the toggle to enable
<Frame>
<img
src="/images/enterprise/gdrive-trigger.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/gdrive-trigger.png" alt="Enable or disable triggers with toggle" />
</Frame>
## Example: Summarize file activity
@@ -55,9 +51,7 @@ crewai triggers run google_drive/file_changed
The `crewai triggers run` command will execute your crew with a complete Drive payload, allowing you to test your parsing logic before deployment.
<Warning>
Use `crewai triggers run google_drive/file_changed` (not `crewai run`) to
simulate trigger execution during development. After deployment, your crew
will automatically receive the trigger payload.
Use `crewai triggers run google_drive/file_changed` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
</Warning>
## Monitoring Executions
@@ -65,10 +59,7 @@ The `crewai triggers run` command will execute your crew with a complete Drive p
Track history and performance of triggered runs with the **Executions** list in the deployment dashboard.
<Frame>
<img
src="/images/enterprise/list-executions.png"
alt="List of executions triggered by automation"
/>
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
</Frame>
## Troubleshooting

View File

@@ -5,57 +5,48 @@ icon: "hubspot"
mode: "wide"
---
This guide provides a step-by-step process to set up HubSpot triggers for CrewAI AMP, enabling you to initiate crews directly from HubSpot Workflows.
This guide provides a step-by-step process to set up HubSpot triggers for CrewAI AOP, enabling you to initiate crews directly from HubSpot Workflows.
## Prerequisites
- A CrewAI AMP account
- A CrewAI AOP account
- A HubSpot account with the [HubSpot Workflows](https://knowledge.hubspot.com/workflows/create-workflows) feature
## Setup Steps
<Steps>
<Step title="Connect your HubSpot account with CrewAI AMP">
- Log in to your `CrewAI AMP account > Triggers` - Select `HubSpot` from the
list of available triggers - Choose the HubSpot account you want to connect
with CrewAI AMP - Follow the on-screen prompts to authorize CrewAI AMP
access to your HubSpot account - A confirmation message will appear once
HubSpot is successfully connected with CrewAI AMP
</Step>
<Step title="Create a HubSpot Workflow">
- Log in to your `HubSpot account > Automations > Workflows > New workflow`
- Select the workflow type that fits your needs (e.g., Start from scratch) -
In the workflow builder, click the Plus (+) icon to add a new action. -
Choose `Integrated apps > CrewAI > Kickoff a Crew`. - Select the Crew you
want to initiate. - Click `Save` to add the action to your workflow
<Frame>
<img
src="/images/enterprise/hubspot-workflow-1.png"
alt="HubSpot Workflow 1"
/>
</Frame>
</Step>
<Step title="Use Crew results with other actions">
- After the Kickoff a Crew step, click the Plus (+) icon to add a new
action. - For example, to send an internal email notification, choose
`Communications > Send internal email notification` - In the Body field,
click `Insert data`, select `View properties or action outputs from > Action
outputs > Crew Result` to include Crew data in the email
<Frame>
<img
src="/images/enterprise/hubspot-workflow-2.png"
alt="HubSpot Workflow 2"
/>
</Frame>
- Configure any additional actions as needed - Review your workflow
steps to ensure everything is set up correctly - Activate the workflow
<Frame>
<img
src="/images/enterprise/hubspot-workflow-3.png"
alt="HubSpot Workflow 3"
/>
</Frame>
</Step>
<Step title="Connect your HubSpot account with CrewAI AOP">
- Log in to your `CrewAI AOP account > Triggers`
- Select `HubSpot` from the list of available triggers
- Choose the HubSpot account you want to connect with CrewAI AOP
- Follow the on-screen prompts to authorize CrewAI AOP access to your HubSpot account
- A confirmation message will appear once HubSpot is successfully connected with CrewAI AOP
</Step>
<Step title="Create a HubSpot Workflow">
- Log in to your `HubSpot account > Automations > Workflows > New workflow`
- Select the workflow type that fits your needs (e.g., Start from scratch)
- In the workflow builder, click the Plus (+) icon to add a new action.
- Choose `Integrated apps > CrewAI > Kickoff a Crew`.
- Select the Crew you want to initiate.
- Click `Save` to add the action to your workflow
<Frame>
<img src="/images/enterprise/hubspot-workflow-1.png" alt="HubSpot Workflow 1" />
</Frame>
</Step>
<Step title="Use Crew results with other actions">
- After the Kickoff a Crew step, click the Plus (+) icon to add a new action.
- For example, to send an internal email notification, choose `Communications > Send internal email notification`
- In the Body field, click `Insert data`, select `View properties or action outputs from > Action outputs > Crew Result` to include Crew data in the email
<Frame>
<img src="/images/enterprise/hubspot-workflow-2.png" alt="HubSpot Workflow 2" />
</Frame>
- Configure any additional actions as needed
- Review your workflow steps to ensure everything is set up correctly
- Activate the workflow
<Frame>
<img src="/images/enterprise/hubspot-workflow-3.png" alt="HubSpot Workflow 3" />
</Frame>
</Step>
</Steps>
For more detailed information on available actions and customization options, refer to the [HubSpot Workflows Documentation](https://knowledge.hubspot.com/workflows/create-workflows).

View File

@@ -5,54 +5,9 @@ icon: "user-check"
mode: "wide"
---
Human-In-The-Loop (HITL) is a powerful approach that combines artificial intelligence with human expertise to enhance decision-making and improve task outcomes. This guide shows you how to implement HITL within CrewAI Enterprise.
Human-In-The-Loop (HITL) is a powerful approach that combines artificial intelligence with human expertise to enhance decision-making and improve task outcomes. This guide shows you how to implement HITL within CrewAI.
## HITL Approaches in CrewAI
CrewAI offers two approaches for implementing human-in-the-loop workflows:
| Approach | Best For | Version |
|----------|----------|---------|
| **Flow-based** (`@human_feedback` decorator) | Production with Enterprise UI, email-first workflows, full platform features | **1.8.0+** |
| **Webhook-based** | Custom integrations, external systems (Slack, Teams, etc.), legacy setups | All versions |
## Flow-Based HITL with Enterprise Platform
<Note>
The `@human_feedback` decorator requires **CrewAI version 1.8.0 or higher**.
</Note>
When using the `@human_feedback` decorator in your Flows, CrewAI Enterprise provides an **email-first HITL system** that enables anyone with an email address to respond to review requests:
<CardGroup cols={2}>
<Card title="Email-First Design" icon="envelope">
Responders receive email notifications and can reply directly—no login required.
</Card>
<Card title="Dashboard Review" icon="desktop">
Review and respond to HITL requests in the Enterprise dashboard when preferred.
</Card>
<Card title="Flexible Routing" icon="route">
Route requests to specific emails based on method patterns or pull from flow state.
</Card>
<Card title="Auto-Response" icon="clock">
Configure automatic fallback responses when no human replies within the timeout.
</Card>
</CardGroup>
### Key Benefits
- **External responders**: Anyone with an email can respond, even non-platform users
- **Dynamic assignment**: Pull assignee email from flow state (e.g., `account_owner_email`)
- **Simple configuration**: Email-based routing is easier to set up than user/role management
- **Deployment creator fallback**: If no routing rule matches, the deployment creator is notified
<Tip>
For implementation details on the `@human_feedback` decorator, see the [Human Feedback in Flows](/en/learn/human-feedback-in-flows) guide.
</Tip>
## Setting Up Webhook-Based HITL Workflows
For custom integrations with external systems like Slack, Microsoft Teams, or your own applications, you can use the webhook-based approach:
## Setting Up HITL Workflows
<Steps>
<Step title="Configure Your Task">
@@ -144,14 +99,3 @@ HITL workflows are particularly valuable for:
- Sensitive or high-stakes operations
- Creative tasks requiring human judgment
- Compliance and regulatory reviews
## Learn More
<CardGroup cols={2}>
<Card title="Flow HITL Management" icon="users-gear" href="/en/enterprise/features/flow-hitl-management">
Explore the full Enterprise Flow HITL platform capabilities including email notifications, routing rules, auto-response, and analytics.
</Card>
<Card title="Human Feedback in Flows" icon="code" href="/en/learn/human-feedback-in-flows">
Implementation guide for the `@human_feedback` decorator in your Flows.
</Card>
</CardGroup>

View File

@@ -1,23 +1,25 @@
---
title: "Kickoff Crew"
description: "Kickoff a Crew on CrewAI AMP"
description: "Kickoff a Crew on CrewAI AOP"
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.
Once you've deployed your crew to the CrewAI AOP 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)
1. Log in to [CrewAI AOP](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>
<Frame>
![Crew Dashboard](/images/enterprise/crew-dashboard.png)
</Frame>
### Step 2: Initiate Execution
@@ -29,7 +31,9 @@ From your crew's detail page, you have two options to kickoff an execution:
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>
<Frame>
![Kickoff Endpoint](/images/enterprise/kickoff-endpoint.png)
</Frame>
#### Option B: Using the Visual Interface
@@ -37,7 +41,9 @@ From your crew's detail page, you have two options to kickoff an execution:
2. Enter the required inputs in the form fields
3. Click the `Run Crew` button
<Frame>![Run Crew](/images/enterprise/run-crew.png)</Frame>
<Frame>
![Run Crew](/images/enterprise/run-crew.png)
</Frame>
### Step 3: Monitor Execution Progress
@@ -46,7 +52,9 @@ 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>
<Frame>
![Copy Task ID](/images/enterprise/copy-task-id.png)
</Frame>
### Step 4: Check Execution Status
@@ -56,10 +64,11 @@ To monitor the progress of your execution:
2. Paste the `kickoff_id` into the designated field
3. Click the "Get Status" button
<Frame>![Get Status](/images/enterprise/get-status.png)</Frame>
<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
@@ -74,7 +83,7 @@ Once execution is complete:
## Method 2: Using the API
You can also kickoff crews programmatically using the CrewAI AMP REST API.
You can also kickoff crews programmatically using the CrewAI AOP REST API.
### Authentication
@@ -113,7 +122,7 @@ curl -X GET \
The response will be a JSON object containing an array of required input parameters, for example:
```json
{ "inputs": ["topic", "current_year"] }
{"inputs":["topic","current_year"]}
```
This example shows that this particular crew requires two inputs: `topic` and `current_year`.
@@ -133,7 +142,7 @@ curl -X POST \
The response will include a `kickoff_id` that you'll need for tracking:
```json
{ "kickoff_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv" }
{"kickoff_id":"abcd1234-5678-90ef-ghij-klmnopqrstuv"}
```
### Step 3: Check Execution Status
@@ -173,6 +182,5 @@ If an execution fails:
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.
Contact our support team for assistance with execution issues or questions about the Enterprise platform.
</Card>

View File

@@ -10,21 +10,17 @@ mode: "wide"
Use the Microsoft Teams trigger to start automations whenever a new chat is created. Common patterns include summarizing inbound requests, routing urgent messages to support teams, or creating follow-up tasks in other systems.
<Tip>
Confirm Microsoft Teams is connected under **Tools & Integrations** and
enabled in the **Triggers** tab for your deployment.
Confirm Microsoft Teams is connected under **Tools & Integrations** and enabled in the **Triggers** tab for your deployment.
</Tip>
## Enabling the Microsoft Teams Trigger
1. Open your deployment in CrewAI AMP
1. Open your deployment in CrewAI AOP
2. Go to the **Triggers** tab
3. Locate **Microsoft Teams** and switch the toggle to enable
<Frame caption="Microsoft Teams trigger connection">
<img
src="/images/enterprise/msteams-trigger.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/msteams-trigger.png" alt="Enable or disable triggers with toggle" />
</Frame>
## Example: Summarize a new chat thread
@@ -56,9 +52,7 @@ crewai triggers run microsoft_teams/teams_message_created
The `crewai triggers run` command will execute your crew with a complete Teams payload, allowing you to test your parsing logic before deployment.
<Warning>
Use `crewai triggers run microsoft_teams/teams_message_created` (not `crewai
run`) to simulate trigger execution during development. After deployment, your
crew will automatically receive the trigger payload.
Use `crewai triggers run microsoft_teams/teams_message_created` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
</Warning>
## Troubleshooting

View File

@@ -10,21 +10,17 @@ mode: "wide"
Start automations when files change inside OneDrive. You can generate audit summaries, notify security teams about external sharing, or update downstream line-of-business systems with new document metadata.
<Tip>
Connect OneDrive in **Tools & Integrations** and toggle the trigger on for
your deployment.
Connect OneDrive in **Tools & Integrations** and toggle the trigger on for your deployment.
</Tip>
## Enabling the OneDrive Trigger
1. Open your deployment in CrewAI AMP
1. Open your deployment in CrewAI AOP
2. Go to the **Triggers** tab
3. Locate **OneDrive** and switch the toggle to enable
<Frame caption="Microsoft OneDrive trigger connection">
<img
src="/images/enterprise/onedrive-trigger.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/onedrive-trigger.png" alt="Enable or disable triggers with toggle" />
</Frame>
## Example: Audit file permissions
@@ -55,9 +51,7 @@ crewai triggers run microsoft_onedrive/file_changed
The `crewai triggers run` command will execute your crew with a complete OneDrive payload, allowing you to test your parsing logic before deployment.
<Warning>
Use `crewai triggers run microsoft_onedrive/file_changed` (not `crewai run`)
to simulate trigger execution during development. After deployment, your crew
will automatically receive the trigger payload.
Use `crewai triggers run microsoft_onedrive/file_changed` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
</Warning>
## Troubleshooting

View File

@@ -10,21 +10,17 @@ mode: "wide"
Automate responses when Outlook delivers a new message or when an event is removed from the calendar. Teams commonly route escalations, file tickets, or alert attendees of cancellations.
<Tip>
Connect Outlook in **Tools & Integrations** and ensure the trigger is enabled
for your deployment.
Connect Outlook in **Tools & Integrations** and ensure the trigger is enabled for your deployment.
</Tip>
## Enabling the Outlook Trigger
1. Open your deployment in CrewAI AMP
1. Open your deployment in CrewAI AOP
2. Go to the **Triggers** tab
3. Locate **Outlook** and switch the toggle to enable
<Frame caption="Microsoft Outlook trigger connection">
<img
src="/images/enterprise/outlook-trigger.png"
alt="Enable or disable triggers with toggle"
/>
<img src="/images/enterprise/outlook-trigger.png" alt="Enable or disable triggers with toggle" />
</Frame>
## Example: Summarize a new email
@@ -55,9 +51,7 @@ crewai triggers run microsoft_outlook/email_received
The `crewai triggers run` command will execute your crew with a complete Outlook payload, allowing you to test your parsing logic before deployment.
<Warning>
Use `crewai triggers run microsoft_outlook/email_received` (not `crewai run`)
to simulate trigger execution during development. After deployment, your crew
will automatically receive the trigger payload.
Use `crewai triggers run microsoft_outlook/email_received` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
</Warning>
## Troubleshooting

View File

@@ -1,305 +0,0 @@
---
title: "Prepare for Deployment"
description: "Ensure your Crew or Flow is ready for deployment to CrewAI AMP"
icon: "clipboard-check"
mode: "wide"
---
<Note>
Before deploying to CrewAI AMP, it's crucial to verify your project is correctly structured.
Both Crews and Flows can be deployed as "automations," but they have different project structures
and requirements that must be met for successful deployment.
</Note>
## Understanding Automations
In CrewAI AMP, **automations** is the umbrella term for deployable Agentic AI projects. An automation can be either:
- **A Crew**: A standalone team of AI agents working together on tasks
- **A Flow**: An orchestrated workflow that can combine multiple crews, direct LLM calls, and procedural logic
Understanding which type you're deploying is essential because they have different project structures and entry points.
## Crews vs Flows: Key Differences
<CardGroup cols={2}>
<Card title="Crew Projects" icon="users">
Standalone AI agent teams with `crew.py` defining agents and tasks. Best for focused, collaborative tasks.
</Card>
<Card title="Flow Projects" icon="diagram-project">
Orchestrated workflows with embedded crews in a `crews/` folder. Best for complex, multi-stage processes.
</Card>
</CardGroup>
| Aspect | Crew | Flow |
|--------|------|------|
| **Project structure** | `src/project_name/` with `crew.py` | `src/project_name/` with `crews/` folder |
| **Main logic location** | `src/project_name/crew.py` | `src/project_name/main.py` (Flow class) |
| **Entry point function** | `run()` in `main.py` | `kickoff()` in `main.py` |
| **pyproject.toml type** | `type = "crew"` | `type = "flow"` |
| **CLI create command** | `crewai create crew name` | `crewai create flow name` |
| **Config location** | `src/project_name/config/` | `src/project_name/crews/crew_name/config/` |
| **Can contain other crews** | No | Yes (in `crews/` folder) |
## Project Structure Reference
### Crew Project Structure
When you run `crewai create crew my_crew`, you get this structure:
```
my_crew/
├── .gitignore
├── pyproject.toml # Must have type = "crew"
├── README.md
├── .env
├── uv.lock # REQUIRED for deployment
└── src/
└── my_crew/
├── __init__.py
├── main.py # Entry point with run() function
├── crew.py # Crew class with @CrewBase decorator
├── tools/
│ ├── custom_tool.py
│ └── __init__.py
└── config/
├── agents.yaml # Agent definitions
└── tasks.yaml # Task definitions
```
<Warning>
The nested `src/project_name/` structure is critical for Crews.
Placing files at the wrong level will cause deployment failures.
</Warning>
### Flow Project Structure
When you run `crewai create flow my_flow`, you get this structure:
```
my_flow/
├── .gitignore
├── pyproject.toml # Must have type = "flow"
├── README.md
├── .env
├── uv.lock # REQUIRED for deployment
└── src/
└── my_flow/
├── __init__.py
├── main.py # Entry point with kickoff() function + Flow class
├── crews/ # Embedded crews folder
│ └── poem_crew/
│ ├── __init__.py
│ ├── poem_crew.py # Crew with @CrewBase decorator
│ └── config/
│ ├── agents.yaml
│ └── tasks.yaml
└── tools/
├── __init__.py
└── custom_tool.py
```
<Info>
Both Crews and Flows use the `src/project_name/` structure.
The key difference is that Flows have a `crews/` folder for embedded crews,
while Crews have `crew.py` directly in the project folder.
</Info>
## Pre-Deployment Checklist
Use this checklist to verify your project is ready for deployment.
### 1. Verify pyproject.toml Configuration
Your `pyproject.toml` must include the correct `[tool.crewai]` section:
<Tabs>
<Tab title="For Crews">
```toml
[tool.crewai]
type = "crew"
```
</Tab>
<Tab title="For Flows">
```toml
[tool.crewai]
type = "flow"
```
</Tab>
</Tabs>
<Warning>
If the `type` doesn't match your project structure, the build will fail or
the automation won't run correctly.
</Warning>
### 2. Ensure uv.lock File Exists
CrewAI uses `uv` for dependency management. The `uv.lock` file ensures reproducible builds and is **required** for deployment.
```bash
# Generate or update the lock file
uv lock
# Verify it exists
ls -la uv.lock
```
If the file doesn't exist, run `uv lock` and commit it to your repository:
```bash
uv lock
git add uv.lock
git commit -m "Add uv.lock for deployment"
git push
```
### 3. Validate CrewBase Decorator Usage
**Every crew class must use the `@CrewBase` decorator.** This applies to:
- Standalone crew projects
- Crews embedded inside Flow projects
```python
from crewai import Agent, Crew, Process, Task
from crewai.project import CrewBase, agent, crew, task
from crewai.agents.agent_builder.base_agent import BaseAgent
from typing import List
@CrewBase # This decorator is REQUIRED
class MyCrew():
"""My crew description"""
agents: List[BaseAgent]
tasks: List[Task]
@agent
def my_agent(self) -> Agent:
return Agent(
config=self.agents_config['my_agent'], # type: ignore[index]
verbose=True
)
@task
def my_task(self) -> Task:
return Task(
config=self.tasks_config['my_task'] # type: ignore[index]
)
@crew
def crew(self) -> Crew:
return Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
verbose=True,
)
```
<Warning>
If you forget the `@CrewBase` decorator, your deployment will fail with
errors about missing agents or tasks configurations.
</Warning>
### 4. Check Project Entry Points
Both Crews and Flows have their entry point in `src/project_name/main.py`:
<Tabs>
<Tab title="For Crews">
The entry point uses a `run()` function:
```python
# src/my_crew/main.py
from my_crew.crew import MyCrew
def run():
"""Run the crew."""
inputs = {'topic': 'AI in Healthcare'}
result = MyCrew().crew().kickoff(inputs=inputs)
return result
if __name__ == "__main__":
run()
```
</Tab>
<Tab title="For Flows">
The entry point uses a `kickoff()` function with a Flow class:
```python
# src/my_flow/main.py
from crewai.flow import Flow, listen, start
from my_flow.crews.poem_crew.poem_crew import PoemCrew
class MyFlow(Flow):
@start()
def begin(self):
# Flow logic here
result = PoemCrew().crew().kickoff(inputs={...})
return result
def kickoff():
"""Run the flow."""
MyFlow().kickoff()
if __name__ == "__main__":
kickoff()
```
</Tab>
</Tabs>
### 5. Prepare Environment Variables
Before deployment, ensure you have:
1. **LLM API keys** ready (OpenAI, Anthropic, Google, etc.)
2. **Tool API keys** if using external tools (Serper, etc.)
<Tip>
Test your project locally with the same environment variables before deploying
to catch configuration issues early.
</Tip>
## Quick Validation Commands
Run these commands from your project root to quickly verify your setup:
```bash
# 1. Check project type in pyproject.toml
grep -A2 "\[tool.crewai\]" pyproject.toml
# 2. Verify uv.lock exists
ls -la uv.lock || echo "ERROR: uv.lock missing! Run 'uv lock'"
# 3. Verify src/ structure exists
ls -la src/*/main.py 2>/dev/null || echo "No main.py found in src/"
# 4. For Crews - verify crew.py exists
ls -la src/*/crew.py 2>/dev/null || echo "No crew.py (expected for Crews)"
# 5. For Flows - verify crews/ folder exists
ls -la src/*/crews/ 2>/dev/null || echo "No crews/ folder (expected for Flows)"
# 6. Check for CrewBase usage
grep -r "@CrewBase" . --include="*.py"
```
## Common Setup Mistakes
| Mistake | Symptom | Fix |
|---------|---------|-----|
| Missing `uv.lock` | Build fails during dependency resolution | Run `uv lock` and commit |
| Wrong `type` in pyproject.toml | Build succeeds but runtime fails | Change to correct type |
| Missing `@CrewBase` decorator | "Config not found" errors | Add decorator to all crew classes |
| Files at root instead of `src/` | Entry point not found | Move to `src/project_name/` |
| Missing `run()` or `kickoff()` | Cannot start automation | Add correct entry function |
## Next Steps
Once your project passes all checklist items, you're ready to deploy:
<Card title="Deploy to AMP" icon="rocket" href="/en/enterprise/guides/deploy-to-amp">
Follow the deployment guide to deploy your Crew or Flow to CrewAI AMP using
the CLI, web interface, or CI/CD integration.
</Card>

View File

@@ -1,11 +1,11 @@
---
title: "React Component Export"
description: "Learn how to export and integrate CrewAI AMP React components into your applications"
description: "Learn how to export and integrate CrewAI AOP React components into your applications"
icon: "react"
mode: "wide"
---
This guide explains how to export CrewAI AMP crews as React components and integrate them into your own applications.
This guide explains how to export CrewAI AOP crews as React components and integrate them into your own applications.
## Exporting a React Component
@@ -17,7 +17,6 @@ This guide explains how to export CrewAI AMP crews as React components and integ
<img src="/images/enterprise/export-react-component.png" alt="Export React Component" />
</Frame>
</Step>
</Steps>
## Setting Up Your React Environment
@@ -84,7 +83,6 @@ To run this React component locally, you'll need to set up a React development e
```
- This will start the development server, and your default web browser should open automatically to http://localhost:3000, where you'll see your React app running.
</Step>
</Steps>
## Customization
@@ -92,16 +90,10 @@ To run this React component locally, you'll need to set up a React development e
You can then customise the `CrewLead.jsx` to add color, title etc
<Frame>
<img
src="/images/enterprise/customise-react-component.png"
alt="Customise React Component"
/>
<img src="/images/enterprise/customise-react-component.png" alt="Customise React Component" />
</Frame>
<Frame>
<img
src="/images/enterprise/customise-react-component-2.png"
alt="Customise React Component"
/>
<img src="/images/enterprise/customise-react-component-2.png" alt="Customise React Component" />
</Frame>
## Next Steps

View File

@@ -5,7 +5,7 @@ icon: "salesforce"
mode: "wide"
---
CrewAI AMP can be triggered from Salesforce to automate customer relationship management workflows and enhance your sales operations.
CrewAI AOP can be triggered from Salesforce to automate customer relationship management workflows and enhance your sales operations.
## Overview
@@ -31,7 +31,7 @@ Salesforce is a leading customer relationship management (CRM) platform that hel
To set up Salesforce triggers:
1. **Contact Support**: Reach out to CrewAI AMP support for assistance with Salesforce trigger setup
1. **Contact Support**: Reach out to CrewAI AOP support for assistance with Salesforce trigger setup
2. **Review Requirements**: Ensure you have the necessary Salesforce permissions and API access
3. **Configure Connection**: Work with the support team to establish the connection between CrewAI and your Salesforce instance
4. **Test Triggers**: Verify the triggers work correctly with your specific use cases
@@ -47,4 +47,4 @@ Common Salesforce + CrewAI trigger scenarios include:
## Next Steps
For detailed setup instructions and advanced configuration options, please contact CrewAI AMP support who can provide tailored guidance for your specific Salesforce environment and business needs.
For detailed setup instructions and advanced configuration options, please contact CrewAI AOP support who can provide tailored guidance for your specific Salesforce environment and business needs.

View File

@@ -1,39 +1,40 @@
---
title: "Team Management"
description: "Learn how to invite and manage team members in your CrewAI AMP organization"
description: "Learn how to invite and manage team members in your CrewAI AOP organization"
icon: "users"
mode: "wide"
---
As an administrator of a CrewAI AMP account, you can easily invite new team members to join your organization. This guide will walk you through the process step-by-step.
As an administrator of a CrewAI AOP account, you can easily invite new team members to join your organization. This guide will walk you through the process step-by-step.
## Inviting Team Members
<Steps>
<Step title="Access the Settings Page">
- Log in to your CrewAI AMP account - Look for the gear icon (⚙️) in the top
right corner of the dashboard - Click on the gear icon to access the
**Settings** page:
<Frame caption="Settings page">
<img src="/images/enterprise/settings-page.png" alt="Settings Page" />
</Frame>
</Step>
<Step title="Navigate to the Members Section">
- On the Settings page, you'll see a `Members` tab - Click on the `Members`
tab to access the **Members** page:
<Frame caption="Members tab">
<img src="/images/enterprise/members-tab.png" alt="Members Tab" />
</Frame>
</Step>
<Step title="Invite New Members">
- In the Members section, you'll see a list of current members (including
yourself) - Locate the `Email` input field - Enter the email address of the
person you want to invite - Click the `Invite` button to send the invitation
</Step>
<Step title="Repeat as Needed">
- You can repeat this process to invite multiple team members - Each invited
member will receive an email invitation to join your organization
</Step>
<Step title="Access the Settings Page">
- Log in to your CrewAI AOP account
- Look for the gear icon (⚙️) in the top right corner of the dashboard
- Click on the gear icon to access the **Settings** page:
<Frame caption="Settings page">
<img src="/images/enterprise/settings-page.png" alt="Settings Page" />
</Frame>
</Step>
<Step title="Navigate to the Members Section">
- On the Settings page, you'll see a `Members` tab
- Click on the `Members` tab to access the **Members** page:
<Frame caption="Members tab">
<img src="/images/enterprise/members-tab.png" alt="Members Tab" />
</Frame>
</Step>
<Step title="Invite New Members">
- In the Members section, you'll see a list of current members (including yourself)
- Locate the `Email` input field
- Enter the email address of the person you want to invite
- Click the `Invite` button to send the invitation
</Step>
<Step title="Repeat as Needed">
- You can repeat this process to invite multiple team members
- Each invited member will receive an email invitation to join your organization
</Step>
</Steps>
## Adding Roles
@@ -41,44 +42,40 @@ As an administrator of a CrewAI AMP account, you can easily invite new team memb
You can add roles to your team members to control their access to different parts of the platform.
<Steps>
<Step title="Access the Settings Page">
- Log in to your CrewAI AMP account - Look for the gear icon (⚙️) in the top
right corner of the dashboard - Click on the gear icon to access the
**Settings** page:
<Frame>
<img src="/images/enterprise/settings-page.png" alt="Settings Page" />
</Frame>
</Step>
<Step title="Navigate to the Members Section">
- On the Settings page, you'll see a `Roles` tab - Click on the `Roles` tab
to access the **Roles** page.
<Frame>
<img src="/images/enterprise/roles-tab.png" alt="Roles Tab" />
</Frame>
- Click on the `Add Role` button to add a new role. - Enter the
details and permissions of the role and click the `Create Role` button to
create the role.
<Frame>
<img src="/images/enterprise/add-role-modal.png" alt="Add Role Modal" />
</Frame>
</Step>
<Step title="Add Roles to Members">
- In the Members section, you'll see a list of current members (including
yourself)
<Frame>
<img
src="/images/enterprise/member-accepted-invitation.png"
alt="Member Accepted Invitation"
/>
</Frame>
- Once the member has accepted the invitation, you can add a role to
them. - Navigate back to `Roles` tab - Go to the member you want to add a
role to and under the `Role` column, click on the dropdown - Select the role
you want to add to the member - Click the `Update` button to save the role
<Frame>
<img src="/images/enterprise/assign-role.png" alt="Add Role to Member" />
</Frame>
</Step>
<Step title="Access the Settings Page">
- Log in to your CrewAI AOP account
- Look for the gear icon (⚙️) in the top right corner of the dashboard
- Click on the gear icon to access the **Settings** page:
<Frame>
<img src="/images/enterprise/settings-page.png" alt="Settings Page" />
</Frame>
</Step>
<Step title="Navigate to the Members Section">
- On the Settings page, you'll see a `Roles` tab
- Click on the `Roles` tab to access the **Roles** page.
<Frame>
<img src="/images/enterprise/roles-tab.png" alt="Roles Tab" />
</Frame>
- Click on the `Add Role` button to add a new role.
- Enter the details and permissions of the role and click the `Create Role` button to create the role.
<Frame>
<img src="/images/enterprise/add-role-modal.png" alt="Add Role Modal" />
</Frame>
</Step>
<Step title="Add Roles to Members">
- In the Members section, you'll see a list of current members (including yourself)
<Frame>
<img src="/images/enterprise/member-accepted-invitation.png" alt="Member Accepted Invitation" />
</Frame>
- Once the member has accepted the invitation, you can add a role to them.
- Navigate back to `Roles` tab
- Go to the member you want to add a role to and under the `Role` column, click on the dropdown
- Select the role you want to add to the member
- Click the `Update` button to save the role
<Frame>
<img src="/images/enterprise/assign-role.png" alt="Add Role to Member" />
</Frame>
</Step>
</Steps>
## Important Notes
@@ -88,4 +85,4 @@ You can add roles to your team members to control their access to different part
- **Invitation Acceptance**: Invited members will need to accept the invitation to join your organization
- **Email Notifications**: You may want to inform your team members to check their email (including spam folders) for the invitation
By following these steps, you can easily expand your team and collaborate more effectively within your CrewAI AMP organization.
By following these steps, you can easily expand your team and collaborate more effectively within your CrewAI AOP organization.

View File

@@ -20,11 +20,11 @@ The repository is not a version control system. Use Git to track code changes an
Before using the Tool Repository, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account
- A [CrewAI AOP](https://app.crewai.com) account
- [CrewAI CLI](/en/concepts/cli#cli) installed
- uv>=0.5.0 installed. Check out [how to upgrade](https://docs.astral.sh/uv/getting-started/installation/#upgrading-uv)
- [Git](https://git-scm.com) installed and configured
- Access permissions to publish or install tools in your CrewAI AMP organization
- Access permissions to publish or install tools in your CrewAI AOP organization
## Installing Tools
@@ -54,11 +54,11 @@ researcher = Agent(
## Adding other packages after installing a tool
After installing a tool from the CrewAI AMP Tool Repository, you need to use the `crewai uv` command to add other packages to your project.
After installing a tool from the CrewAI AOP Tool Repository, you need to use the `crewai uv` command to add other packages to your project.
Using pure `uv` commands will fail due to authentication to tool repository being handled by the CLI. By using the `crewai uv` command, you can add other packages to your project without having to worry about authentication.
Any `uv` command can be used with the `crewai uv` command, making it a powerful tool for managing your project's dependencies without the hassle of managing authentication through environment variables or other methods.
Say that you have installed a custom tool from the CrewAI AMP Tool Repository called "my-tool":
Say that you have installed a custom tool from the CrewAI AOP Tool Repository called "my-tool":
```bash
crewai tool install my-tool
@@ -131,13 +131,13 @@ crewai tool publish
To delete a tool:
1. Go to [CrewAI AMP](https://app.crewai.com)
1. Go to [CrewAI AOP](https://app.crewai.com)
2. Navigate to **Tools**
3. Select the tool
4. Click **Delete**
<Warning>
Deletion is permanent. Deleted tools cannot be restored or re-installed.
Deletion is permanent. Deleted tools cannot be restored or re-installed.
</Warning>
## Security Checks
@@ -146,9 +146,8 @@ Every published version undergoes automated security checks, and are only availa
You can check the security check status of a tool at:
`CrewAI AMP > Tools > Your Tool > Versions`
`CrewAI AOP > Tools > Your Tool > Versions`
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with API integration or
troubleshooting.
Contact our support team for assistance with API integration or troubleshooting.
</Card>

View File

@@ -1,14 +1,13 @@
---
title: "Update Crew"
description: "Updating a Crew on CrewAI AMP"
description: "Updating a Crew on CrewAI AOP"
icon: "pencil"
mode: "wide"
---
<Note>
After deploying your crew to CrewAI AMP, you may need to make updates to the
code, security settings, or configuration. This guide explains how to perform
these common update operations.
After deploying your crew to CrewAI AOP, you may need to make updates to the code, security settings, or configuration.
This guide explains how to perform these common update operations.
</Note>
## Why Update Your Crew?
@@ -16,7 +15,6 @@ mode: "wide"
CrewAI won't automatically pick up GitHub updates by default, so you'll need to manually trigger updates, unless you checked the `Auto-update` option when deploying your crew.
There are several reasons you might want to update your crew deployment:
- You want to update the code with a latest commit you pushed to GitHub
- You want to reset the bearer token for security reasons
- You want to update environment variables
@@ -25,10 +23,12 @@ There are several reasons you might want to update your crew deployment:
When you've pushed new commits to your GitHub repository and want to update your deployment:
1. Navigate to your crew in the CrewAI AMP platform
1. Navigate to your crew in the CrewAI AOP platform
2. Click on the `Re-deploy` button on your crew details page
<Frame>![Re-deploy Button](/images/enterprise/redeploy-button.png)</Frame>
<Frame>
![Re-deploy Button](/images/enterprise/redeploy-button.png)
</Frame>
This will trigger an update that you can track using the progress bar. The system will pull the latest code from your repository and rebuild your deployment.
@@ -36,15 +36,16 @@ This will trigger an update that you can track using the progress bar. The syste
If you need to generate a new bearer token (for example, if you suspect the current token might have been compromised):
1. Navigate to your crew in the CrewAI AMP platform
1. Navigate to your crew in the CrewAI AOP platform
2. Find the `Bearer Token` section
3. Click the `Reset` button next to your current token
<Frame>![Reset Token](/images/enterprise/reset-token.png)</Frame>
<Frame>
![Reset Token](/images/enterprise/reset-token.png)
</Frame>
<Warning>
Resetting your bearer token will invalidate the previous token immediately.
Make sure to update any applications or scripts that are using the old token.
Resetting your bearer token will invalidate the previous token immediately. Make sure to update any applications or scripts that are using the old token.
</Warning>
## 3. Updating Environment Variables
@@ -68,8 +69,7 @@ To update the environment variables for your crew:
5. Finally, click the `Update Deployment` button at the bottom of the page to apply the changes
<Note>
Updating environment variables will trigger a new deployment, but this will
only update the environment configuration and not the code itself.
Updating environment variables will trigger a new deployment, but this will only update the environment configuration and not the code itself.
</Note>
## After Updating
@@ -81,11 +81,9 @@ After performing any update:
3. Once complete, test your crew to ensure the changes are working as expected
<Tip>
If you encounter any issues after updating, you can view deployment logs in
the platform or contact support for assistance.
If you encounter any issues after updating, you can view deployment logs in the platform or contact support for assistance.
</Tip>
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with updating your crew or
troubleshooting deployment issues.
Contact our support team for assistance with updating your crew or troubleshooting deployment issues.
</Card>

View File

@@ -1,17 +1,17 @@
---
title: "Webhook Automation"
description: "Automate CrewAI AMP workflows using webhooks with platforms like ActivePieces, Zapier, and Make.com"
description: "Automate CrewAI AOP workflows using webhooks with platforms like ActivePieces, Zapier, and Make.com"
icon: "webhook"
mode: "wide"
---
CrewAI AMP allows you to automate your workflow using webhooks. This article will guide you through the process of setting up and using webhooks to kickoff your crew execution, with a focus on integration with ActivePieces, a workflow automation platform similar to Zapier and Make.com.
CrewAI AOP allows you to automate your workflow using webhooks. This article will guide you through the process of setting up and using webhooks to kickoff your crew execution, with a focus on integration with ActivePieces, a workflow automation platform similar to Zapier and Make.com.
## Setting Up Webhooks
<Steps>
<Step title="Accessing the Kickoff Interface">
- Navigate to the CrewAI AMP dashboard
- Navigate to the CrewAI AOP dashboard
- Look for the `/kickoff` section, which is used to start the crew execution
<Frame>
<img src="/images/enterprise/kickoff-interface.png" alt="Kickoff Interface" />
@@ -44,7 +44,7 @@ CrewAI AMP allows you to automate your workflow using webhooks. This article wil
3. Add an HTTP action step
- Set the action to `Send HTTP request`
- Use `POST` as the method
- Set the URL to your CrewAI AMP kickoff endpoint
- Set the URL to your CrewAI AOP kickoff endpoint
- Add necessary headers (e.g., `Bearer Token`)
<Frame>
<img src="/images/enterprise/activepieces-headers.png" alt="ActivePieces Headers" />
@@ -76,7 +76,6 @@ CrewAI AMP allows you to automate your workflow using webhooks. This article wil
<img src="/images/enterprise/activepieces-email.png" alt="ActivePieces Email" />
</Frame>
</Step>
</Steps>
## Webhook Output Examples
@@ -153,5 +152,4 @@ CrewAI AMP allows you to automate your workflow using webhooks. This article wil
}
```
</Tab>
</Tabs>

View File

@@ -5,11 +5,11 @@ icon: "bolt"
mode: "wide"
---
This guide will walk you through the process of setting up Zapier triggers for CrewAI AMP, allowing you to automate workflows between CrewAI AMP and other applications.
This guide will walk you through the process of setting up Zapier triggers for CrewAI AOP, allowing you to automate workflows between CrewAI AOP and other applications.
## Prerequisites
- A CrewAI AMP account
- A CrewAI AOP account
- A Zapier account
- A Slack account (for this specific example)
@@ -32,7 +32,7 @@ This guide will walk you through the process of setting up Zapier triggers for C
- Connect your Slack account if you haven't already.
</Step>
<Step title="Configure the CrewAI AMP Action">
<Step title="Configure the CrewAI AOP Action">
- Add a new action step to your Zap.
- Choose CrewAI+ as your action app and Kickoff as the Action Event
@@ -41,8 +41,8 @@ This guide will walk you through the process of setting up Zapier triggers for C
</Frame>
</Step>
<Step title="Connect your CrewAI AMP account">
- Connect your CrewAI AMP account.
<Step title="Connect your CrewAI AOP account">
- Connect your CrewAI AOP account.
- Select the appropriate Crew for your workflow.
<Frame>
@@ -51,8 +51,8 @@ This guide will walk you through the process of setting up Zapier triggers for C
- Configure the inputs for the Crew using the data from the Slack message.
</Step>
<Step title="Format the CrewAI AMP Output">
- Add another action step to format the text output from CrewAI AMP.
<Step title="Format the CrewAI AOP Output">
- Add another action step to format the text output from CrewAI AOP.
- Use Zapier's formatting tools to convert the Markdown output to HTML.
<Frame>
@@ -67,7 +67,7 @@ This guide will walk you through the process of setting up Zapier triggers for C
- Add a final action step to send the formatted output via email.
- Choose your preferred email service (e.g., Gmail, Outlook).
- Configure the email details, including recipient, subject, and body.
- Insert the formatted CrewAI AMP output into the email body.
- Insert the formatted CrewAI AOP output into the email body.
<Frame>
<img src="/images/enterprise/zapier-7.png" alt="Zapier 7" />
@@ -93,13 +93,12 @@ This guide will walk you through the process of setting up Zapier triggers for C
<img src="/images/enterprise/zapier-9.png" alt="Zapier 12" />
</Frame>
</Step>
</Steps>
## Tips for Success
- Ensure that your CrewAI AMP inputs are correctly mapped from the Slack message.
- Ensure that your CrewAI AOP inputs are correctly mapped from the Slack message.
- Test your Zap thoroughly before turning it on to catch any potential issues.
- Consider adding error handling steps to manage potential failures in the workflow.
By following these steps, you'll have successfully set up Zapier triggers for CrewAI AMP, allowing for automated workflows triggered by Slack messages and resulting in email notifications with CrewAI AMP output.
By following these steps, you'll have successfully set up Zapier triggers for CrewAI AOP, allowing for automated workflows triggered by Slack messages and resulting in email notifications with CrewAI AOP output.

View File

@@ -13,7 +13,7 @@ Enable your agents to manage tasks, projects, and team coordination through Asan
Before using the Asana integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- An Asana account with appropriate permissions
- Connected your Asana account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the Asana integration, ensure you have:
### 1. Connect Your Asana Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Asana** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for task and project management
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -60,7 +58,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `task` (string, required): Task ID - The ID of the Task the comment will be added to. The comment will be authored by the currently authenticated user.
- `text` (string, required): Text (example: "This is a comment.").
</Accordion>
<Accordion title="asana/create_project">
@@ -71,7 +68,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `workspace` (string, required): Workspace - Use Connect Portal Workflow Settings to allow users to select which Workspace to create Projects in. Defaults to the user's first Workspace if left blank.
- `team` (string, optional): Team - Use Connect Portal Workflow Settings to allow users to select which Team to share this Project with. Defaults to the user's first Team if left blank.
- `notes` (string, optional): Notes (example: "These are things we need to purchase.").
</Accordion>
<Accordion title="asana/get_projects">
@@ -80,7 +76,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `archived` (string, optional): Archived - Choose "true" to show archived projects, "false" to display only active projects, or "default" to show both archived and active projects.
- Options: `default`, `true`, `false`
</Accordion>
<Accordion title="asana/get_project_by_id">
@@ -88,7 +83,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `projectFilterId` (string, required): Project ID.
</Accordion>
<Accordion title="asana/create_task">
@@ -103,7 +97,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `dueAtDate` (string, optional): Due At - The date and time (ISO timestamp) at which this task is due. Cannot be used together with Due On. (example: "2019-09-15T02:06:58.147Z").
- `assignee` (string, optional): Assignee - The ID of the Asana user this task will be assigned to. Use Connect Portal Workflow Settings to allow users to select an Assignee.
- `gid` (string, optional): External ID - An ID from your application to associate this task with. You can use this ID to sync updates to this task later.
</Accordion>
<Accordion title="asana/update_task">
@@ -119,7 +112,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `dueAtDate` (string, optional): Due At - The date and time (ISO timestamp) at which this task is due. Cannot be used together with Due On. (example: "2019-09-15T02:06:58.147Z").
- `assignee` (string, optional): Assignee - The ID of the Asana user this task will be assigned to. Use Connect Portal Workflow Settings to allow users to select an Assignee.
- `gid` (string, optional): External ID - An ID from your application to associate this task with. You can use this ID to sync updates to this task later.
</Accordion>
<Accordion title="asana/get_tasks">
@@ -130,7 +122,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `project` (string, optional): Project - The ID of the Project to filter tasks on. Use Connect Portal Workflow Settings to allow users to select a Project.
- `assignee` (string, optional): Assignee - The ID of the assignee to filter tasks on. Use Connect Portal Workflow Settings to allow users to select an Assignee.
- `completedSince` (string, optional): Completed since - Only return tasks that are either incomplete or that have been completed since this time (ISO or Unix timestamp). (example: "2014-04-25T16:15:47-04:00").
</Accordion>
<Accordion title="asana/get_tasks_by_id">
@@ -138,7 +129,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `taskId` (string, required): Task ID.
</Accordion>
<Accordion title="asana/get_task_by_external_id">
@@ -146,7 +136,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `gid` (string, required): External ID - The ID that this task is associated or synced with, from your application.
</Accordion>
<Accordion title="asana/add_task_to_section">
@@ -157,7 +146,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `taskId` (string, required): Task ID - The ID of the task. (example: "1204619611402340").
- `beforeTaskId` (string, optional): Before Task ID - The ID of a task in this section that this task will be inserted before. Cannot be used with After Task ID. (example: "1204619611402340").
- `afterTaskId` (string, optional): After Task ID - The ID of a task in this section that this task will be inserted after. Cannot be used with Before Task ID. (example: "1204619611402340").
</Accordion>
<Accordion title="asana/get_teams">
@@ -165,14 +153,12 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `workspace` (string, required): Workspace - Returns the teams in this workspace visible to the authorized user.
</Accordion>
<Accordion title="asana/get_workspaces">
**Description:** Get a list of workspaces in Asana.
**Parameters:** None required.
</Accordion>
</AccordionGroup>

View File

@@ -13,7 +13,7 @@ Enable your agents to manage files, folders, and documents through Box. Upload f
Before using the Box integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A Box account with appropriate permissions
- Connected your Box account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the Box integration, ensure you have:
### 1. Connect Your Box Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
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
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -68,7 +66,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
}
```
- `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">
@@ -78,7 +75,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `file` (string, required): File - Accepts a File Object containing file data. Files must be smaller than 50MB in size.
- `fileName` (string, required): File Name (example: "qwerty.png").
- `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">
@@ -86,7 +82,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `fileId` (string, required): File ID - The unique identifier that represents a file. (example: "12345").
</Accordion>
<Accordion title="box/list_files">
@@ -112,7 +107,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
]
}
```
</Accordion>
<Accordion title="box/create_folder">
@@ -126,7 +120,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
"id": "123456"
}
```
</Accordion>
<Accordion title="box/move_folder">
@@ -141,7 +134,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
"id": "123456"
}
```
</Accordion>
<Accordion title="box/get_folder_by_id">
@@ -149,7 +141,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `folderId` (string, required): Folder ID - The unique identifier that represents a folder. (example: "0").
</Accordion>
<Accordion title="box/search_folders">
@@ -175,7 +166,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
]
}
```
</Accordion>
<Accordion title="box/delete_folder">
@@ -184,7 +174,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `folderId` (string, required): Folder ID - The unique identifier that represents a folder. (example: "0").
- `recursive` (boolean, optional): Recursive - Delete a folder that is not empty by recursively deleting the folder and all of its content.
</Accordion>
</AccordionGroup>

View File

@@ -13,7 +13,7 @@ Enable your agents to manage tasks, projects, and productivity workflows through
Before using the ClickUp integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A ClickUp account with appropriate permissions
- Connected your ClickUp account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the ClickUp integration, ensure you have:
### 1. Connect Your ClickUp Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **ClickUp** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for task and project management
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -77,7 +75,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
}
```
Available fields: `space_ids%5B%5D`, `project_ids%5B%5D`, `list_ids%5B%5D`, `statuses%5B%5D`, `include_closed`, `assignees%5B%5D`, `tags%5B%5D`, `due_date_gt`, `due_date_lt`, `date_created_gt`, `date_created_lt`, `date_updated_gt`, `date_updated_lt`
</Accordion>
<Accordion title="clickup/get_task_in_list">
@@ -86,7 +83,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `listId` (string, required): List - Select a List to get tasks from. Use Connect Portal User Settings to allow users to select a ClickUp List.
- `taskFilterFormula` (string, optional): Search for tasks that match specified filters. For example: name=task1.
</Accordion>
<Accordion title="clickup/create_task">
@@ -100,7 +96,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `assignees` (string, optional): Assignees - Select a Member (or an array of member IDs) to be assigned to this task. Use Connect Portal User Settings to allow users to select a ClickUp Member.
- `dueDate` (string, optional): Due Date - Specify a date for this task to be due on.
- `additionalFields` (string, optional): Additional Fields - Specify additional fields to include on this task as JSON.
</Accordion>
<Accordion title="clickup/update_task">
@@ -115,7 +110,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `assignees` (string, optional): Assignees - Select a Member (or an array of member IDs) to be assigned to this task. Use Connect Portal User Settings to allow users to select a ClickUp Member.
- `dueDate` (string, optional): Due Date - Specify a date for this task to be due on.
- `additionalFields` (string, optional): Additional Fields - Specify additional fields to include on this task as JSON.
</Accordion>
<Accordion title="clickup/delete_task">
@@ -123,7 +117,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `taskId` (string, required): Task ID - The ID of the task to delete.
</Accordion>
<Accordion title="clickup/get_list">
@@ -131,7 +124,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `spaceId` (string, required): Space ID - The ID of the space containing the lists.
</Accordion>
<Accordion title="clickup/get_custom_fields_in_list">
@@ -139,7 +131,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `listId` (string, required): List ID - The ID of the list to get custom fields from.
</Accordion>
<Accordion title="clickup/get_all_fields_in_list">
@@ -147,7 +138,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `listId` (string, required): List ID - The ID of the list to get all fields from.
</Accordion>
<Accordion title="clickup/get_space">
@@ -155,7 +145,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `spaceId` (string, optional): Space ID - The ID of the space to retrieve.
</Accordion>
<Accordion title="clickup/get_folders">
@@ -163,14 +152,12 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `spaceId` (string, required): Space ID - The ID of the space containing the folders.
</Accordion>
<Accordion title="clickup/get_member">
**Description:** Get Member information in ClickUp.
**Parameters:** None required.
</Accordion>
</AccordionGroup>
@@ -297,6 +284,5 @@ crew.kickoff()
### Getting Help
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with ClickUp integration setup or
troubleshooting.
Contact our support team for assistance with ClickUp integration setup or troubleshooting.
</Card>

View File

@@ -13,7 +13,7 @@ Enable your agents to manage repositories, issues, and releases through GitHub.
Before using the GitHub integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A GitHub account with appropriate repository permissions
- Connected your GitHub account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the GitHub integration, ensure you have:
### 1. Connect Your GitHub Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **GitHub** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for repository and issue management
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -63,7 +61,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `title` (string, required): Issue Title - Specify the title of the issue to create.
- `body` (string, optional): Issue Body - Specify the body contents of the issue to create.
- `assignees` (string, optional): Assignees - Specify the assignee(s)' GitHub login as an array of strings for this issue. (example: `["octocat"]`).
</Accordion>
<Accordion title="github/update_issue">
@@ -78,7 +75,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `assignees` (string, optional): Assignees - Specify the assignee(s)' GitHub login as an array of strings for this issue. (example: `["octocat"]`).
- `state` (string, optional): State - Specify the updated state of the issue.
- Options: `open`, `closed`
</Accordion>
<Accordion title="github/get_issue_by_number">
@@ -88,7 +84,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `owner` (string, required): Owner - Specify the name of the account owner of the associated repository for this Issue. (example: "abc").
- `repo` (string, required): Repository - Specify the name of the associated repository for this Issue.
- `issue_number` (string, required): Issue Number - Specify the number of the issue to fetch.
</Accordion>
<Accordion title="github/lock_issue">
@@ -100,7 +95,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `issue_number` (string, required): Issue Number - Specify the number of the issue to lock.
- `lock_reason` (string, required): Lock Reason - Specify a reason for locking the issue or pull request conversation.
- Options: `off-topic`, `too heated`, `resolved`, `spam`
</Accordion>
<Accordion title="github/search_issue">
@@ -128,7 +122,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
}
```
Available fields: `assignee`, `creator`, `mentioned`, `labels`
</Accordion>
<Accordion title="github/create_release">
@@ -147,7 +140,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `discussion_category_name` (string, optional): Discussion Category Name - If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository.
- `generate_release_notes` (string, optional): Release Notes - Specify whether the created release should automatically create release notes using the provided name and body specified.
- Options: `true`, `false`
</Accordion>
<Accordion title="github/update_release">
@@ -167,7 +159,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `discussion_category_name` (string, optional): Discussion Category Name - If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository.
- `generate_release_notes` (string, optional): Release Notes - Specify whether the created release should automatically create release notes using the provided name and body specified.
- Options: `true`, `false`
</Accordion>
<Accordion title="github/get_release_by_id">
@@ -177,7 +168,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `owner` (string, required): Owner - Specify the name of the account owner of the associated repository for this Release. (example: "abc").
- `repo` (string, required): Repository - Specify the name of the associated repository for this Release.
- `id` (string, required): Release ID - Specify the release ID of the release to fetch.
</Accordion>
<Accordion title="github/get_release_by_tag_name">
@@ -187,7 +177,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `owner` (string, required): Owner - Specify the name of the account owner of the associated repository for this Release. (example: "abc").
- `repo` (string, required): Repository - Specify the name of the associated repository for this Release.
- `tag_name` (string, required): Name - Specify the tag of the release to fetch. (example: "v1.0.0").
</Accordion>
<Accordion title="github/delete_release">
@@ -197,7 +186,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `owner` (string, required): Owner - Specify the name of the account owner of the associated repository for this Release. (example: "abc").
- `repo` (string, required): Repository - Specify the name of the associated repository for this Release.
- `id` (string, required): Release ID - Specify the ID of the release to delete.
</Accordion>
</AccordionGroup>
@@ -326,6 +314,5 @@ crew.kickoff()
### Getting Help
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with GitHub integration setup or
troubleshooting.
Contact our support team for assistance with GitHub integration setup or troubleshooting.
</Card>

View File

@@ -13,7 +13,7 @@ Enable your agents to manage emails, contacts, and drafts through Gmail. Send em
Before using the Gmail integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A Gmail account with appropriate permissions
- Connected your Gmail account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the Gmail integration, ensure you have:
### 1. Connect Your Gmail Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Gmail** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for email and contact management
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -64,7 +62,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `pageToken` (string, optional): Page token to retrieve a specific page of results.
- `labelIds` (array, optional): Only return messages with labels that match all of the specified label IDs.
- `includeSpamTrash` (boolean, optional): Include messages from SPAM and TRASH in the results. (default: false)
</Accordion>
<Accordion title="gmail/send_email">
@@ -80,7 +77,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `from` (string, optional): Sender email address (if different from authenticated user).
- `replyTo` (string, optional): Reply-to email address.
- `threadId` (string, optional): Thread ID if replying to an existing conversation.
</Accordion>
<Accordion title="gmail/delete_email">
@@ -89,7 +85,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `userId` (string, required): The user's email address or 'me' for the authenticated user.
- `id` (string, required): The ID of the message to delete.
</Accordion>
<Accordion title="gmail/create_draft">
@@ -99,7 +94,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `userId` (string, required): The user's email address or 'me' for the authenticated user.
- `message` (object, required): Message object containing the draft content.
- `raw` (string, required): Base64url encoded email message.
</Accordion>
<Accordion title="gmail/get_message">
@@ -110,7 +104,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `id` (string, required): The ID of the message to retrieve.
- `format` (string, optional): The format to return the message in. Options: "full", "metadata", "minimal", "raw". (default: "full")
- `metadataHeaders` (array, optional): When given and format is METADATA, only include headers specified.
</Accordion>
<Accordion title="gmail/get_attachment">
@@ -120,7 +113,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `userId` (string, required): The user's email address or 'me' for the authenticated user. (default: "me")
- `messageId` (string, required): The ID of the message containing the attachment.
- `id` (string, required): The ID of the attachment to retrieve.
</Accordion>
<Accordion title="gmail/fetch_thread">
@@ -131,7 +123,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `id` (string, required): The ID of the thread to retrieve.
- `format` (string, optional): The format to return the messages in. Options: "full", "metadata", "minimal". (default: "full")
- `metadataHeaders` (array, optional): When given and format is METADATA, only include headers specified.
</Accordion>
<Accordion title="gmail/modify_thread">
@@ -142,7 +133,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `id` (string, required): The ID of the thread to modify.
- `addLabelIds` (array, optional): A list of IDs of labels to add to this thread.
- `removeLabelIds` (array, optional): A list of IDs of labels to remove from this thread.
</Accordion>
<Accordion title="gmail/trash_thread">
@@ -151,7 +141,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `userId` (string, required): The user's email address or 'me' for the authenticated user. (default: "me")
- `id` (string, required): The ID of the thread to trash.
</Accordion>
<Accordion title="gmail/untrash_thread">
@@ -160,7 +149,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `userId` (string, required): The user's email address or 'me' for the authenticated user. (default: "me")
- `id` (string, required): The ID of the thread to untrash.
</Accordion>
</AccordionGroup>
@@ -298,6 +286,5 @@ crew.kickoff()
### Getting Help
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with Gmail integration setup or
troubleshooting.
Contact our support team for assistance with Gmail integration setup or troubleshooting.
</Card>

View File

@@ -13,7 +13,7 @@ Enable your agents to manage calendar events, schedules, and availability throug
Before using the Google Calendar integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A Google account with Google Calendar access
- Connected your Google account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the Google Calendar integration, ensure you have:
### 1. Connect Your Google Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Google Calendar** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for calendar access
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -71,7 +69,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `timeZone` (string, optional): Time zone used in the response. The default is UTC.
- `groupExpansionMax` (integer, optional): Maximal number of calendar identifiers to be provided for a single group. Maximum: 100
- `calendarExpansionMax` (integer, optional): Maximal number of calendars for which FreeBusy information is to be provided. Maximum: 50
</Accordion>
<Accordion title="google_calendar/create_event">
@@ -120,7 +117,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
- `visibility` (string, optional): Visibility of the event. Options: default, public, private, confidential. Default: default
- `transparency` (string, optional): Whether the event blocks time on the calendar. Options: opaque, transparent. Default: opaque
</Accordion>
<Accordion title="google_calendar/view_events">
@@ -140,7 +136,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `timeZone` (string, optional): Time zone used in the response.
- `updatedMin` (string, optional): Lower bound for an event's last modification time (RFC3339) to filter by.
- `iCalUID` (string, optional): Specifies an event ID in the iCalendar format to be provided in the response.
</Accordion>
<Accordion title="google_calendar/update_event">
@@ -153,7 +148,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `description` (string, optional): Updated event description
- `start_dateTime` (string, optional): Updated start time
- `end_dateTime` (string, optional): Updated end time
</Accordion>
<Accordion title="google_calendar/delete_event">
@@ -162,7 +156,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `calendarId` (string, required): Calendar ID
- `eventId` (string, required): Event ID to delete
</Accordion>
<Accordion title="google_calendar/view_calendar_list">
@@ -174,7 +167,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `showDeleted` (boolean, optional): Whether to include deleted calendar list entries in the result. Default: false
- `showHidden` (boolean, optional): Whether to show hidden entries. Default: false
- `minAccessRole` (string, optional): The minimum access role for the user in the returned entries. Options: freeBusyReader, owner, reader, writer
</Accordion>
</AccordionGroup>
@@ -335,26 +327,22 @@ crew.kickoff()
### Common Issues
**Authentication Errors**
- Ensure your Google account has the necessary permissions for calendar access
- Verify that the OAuth connection includes all required scopes for Google Calendar API
- Check if calendar sharing settings allow the required access level
**Event Creation Issues**
- Verify that time formats are correct (RFC3339 format)
- Ensure attendee email addresses are properly formatted
- Check that the target calendar exists and is accessible
- Verify time zones are correctly specified
**Availability and Time Conflicts**
- Use proper RFC3339 format for time ranges when checking availability
- Ensure time zones are consistent across all operations
- Verify that calendar IDs are correct when checking multiple calendars
**Event Updates and Deletions**
- Verify that event IDs are correct and events exist
- Ensure you have edit permissions for the events
- Check that calendar ownership allows modifications
@@ -362,6 +350,5 @@ crew.kickoff()
### Getting Help
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with Google Calendar integration setup
or troubleshooting.
Contact our support team for assistance with Google Calendar integration setup or troubleshooting.
</Card>

View File

@@ -13,7 +13,7 @@ Enable your agents to manage contacts and directory information through Google C
Before using the Google Contacts integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A Google account with Google Contacts access
- Connected your Google account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the Google Contacts integration, ensure you have:
### 1. Connect Your Google Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Google Contacts** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for contacts and directory access
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -63,7 +61,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `personFields` (string, optional): Fields to include (e.g., 'names,emailAddresses,phoneNumbers'). Default: names,emailAddresses,phoneNumbers
- `requestSyncToken` (boolean, optional): Whether the response should include a sync token. Default: false
- `sortOrder` (string, optional): The order in which the connections should be sorted. Options: LAST_MODIFIED_ASCENDING, LAST_MODIFIED_DESCENDING, FIRST_NAME_ASCENDING, LAST_NAME_ASCENDING
</Accordion>
<Accordion title="google_contacts/search_contacts">
@@ -75,7 +72,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `pageSize` (integer, optional): Number of results to return. Minimum: 1, Maximum: 30
- `pageToken` (string, optional): Token specifying which result page to return.
- `sources` (array, optional): The sources to search in. Options: READ_SOURCE_TYPE_CONTACT, READ_SOURCE_TYPE_PROFILE. Default: READ_SOURCE_TYPE_CONTACT
</Accordion>
<Accordion title="google_contacts/list_directory_people">
@@ -88,7 +84,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `readMask` (string, optional): Fields to read (e.g., 'names,emailAddresses')
- `requestSyncToken` (boolean, optional): Whether the response should include a sync token. Default: false
- `mergeSources` (array, optional): Additional data to merge into the directory people responses. Options: CONTACT
</Accordion>
<Accordion title="google_contacts/search_directory_people">
@@ -99,7 +94,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `sources` (string, required): Directory sources (use 'DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE')
- `pageSize` (integer, optional): Number of results to return
- `readMask` (string, optional): Fields to read
</Accordion>
<Accordion title="google_contacts/list_other_contacts">
@@ -110,7 +104,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `pageToken` (string, optional): Token specifying which result page to return.
- `readMask` (string, optional): Fields to read
- `requestSyncToken` (boolean, optional): Whether the response should include a sync token. Default: false
</Accordion>
<Accordion title="google_contacts/search_other_contacts">
@@ -120,7 +113,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `query` (string, required): Search query
- `readMask` (string, required): Fields to read (e.g., 'names,emailAddresses')
- `pageSize` (integer, optional): Number of results
</Accordion>
<Accordion title="google_contacts/get_person">
@@ -129,7 +121,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `resourceName` (string, required): The resource name of the person to get (e.g., 'people/c123456789')
- `personFields` (string, optional): Fields to include (e.g., 'names,emailAddresses,phoneNumbers'). Default: names,emailAddresses,phoneNumbers
</Accordion>
<Accordion title="google_contacts/create_contact">
@@ -183,7 +174,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
}
]
```
</Accordion>
<Accordion title="google_contacts/update_contact">
@@ -195,7 +185,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `names` (array, optional): Person's names
- `emailAddresses` (array, optional): Email addresses
- `phoneNumbers` (array, optional): Phone numbers
</Accordion>
<Accordion title="google_contacts/delete_contact">
@@ -203,7 +192,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `resourceName` (string, required): The resource name of the person to delete (e.g., 'people/c123456789')
</Accordion>
<Accordion title="google_contacts/batch_get_people">
@@ -212,7 +200,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `resourceNames` (array, required): Resource names of people to get. Maximum: 200 items
- `personFields` (string, optional): Fields to include (e.g., 'names,emailAddresses,phoneNumbers'). Default: names,emailAddresses,phoneNumbers
</Accordion>
<Accordion title="google_contacts/list_contact_groups">
@@ -222,61 +209,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `pageSize` (integer, optional): Number of contact groups to return. Minimum: 1, Maximum: 1000
- `pageToken` (string, optional): Token specifying which result page to return.
- `groupFields` (string, optional): Fields to include (e.g., 'name,memberCount,clientData'). Default: name,memberCount
</Accordion>
<Accordion title="google_contacts/get_contact_group">
**Description:** Get a specific contact group by resource name.
**Parameters:**
- `resourceName` (string, required): The resource name of the contact group (e.g., 'contactGroups/myContactGroup')
- `maxMembers` (integer, optional): Maximum number of members to include. Minimum: 0, Maximum: 20000
- `groupFields` (string, optional): Fields to include (e.g., 'name,memberCount,clientData'). Default: name,memberCount
</Accordion>
<Accordion title="google_contacts/create_contact_group">
**Description:** Create a new contact group (label).
**Parameters:**
- `name` (string, required): The name of the contact group
- `clientData` (array, optional): Client-specific data
```json
[
{
"key": "data_key",
"value": "data_value"
}
]
```
</Accordion>
<Accordion title="google_contacts/update_contact_group">
**Description:** Update a contact group's information.
**Parameters:**
- `resourceName` (string, required): The resource name of the contact group (e.g., 'contactGroups/myContactGroup')
- `name` (string, required): The name of the contact group
- `clientData` (array, optional): Client-specific data
```json
[
{
"key": "data_key",
"value": "data_value"
}
]
```
</Accordion>
<Accordion title="google_contacts/delete_contact_group">
**Description:** Delete a contact group.
**Parameters:**
- `resourceName` (string, required): The resource name of the contact group to delete (e.g., 'contactGroups/myContactGroup')
- `deleteContacts` (boolean, optional): Whether to delete contacts in the group as well. Default: false
</Accordion>
</AccordionGroup>
@@ -445,43 +377,36 @@ crew.kickoff()
### Common Issues
**Permission Errors**
- Ensure your Google account has appropriate permissions for contacts access
- Verify that the OAuth connection includes required scopes for Google Contacts API
- Check that directory access permissions are granted for organization contacts
**Resource Name Format Issues**
- Ensure resource names follow the correct format (e.g., 'people/c123456789' for contacts)
- Verify that contact group resource names use the format 'contactGroups/groupId'
- Check that resource names exist and are accessible
**Search and Query Issues**
- Ensure search queries are properly formatted and not empty
- Use appropriate readMask fields for the data you need
- Verify that search sources are correctly specified (contacts vs profiles)
**Contact Creation and Updates**
- Ensure required fields are provided when creating contacts
- Verify that email addresses and phone numbers are properly formatted
- Check that updatePersonFields parameter includes all fields being updated
**Directory Access Issues**
- Ensure you have appropriate permissions to access organization directory
- Verify that directory sources are correctly specified
- Check that your organization allows API access to directory information
**Pagination and Limits**
- Be mindful of page size limits (varies by endpoint)
- Use pageToken for pagination through large result sets
- Respect API rate limits and implement appropriate delays
**Contact Groups and Organization**
- Ensure contact group names are unique when creating new groups
- Verify that contacts exist before adding them to groups
- Check that you have permissions to modify contact groups
@@ -489,6 +414,5 @@ crew.kickoff()
### Getting Help
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with Google Contacts integration setup
or troubleshooting.
Contact our support team for assistance with Google Contacts integration setup or troubleshooting.
</Card>

View File

@@ -13,7 +13,7 @@ Enable your agents to create, edit, and manage Google Docs documents with text m
Before using the Google Docs integration, ensure you have:
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription
- A [CrewAI AOP](https://app.crewai.com) account with an active subscription
- A Google account with Google Docs access
- Connected your Google account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors)
@@ -21,7 +21,7 @@ Before using the Google Docs integration, ensure you have:
### 1. Connect Your Google Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
1. Navigate to [CrewAI AOP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Google Docs** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for document access
@@ -36,9 +36,7 @@ uv add crewai-tools
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the
`CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise
Token.
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
@@ -59,7 +57,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `title` (string, optional): The title for the new document.
</Accordion>
<Accordion title="google_docs/get_document">
@@ -69,7 +66,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `documentId` (string, required): The ID of the document to retrieve.
- `includeTabsContent` (boolean, optional): Whether to include tab content. Default is `false`.
- `suggestionsViewMode` (string, optional): The suggestions view mode to apply to the document. Enum: `DEFAULT_FOR_CURRENT_ACCESS`, `PREVIEW_SUGGESTIONS_ACCEPTED`, `PREVIEW_WITHOUT_SUGGESTIONS`. Default is `DEFAULT_FOR_CURRENT_ACCESS`.
</Accordion>
<Accordion title="google_docs/batch_update">
@@ -79,7 +75,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `documentId` (string, required): The ID of the document to update.
- `requests` (array, required): A list of updates to apply to the document. Each item is an object representing a request.
- `writeControl` (object, optional): Provides control over how write requests are executed. Contains `requiredRevisionId` (string) and `targetRevisionId` (string).
</Accordion>
<Accordion title="google_docs/insert_text">
@@ -89,7 +84,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `documentId` (string, required): The ID of the document to update.
- `text` (string, required): The text to insert.
- `index` (integer, optional): The zero-based index where to insert the text. Default is `1`.
</Accordion>
<Accordion title="google_docs/replace_text">
@@ -100,7 +94,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `containsText` (string, required): The text to find and replace.
- `replaceText` (string, required): The text to replace it with.
- `matchCase` (boolean, optional): Whether the search should respect case. Default is `false`.
</Accordion>
<Accordion title="google_docs/delete_content_range">
@@ -110,7 +103,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `documentId` (string, required): The ID of the document to update.
- `startIndex` (integer, required): The start index of the range to delete.
- `endIndex` (integer, required): The end index of the range to delete.
</Accordion>
<Accordion title="google_docs/insert_page_break">
@@ -119,7 +111,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
**Parameters:**
- `documentId` (string, required): The ID of the document to update.
- `index` (integer, optional): The zero-based index where to insert the page break. Default is `1`.
</Accordion>
<Accordion title="google_docs/create_named_range">
@@ -130,298 +121,6 @@ CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
- `name` (string, required): The name for the named range.
- `startIndex` (integer, required): The start index of the range.
- `endIndex` (integer, required): The end index of the range.
</Accordion>
<Accordion title="google_docs/create_document_with_content">
**Description:** Create a new Google Document with content in one action.
**Parameters:**
- `title` (string, required): The title for the new document. Appears at the top of the document and in Google Drive.
- `content` (string, optional): The text content to insert into the document. Use `\n` for new paragraphs.
</Accordion>
<Accordion title="google_docs/append_text">
**Description:** Append text to the end of a Google Document. Automatically inserts at the document end without needing to specify an index.
**Parameters:**
- `documentId` (string, required): The document ID from create_document response or URL.
- `text` (string, required): Text to append at the end of the document. Use `\n` for new paragraphs.
</Accordion>
<Accordion title="google_docs/set_text_bold">
**Description:** Make text bold or remove bold formatting in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to format.
- `endIndex` (integer, required): End position of text to format (exclusive).
- `bold` (boolean, required): Set `true` to make bold, `false` to remove bold.
</Accordion>
<Accordion title="google_docs/set_text_italic">
**Description:** Make text italic or remove italic formatting in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to format.
- `endIndex` (integer, required): End position of text to format (exclusive).
- `italic` (boolean, required): Set `true` to make italic, `false` to remove italic.
</Accordion>
<Accordion title="google_docs/set_text_underline">
**Description:** Add or remove underline formatting from text in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to format.
- `endIndex` (integer, required): End position of text to format (exclusive).
- `underline` (boolean, required): Set `true` to underline, `false` to remove underline.
</Accordion>
<Accordion title="google_docs/set_text_strikethrough">
**Description:** Add or remove strikethrough formatting from text in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to format.
- `endIndex` (integer, required): End position of text to format (exclusive).
- `strikethrough` (boolean, required): Set `true` to add strikethrough, `false` to remove.
</Accordion>
<Accordion title="google_docs/set_font_size">
**Description:** Change the font size of text in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to format.
- `endIndex` (integer, required): End position of text to format (exclusive).
- `fontSize` (number, required): Font size in points. Common sizes: 10, 11, 12, 14, 16, 18, 24, 36.
</Accordion>
<Accordion title="google_docs/set_text_color">
**Description:** Change the color of text using RGB values (0-1 scale) in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to format.
- `endIndex` (integer, required): End position of text to format (exclusive).
- `red` (number, required): Red component (0-1). Example: `1` for full red.
- `green` (number, required): Green component (0-1). Example: `0.5` for half green.
- `blue` (number, required): Blue component (0-1). Example: `0` for no blue.
</Accordion>
<Accordion title="google_docs/create_hyperlink">
**Description:** Turn existing text into a clickable hyperlink in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of text to make into a link.
- `endIndex` (integer, required): End position of text to make into a link (exclusive).
- `url` (string, required): The URL the link should point to. Example: `"https://example.com"`.
</Accordion>
<Accordion title="google_docs/apply_heading_style">
**Description:** Apply a heading or paragraph style to a text range in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of paragraph(s) to style.
- `endIndex` (integer, required): End position of paragraph(s) to style.
- `style` (string, required): The style to apply. Enum: `NORMAL_TEXT`, `TITLE`, `SUBTITLE`, `HEADING_1`, `HEADING_2`, `HEADING_3`, `HEADING_4`, `HEADING_5`, `HEADING_6`.
</Accordion>
<Accordion title="google_docs/set_paragraph_alignment">
**Description:** Set text alignment for paragraphs in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of paragraph(s) to align.
- `endIndex` (integer, required): End position of paragraph(s) to align.
- `alignment` (string, required): Text alignment. Enum: `START` (left), `CENTER`, `END` (right), `JUSTIFIED`.
</Accordion>
<Accordion title="google_docs/set_line_spacing">
**Description:** Set line spacing for paragraphs in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of paragraph(s).
- `endIndex` (integer, required): End position of paragraph(s).
- `lineSpacing` (number, required): Line spacing as percentage. `100` = single, `115` = 1.15x, `150` = 1.5x, `200` = double.
</Accordion>
<Accordion title="google_docs/create_paragraph_bullets">
**Description:** Convert paragraphs to a bulleted or numbered list in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of paragraphs to convert to list.
- `endIndex` (integer, required): End position of paragraphs to convert to list.
- `bulletPreset` (string, required): Bullet/numbering style. Enum: `BULLET_DISC_CIRCLE_SQUARE`, `BULLET_DIAMONDX_ARROW3D_SQUARE`, `BULLET_CHECKBOX`, `BULLET_ARROW_DIAMOND_DISC`, `BULLET_STAR_CIRCLE_SQUARE`, `NUMBERED_DECIMAL_ALPHA_ROMAN`, `NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS`, `NUMBERED_DECIMAL_NESTED`, `NUMBERED_UPPERALPHA_ALPHA_ROMAN`, `NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL`.
</Accordion>
<Accordion title="google_docs/delete_paragraph_bullets">
**Description:** Remove bullets or numbering from paragraphs in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `startIndex` (integer, required): Start position of list paragraphs.
- `endIndex` (integer, required): End position of list paragraphs.
</Accordion>
<Accordion title="google_docs/insert_table_with_content">
**Description:** Insert a table with content into a Google Document in one action. Provide content as a 2D array.
**Parameters:**
- `documentId` (string, required): The document ID.
- `rows` (integer, required): Number of rows in the table.
- `columns` (integer, required): Number of columns in the table.
- `index` (integer, optional): Position to insert the table. If not provided, the table is inserted at the end of the document.
- `content` (array, required): Table content as a 2D array. Each inner array is a row. Example: `[["Year", "Revenue"], ["2023", "$43B"], ["2024", "$45B"]]`.
</Accordion>
<Accordion title="google_docs/insert_table_row">
**Description:** Insert a new row above or below a reference cell in an existing table.
**Parameters:**
- `documentId` (string, required): The document ID.
- `tableStartIndex` (integer, required): The start index of the table. Get from get_document.
- `rowIndex` (integer, required): Row index (0-based) of reference cell.
- `columnIndex` (integer, optional): Column index (0-based) of reference cell. Default is `0`.
- `insertBelow` (boolean, optional): If `true`, insert below the reference row. If `false`, insert above. Default is `true`.
</Accordion>
<Accordion title="google_docs/insert_table_column">
**Description:** Insert a new column left or right of a reference cell in an existing table.
**Parameters:**
- `documentId` (string, required): The document ID.
- `tableStartIndex` (integer, required): The start index of the table.
- `rowIndex` (integer, optional): Row index (0-based) of reference cell. Default is `0`.
- `columnIndex` (integer, required): Column index (0-based) of reference cell.
- `insertRight` (boolean, optional): If `true`, insert to the right. If `false`, insert to the left. Default is `true`.
</Accordion>
<Accordion title="google_docs/delete_table_row">
**Description:** Delete a row from an existing table in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `tableStartIndex` (integer, required): The start index of the table.
- `rowIndex` (integer, required): Row index (0-based) to delete.
- `columnIndex` (integer, optional): Column index (0-based) of any cell in the row. Default is `0`.
</Accordion>
<Accordion title="google_docs/delete_table_column">
**Description:** Delete a column from an existing table in a Google Document.
**Parameters:**
- `documentId` (string, required): The document ID.
- `tableStartIndex` (integer, required): The start index of the table.
- `rowIndex` (integer, optional): Row index (0-based) of any cell in the column. Default is `0`.
- `columnIndex` (integer, required): Column index (0-based) to delete.
</Accordion>
<Accordion title="google_docs/merge_table_cells">
**Description:** Merge a range of table cells into a single cell. Content from all cells is preserved.
**Parameters:**
- `documentId` (string, required): The document ID.
- `tableStartIndex` (integer, required): The start index of the table.
- `rowIndex` (integer, required): Starting row index (0-based) for the merge.
- `columnIndex` (integer, required): Starting column index (0-based) for the merge.
- `rowSpan` (integer, required): Number of rows to merge.
- `columnSpan` (integer, required): Number of columns to merge.
</Accordion>
<Accordion title="google_docs/unmerge_table_cells">
**Description:** Unmerge previously merged table cells back into individual cells.
**Parameters:**
- `documentId` (string, required): The document ID.
- `tableStartIndex` (integer, required): The start index of the table.
- `rowIndex` (integer, required): Row index (0-based) of the merged cell.
- `columnIndex` (integer, required): Column index (0-based) of the merged cell.
- `rowSpan` (integer, required): Number of rows the merged cell spans.
- `columnSpan` (integer, required): Number of columns the merged cell spans.
</Accordion>
<Accordion title="google_docs/insert_inline_image">
**Description:** Insert an image from a public URL into a Google Document. The image must be publicly accessible, under 50MB, and in PNG/JPEG/GIF format.
**Parameters:**
- `documentId` (string, required): The document ID.
- `uri` (string, required): Public URL of the image. Must be accessible without authentication.
- `index` (integer, optional): Position to insert the image. If not provided, the image is inserted at the end of the document. Default is `1`.
</Accordion>
<Accordion title="google_docs/insert_section_break">
**Description:** Insert a section break to create document sections with different formatting.
**Parameters:**
- `documentId` (string, required): The document ID.
- `index` (integer, required): Position to insert the section break.
- `sectionType` (string, required): The type of section break. Enum: `CONTINUOUS` (stays on same page), `NEXT_PAGE` (starts a new page).
</Accordion>
<Accordion title="google_docs/create_header">
**Description:** Create a header for the document. Returns a headerId which can be used with insert_text to add header content.
**Parameters:**
- `documentId` (string, required): The document ID.
- `type` (string, optional): Header type. Enum: `DEFAULT`. Default is `DEFAULT`.
</Accordion>
<Accordion title="google_docs/create_footer">
**Description:** Create a footer for the document. Returns a footerId which can be used with insert_text to add footer content.
**Parameters:**
- `documentId` (string, required): The document ID.
- `type` (string, optional): Footer type. Enum: `DEFAULT`. Default is `DEFAULT`.
</Accordion>
<Accordion title="google_docs/delete_header">
**Description:** Delete a header from the document. Use get_document to find the headerId.
**Parameters:**
- `documentId` (string, required): The document ID.
- `headerId` (string, required): The header ID to delete. Get from get_document response.
</Accordion>
<Accordion title="google_docs/delete_footer">
**Description:** Delete a footer from the document. Use get_document to find the footerId.
**Parameters:**
- `documentId` (string, required): The document ID.
- `footerId` (string, required): The footer ID to delete. Get from get_document response.
</Accordion>
</AccordionGroup>
@@ -517,35 +216,29 @@ crew.kickoff()
### Common Issues
**Authentication Errors**
- Ensure your Google account has the necessary permissions for Google Docs access.
- Verify that the OAuth connection includes all required scopes (`https://www.googleapis.com/auth/documents`).
**Document ID Issues**
- Double-check document IDs for correctness.
- Ensure the document exists and is accessible to your account.
- Document IDs can be found in the Google Docs URL.
**Text Insertion and Range Operations**
- When using `insert_text` or `delete_content_range`, ensure index positions are valid.
- Remember that Google Docs uses zero-based indexing.
- The document must have content at the specified index positions.
**Batch Update Request Formatting**
- When using `batch_update`, ensure the `requests` array is correctly formatted according to the Google Docs API documentation.
- Complex updates require specific JSON structures for each request type.
**Replace Text Operations**
- For `replace_text`, ensure the `containsText` parameter exactly matches the text you want to replace.
- Use `matchCase` parameter to control case sensitivity.
### Getting Help
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with Google Docs integration setup or
troubleshooting.
Contact our support team for assistance with Google Docs integration setup or troubleshooting.
</Card>

Some files were not shown because too many files have changed in this diff Show More