Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fcf55198f | ||
|
|
f46a846ddc | ||
|
|
b546982690 | ||
|
|
d7bdac12a2 | ||
|
|
528d812263 | ||
|
|
ffd717c51a | ||
|
|
fbe4aa4bd1 | ||
|
|
c205d2e8de | ||
|
|
fcb5b19b2e | ||
|
|
01f0111d52 | ||
|
|
6b52587c67 | ||
|
|
629f7f34ce | ||
|
|
0f1c173d02 | ||
|
|
19c5b9a35e | ||
|
|
1ed307b58c | ||
|
|
d29867bbb6 | ||
|
|
b2c278ed22 | ||
|
|
f6aed9798b | ||
|
|
40a2d387a1 | ||
|
|
6f36d7003b | ||
|
|
9e5906c52f | ||
|
|
fc521839e4 | ||
|
|
e4cc9a664c | ||
|
|
7e6171d5bc | ||
|
|
61ad1fb112 | ||
|
|
54710a8711 | ||
|
|
5abf976373 | ||
|
|
329567153b | ||
|
|
60332e0b19 | ||
|
|
40932af3fa | ||
|
|
e134e5305b | ||
|
|
e229ef4e19 | ||
|
|
2e9eb8c32d | ||
|
|
4ebb5114ed | ||
|
|
70b083945f | ||
|
|
410db1ff39 | ||
|
|
5d6b4c922b | ||
|
|
b07c0fc45c | ||
|
|
97853199c7 | ||
|
|
494ed7e671 | ||
|
|
a83c57a2f2 | ||
|
|
08e15ab267 | ||
|
|
9728388ea7 | ||
|
|
4371cf5690 | ||
|
|
d28daa26cd | ||
|
|
a850813f2b | ||
|
|
5944a39629 | ||
|
|
c594859ed0 | ||
|
|
2ee27efca7 | ||
|
|
f6e13eb890 | ||
|
|
e7b3ce27ca | ||
|
|
dba27cf8b5 | ||
|
|
6469f224f6 | ||
|
|
f3a63be215 | ||
|
|
01d8c189f0 | ||
|
|
cc83c1ead5 | ||
|
|
7578901f6d | ||
|
|
d1343b96ed | ||
|
|
42f2b4d551 | ||
|
|
0229390ad1 | ||
|
|
f0fb349ddf | ||
|
|
bf2e2a42da | ||
|
|
814c962196 | ||
|
|
2ebb2e845f | ||
|
|
7b550ebfe8 | ||
|
|
29919c2d81 | ||
|
|
b71c88814f | ||
|
|
cb8bcfe214 | ||
|
|
13a514f8be | ||
|
|
316b1cea69 | ||
|
|
6f2e39c0dd | ||
|
|
8d93361cb3 | ||
|
|
54ec245d84 | ||
|
|
f589ab9b80 | ||
|
|
fadb59e0f0 | ||
|
|
1a60848425 | ||
|
|
0135163040 | ||
|
|
dac5d6d664 | ||
|
|
f0f94f2540 |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 33 KiB |
28
.github/codeql/codeql-config.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: "CodeQL Config"
|
||||
|
||||
paths-ignore:
|
||||
# Ignore template files - these are boilerplate code that shouldn't be analyzed
|
||||
- "lib/crewai/src/crewai/cli/templates/**"
|
||||
# Ignore test cassettes - these are test fixtures/recordings
|
||||
- "lib/crewai/tests/cassettes/**"
|
||||
- "lib/crewai-tools/tests/cassettes/**"
|
||||
# Ignore cache and build artifacts
|
||||
- ".cache/**"
|
||||
# Ignore documentation build artifacts
|
||||
- "docs/.cache/**"
|
||||
# Ignore experimental code
|
||||
- "lib/crewai/src/crewai/experimental/a2a/**"
|
||||
|
||||
paths:
|
||||
# Include all Python source code from workspace packages
|
||||
- "lib/crewai/src/**"
|
||||
- "lib/crewai-tools/src/**"
|
||||
- "lib/devtools/src/**"
|
||||
# Include tests (but exclude cassettes via paths-ignore)
|
||||
- "lib/crewai/tests/**"
|
||||
- "lib/crewai-tools/tests/**"
|
||||
- "lib/devtools/tests/**"
|
||||
|
||||
# Configure specific queries or packs if needed
|
||||
# queries:
|
||||
# - uses: security-and-quality
|
||||
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: uv # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
63
.github/security.md
vendored
@@ -1,27 +1,50 @@
|
||||
## CrewAI Security Vulnerability Reporting Policy
|
||||
## CrewAI Security Policy
|
||||
|
||||
CrewAI prioritizes the security of our software products, services, and GitHub repositories. To promptly address vulnerabilities, follow these steps for reporting security issues:
|
||||
We are committed to protecting the confidentiality, integrity, and availability of the CrewAI ecosystem. This policy explains how to report potential vulnerabilities and what you can expect from us when you do.
|
||||
|
||||
### Reporting Process
|
||||
Do **not** report vulnerabilities via public GitHub issues.
|
||||
### Scope
|
||||
|
||||
Email all vulnerability reports directly to:
|
||||
**security@crewai.com**
|
||||
We welcome reports for vulnerabilities that could impact:
|
||||
|
||||
### Required Information
|
||||
To help us quickly validate and remediate the issue, your report must include:
|
||||
- CrewAI-maintained source code and repositories
|
||||
- CrewAI-operated infrastructure and services
|
||||
- Official CrewAI releases, packages, and distributions
|
||||
|
||||
- **Vulnerability Type:** Clearly state the vulnerability type (e.g., SQL injection, XSS, privilege escalation).
|
||||
- **Affected Source Code:** Provide full file paths and direct URLs (branch, tag, or commit).
|
||||
- **Reproduction Steps:** Include detailed, step-by-step instructions. Screenshots are recommended.
|
||||
- **Special Configuration:** Document any special settings or configurations required to reproduce.
|
||||
- **Proof-of-Concept (PoC):** Provide exploit or PoC code (if available).
|
||||
- **Impact Assessment:** Clearly explain the severity and potential exploitation scenarios.
|
||||
Issues affecting clearly unaffiliated third-party services or user-generated content are out of scope, unless you can demonstrate a direct impact on CrewAI systems or customers.
|
||||
|
||||
### Our Response
|
||||
- We will acknowledge receipt of your report promptly via your provided email.
|
||||
- Confirmed vulnerabilities will receive priority remediation based on severity.
|
||||
- Patches will be released as swiftly as possible following verification.
|
||||
### How to Report
|
||||
|
||||
### Reward Notice
|
||||
Currently, we do not offer a bug bounty program. Rewards, if issued, are discretionary.
|
||||
- **Please do not** disclose vulnerabilities via public GitHub issues, pull requests, or social media.
|
||||
- Email detailed reports to **security@crewai.com** with the subject line `Security Report`.
|
||||
- If you need to share large files or sensitive artifacts, mention it in your email and we will coordinate a secure transfer method.
|
||||
|
||||
### What to Include
|
||||
|
||||
Providing comprehensive information enables us to validate the issue quickly:
|
||||
|
||||
- **Vulnerability overview** — a concise description and classification (e.g., RCE, privilege escalation)
|
||||
- **Affected components** — repository, branch, tag, or deployed service along with relevant file paths or endpoints
|
||||
- **Reproduction steps** — detailed, step-by-step instructions; include logs, screenshots, or screen recordings when helpful
|
||||
- **Proof-of-concept** — exploit details or code that demonstrates the impact (if available)
|
||||
- **Impact analysis** — severity assessment, potential exploitation scenarios, and any prerequisites or special configurations
|
||||
|
||||
### Our Commitment
|
||||
|
||||
- **Acknowledgement:** We aim to acknowledge your report within two business days.
|
||||
- **Communication:** We will keep you informed about triage results, remediation progress, and planned release timelines.
|
||||
- **Resolution:** Confirmed vulnerabilities will be prioritized based on severity and fixed as quickly as possible.
|
||||
- **Recognition:** We currently do not run a bug bounty program; any rewards or recognition are issued at CrewAI's discretion.
|
||||
|
||||
### Coordinated Disclosure
|
||||
|
||||
We ask that you allow us a reasonable window to investigate and remediate confirmed issues before any public disclosure. We will coordinate publication timelines with you whenever possible.
|
||||
|
||||
### Safe Harbor
|
||||
|
||||
We will not pursue or support legal action against individuals who, in good faith:
|
||||
|
||||
- Follow this policy and refrain from violating any applicable laws
|
||||
- Avoid privacy violations, data destruction, or service disruption
|
||||
- Limit testing to systems in scope and respect rate limits and terms of service
|
||||
|
||||
If you are unsure whether your testing is covered, please contact us at **security@crewai.com** before proceeding.
|
||||
|
||||
2
.github/workflows/build-uv-cache.yml
vendored
@@ -7,6 +7,8 @@ on:
|
||||
paths:
|
||||
- "uv.lock"
|
||||
- "pyproject.toml"
|
||||
schedule:
|
||||
- cron: "0 0 */5 * *" # Run every 5 days at midnight UTC to prevent cache expiration
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
|
||||
5
.github/workflows/codeql.yml
vendored
@@ -15,11 +15,11 @@ on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths-ignore:
|
||||
- "src/crewai/cli/templates/**"
|
||||
- "lib/crewai/src/crewai/cli/templates/**"
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths-ignore:
|
||||
- "src/crewai/cli/templates/**"
|
||||
- "lib/crewai/src/crewai/cli/templates/**"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
@@ -73,6 +73,7 @@ jobs:
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
35
.github/workflows/docs-broken-links.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Check Documentation Broken Links
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "docs.json"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "docs.json"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check-links:
|
||||
name: Check broken links
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "latest"
|
||||
|
||||
- name: Install Mintlify CLI
|
||||
run: npm i -g mintlify
|
||||
|
||||
- name: Run broken link checker
|
||||
run: |
|
||||
# Auto-answer the prompt with yes command
|
||||
yes "" | mintlify broken-links || test $? -eq 141
|
||||
working-directory: ./docs
|
||||
9
.github/workflows/linter.yml
vendored
@@ -52,10 +52,11 @@ jobs:
|
||||
- name: Run Ruff on Changed Files
|
||||
if: ${{ steps.changed-files.outputs.files != '' }}
|
||||
run: |
|
||||
echo "${{ steps.changed-files.outputs.files }}" \
|
||||
| tr ' ' '\n' \
|
||||
| grep -v 'src/crewai/cli/templates/' \
|
||||
| xargs -I{} uv run ruff check "{}"
|
||||
echo "${{ steps.changed-files.outputs.files }}" \
|
||||
| tr ' ' '\n' \
|
||||
| grep -v 'src/crewai/cli/templates/' \
|
||||
| grep -v '/tests/' \
|
||||
| xargs -I{} uv run ruff check "{}"
|
||||
|
||||
- name: Save uv caches
|
||||
if: steps.cache-restore.outputs.cache-hit != 'true'
|
||||
|
||||
81
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [ published ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build packages
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v4
|
||||
|
||||
- name: Build packages
|
||||
run: |
|
||||
uv build --all-packages
|
||||
rm dist/.gitignore
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
publish:
|
||||
name: Publish to PyPI
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/crewai
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.8.4"
|
||||
python-version: "3.12"
|
||||
enable-cache: false
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
failed=0
|
||||
for package in dist/*; do
|
||||
if [[ "$package" == *"crewai_devtools"* ]]; then
|
||||
echo "Skipping private package: $package"
|
||||
continue
|
||||
fi
|
||||
echo "Publishing $package"
|
||||
if ! uv publish "$package"; then
|
||||
echo "Failed to publish $package"
|
||||
failed=1
|
||||
fi
|
||||
done
|
||||
if [ $failed -eq 1 ]; then
|
||||
echo "Some packages failed to publish"
|
||||
exit 1
|
||||
fi
|
||||
31
.github/workflows/tests.yml
vendored
@@ -8,6 +8,14 @@ permissions:
|
||||
env:
|
||||
OPENAI_API_KEY: fake-api-key
|
||||
PYTHONUNBUFFERED: 1
|
||||
BRAVE_API_KEY: fake-brave-key
|
||||
SNOWFLAKE_USER: fake-snowflake-user
|
||||
SNOWFLAKE_PASSWORD: fake-snowflake-password
|
||||
SNOWFLAKE_ACCOUNT: fake-snowflake-account
|
||||
SNOWFLAKE_WAREHOUSE: fake-snowflake-warehouse
|
||||
SNOWFLAKE_DATABASE: fake-snowflake-database
|
||||
SNOWFLAKE_SCHEMA: fake-snowflake-schema
|
||||
EMBEDCHAIN_DB_URI: sqlite:///test.db
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
@@ -56,13 +64,13 @@ jobs:
|
||||
- name: Run tests (group ${{ matrix.group }} of 8)
|
||||
run: |
|
||||
PYTHON_VERSION_SAFE=$(echo "${{ matrix.python-version }}" | tr '.' '_')
|
||||
DURATION_FILE=".test_durations_py${PYTHON_VERSION_SAFE}"
|
||||
|
||||
DURATION_FILE="../../.test_durations_py${PYTHON_VERSION_SAFE}"
|
||||
|
||||
# Temporarily always skip cached durations to fix test splitting
|
||||
# When durations don't match, pytest-split runs duplicate tests instead of splitting
|
||||
echo "Using even test splitting (duration cache disabled until fix merged)"
|
||||
DURATIONS_ARG=""
|
||||
|
||||
|
||||
# Original logic (disabled temporarily):
|
||||
# if [ ! -f "$DURATION_FILE" ]; then
|
||||
# echo "No cached durations found, tests will be split evenly"
|
||||
@@ -74,8 +82,8 @@ jobs:
|
||||
# echo "No test changes detected, using cached test durations for optimal splitting"
|
||||
# DURATIONS_ARG="--durations-path=${DURATION_FILE}"
|
||||
# fi
|
||||
|
||||
uv run pytest \
|
||||
|
||||
cd lib/crewai && uv run pytest \
|
||||
--block-network \
|
||||
--timeout=30 \
|
||||
-vv \
|
||||
@@ -86,6 +94,19 @@ jobs:
|
||||
-n auto \
|
||||
--maxfail=3
|
||||
|
||||
- name: Run tool tests (group ${{ matrix.group }} of 8)
|
||||
run: |
|
||||
cd lib/crewai-tools && uv run pytest \
|
||||
--block-network \
|
||||
--timeout=30 \
|
||||
-vv \
|
||||
--splits 8 \
|
||||
--group ${{ matrix.group }} \
|
||||
--durations=10 \
|
||||
-n auto \
|
||||
--maxfail=3
|
||||
|
||||
|
||||
- name: Save uv caches
|
||||
if: steps.cache-restore.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
|
||||
1
.gitignore
vendored
@@ -2,7 +2,6 @@
|
||||
.pytest_cache
|
||||
__pycache__
|
||||
dist/
|
||||
lib/
|
||||
.env
|
||||
assets/*
|
||||
.idea
|
||||
|
||||
@@ -3,17 +3,25 @@ repos:
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff
|
||||
entry: uv run ruff check
|
||||
entry: bash -c 'source .venv/bin/activate && uv run ruff check --config pyproject.toml "$@"' --
|
||||
language: system
|
||||
pass_filenames: true
|
||||
types: [python]
|
||||
- id: ruff-format
|
||||
name: ruff-format
|
||||
entry: uv run ruff format
|
||||
entry: bash -c 'source .venv/bin/activate && uv run ruff format --config pyproject.toml "$@"' --
|
||||
language: system
|
||||
pass_filenames: true
|
||||
types: [python]
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: uv run mypy
|
||||
entry: bash -c 'source .venv/bin/activate && uv run mypy --config-file pyproject.toml "$@"' --
|
||||
language: system
|
||||
pass_filenames: true
|
||||
types: [python]
|
||||
exclude: ^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
|
||||
|
||||
|
||||
1737
crewAI.excalidraw
@@ -134,6 +134,7 @@
|
||||
"group": "MCP Integration",
|
||||
"pages": [
|
||||
"en/mcp/overview",
|
||||
"en/mcp/dsl-integration",
|
||||
"en/mcp/stdio",
|
||||
"en/mcp/sse",
|
||||
"en/mcp/streamable-http",
|
||||
@@ -275,6 +276,7 @@
|
||||
"en/observability/overview",
|
||||
"en/observability/arize-phoenix",
|
||||
"en/observability/braintrust",
|
||||
"en/observability/datadog",
|
||||
"en/observability/langdb",
|
||||
"en/observability/langfuse",
|
||||
"en/observability/langtrace",
|
||||
@@ -311,7 +313,10 @@
|
||||
"en/learn/multimodal-agents",
|
||||
"en/learn/replay-tasks-from-latest-crew-kickoff",
|
||||
"en/learn/sequential-process",
|
||||
"en/learn/using-annotations"
|
||||
"en/learn/using-annotations",
|
||||
"en/learn/execution-hooks",
|
||||
"en/learn/llm-hooks",
|
||||
"en/learn/tool-hooks"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -361,10 +366,20 @@
|
||||
"en/enterprise/integrations/github",
|
||||
"en/enterprise/integrations/gmail",
|
||||
"en/enterprise/integrations/google_calendar",
|
||||
"en/enterprise/integrations/google_contacts",
|
||||
"en/enterprise/integrations/google_docs",
|
||||
"en/enterprise/integrations/google_drive",
|
||||
"en/enterprise/integrations/google_sheets",
|
||||
"en/enterprise/integrations/google_slides",
|
||||
"en/enterprise/integrations/hubspot",
|
||||
"en/enterprise/integrations/jira",
|
||||
"en/enterprise/integrations/linear",
|
||||
"en/enterprise/integrations/microsoft_excel",
|
||||
"en/enterprise/integrations/microsoft_onedrive",
|
||||
"en/enterprise/integrations/microsoft_outlook",
|
||||
"en/enterprise/integrations/microsoft_sharepoint",
|
||||
"en/enterprise/integrations/microsoft_teams",
|
||||
"en/enterprise/integrations/microsoft_word",
|
||||
"en/enterprise/integrations/notion",
|
||||
"en/enterprise/integrations/salesforce",
|
||||
"en/enterprise/integrations/shopify",
|
||||
@@ -397,6 +412,7 @@
|
||||
"en/enterprise/guides/kickoff-crew",
|
||||
"en/enterprise/guides/update-crew",
|
||||
"en/enterprise/guides/enable-crew-studio",
|
||||
"en/enterprise/guides/capture_telemetry_logs",
|
||||
"en/enterprise/guides/azure-openai-setup",
|
||||
"en/enterprise/guides/tool-repository",
|
||||
"en/enterprise/guides/react-component-export",
|
||||
@@ -421,6 +437,7 @@
|
||||
"en/api-reference/introduction",
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
]
|
||||
}
|
||||
@@ -558,6 +575,7 @@
|
||||
"group": "Integração MCP",
|
||||
"pages": [
|
||||
"pt-BR/mcp/overview",
|
||||
"pt-BR/mcp/dsl-integration",
|
||||
"pt-BR/mcp/stdio",
|
||||
"pt-BR/mcp/sse",
|
||||
"pt-BR/mcp/streamable-http",
|
||||
@@ -686,6 +704,7 @@
|
||||
"pt-BR/observability/overview",
|
||||
"pt-BR/observability/arize-phoenix",
|
||||
"pt-BR/observability/braintrust",
|
||||
"pt-BR/observability/datadog",
|
||||
"pt-BR/observability/langdb",
|
||||
"pt-BR/observability/langfuse",
|
||||
"pt-BR/observability/langtrace",
|
||||
@@ -721,7 +740,10 @@
|
||||
"pt-BR/learn/multimodal-agents",
|
||||
"pt-BR/learn/replay-tasks-from-latest-crew-kickoff",
|
||||
"pt-BR/learn/sequential-process",
|
||||
"pt-BR/learn/using-annotations"
|
||||
"pt-BR/learn/using-annotations",
|
||||
"pt-BR/learn/execution-hooks",
|
||||
"pt-BR/learn/llm-hooks",
|
||||
"pt-BR/learn/tool-hooks"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -771,10 +793,20 @@
|
||||
"pt-BR/enterprise/integrations/github",
|
||||
"pt-BR/enterprise/integrations/gmail",
|
||||
"pt-BR/enterprise/integrations/google_calendar",
|
||||
"pt-BR/enterprise/integrations/google_contacts",
|
||||
"pt-BR/enterprise/integrations/google_docs",
|
||||
"pt-BR/enterprise/integrations/google_drive",
|
||||
"pt-BR/enterprise/integrations/google_sheets",
|
||||
"pt-BR/enterprise/integrations/google_slides",
|
||||
"pt-BR/enterprise/integrations/hubspot",
|
||||
"pt-BR/enterprise/integrations/jira",
|
||||
"pt-BR/enterprise/integrations/linear",
|
||||
"pt-BR/enterprise/integrations/microsoft_excel",
|
||||
"pt-BR/enterprise/integrations/microsoft_onedrive",
|
||||
"pt-BR/enterprise/integrations/microsoft_outlook",
|
||||
"pt-BR/enterprise/integrations/microsoft_sharepoint",
|
||||
"pt-BR/enterprise/integrations/microsoft_teams",
|
||||
"pt-BR/enterprise/integrations/microsoft_word",
|
||||
"pt-BR/enterprise/integrations/notion",
|
||||
"pt-BR/enterprise/integrations/salesforce",
|
||||
"pt-BR/enterprise/integrations/shopify",
|
||||
@@ -803,6 +835,12 @@
|
||||
"group": "Triggers",
|
||||
"pages": [
|
||||
"pt-BR/enterprise/guides/automation-triggers",
|
||||
"pt-BR/enterprise/guides/gmail-trigger",
|
||||
"pt-BR/enterprise/guides/google-calendar-trigger",
|
||||
"pt-BR/enterprise/guides/google-drive-trigger",
|
||||
"pt-BR/enterprise/guides/outlook-trigger",
|
||||
"pt-BR/enterprise/guides/onedrive-trigger",
|
||||
"pt-BR/enterprise/guides/microsoft-teams-trigger",
|
||||
"pt-BR/enterprise/guides/slack-trigger",
|
||||
"pt-BR/enterprise/guides/hubspot-trigger",
|
||||
"pt-BR/enterprise/guides/salesforce-trigger",
|
||||
@@ -827,6 +865,7 @@
|
||||
"pt-BR/api-reference/introduction",
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
]
|
||||
}
|
||||
@@ -960,6 +999,7 @@
|
||||
"group": "MCP 통합",
|
||||
"pages": [
|
||||
"ko/mcp/overview",
|
||||
"ko/mcp/dsl-integration",
|
||||
"ko/mcp/stdio",
|
||||
"ko/mcp/sse",
|
||||
"ko/mcp/streamable-http",
|
||||
@@ -1100,6 +1140,7 @@
|
||||
"ko/observability/overview",
|
||||
"ko/observability/arize-phoenix",
|
||||
"ko/observability/braintrust",
|
||||
"ko/observability/datadog",
|
||||
"ko/observability/langdb",
|
||||
"ko/observability/langfuse",
|
||||
"ko/observability/langtrace",
|
||||
@@ -1135,7 +1176,10 @@
|
||||
"ko/learn/multimodal-agents",
|
||||
"ko/learn/replay-tasks-from-latest-crew-kickoff",
|
||||
"ko/learn/sequential-process",
|
||||
"ko/learn/using-annotations"
|
||||
"ko/learn/using-annotations",
|
||||
"ko/learn/execution-hooks",
|
||||
"ko/learn/llm-hooks",
|
||||
"ko/learn/tool-hooks"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1185,10 +1229,20 @@
|
||||
"ko/enterprise/integrations/github",
|
||||
"ko/enterprise/integrations/gmail",
|
||||
"ko/enterprise/integrations/google_calendar",
|
||||
"ko/enterprise/integrations/google_contacts",
|
||||
"ko/enterprise/integrations/google_docs",
|
||||
"ko/enterprise/integrations/google_drive",
|
||||
"ko/enterprise/integrations/google_sheets",
|
||||
"ko/enterprise/integrations/google_slides",
|
||||
"ko/enterprise/integrations/hubspot",
|
||||
"ko/enterprise/integrations/jira",
|
||||
"ko/enterprise/integrations/linear",
|
||||
"ko/enterprise/integrations/microsoft_excel",
|
||||
"ko/enterprise/integrations/microsoft_onedrive",
|
||||
"ko/enterprise/integrations/microsoft_outlook",
|
||||
"ko/enterprise/integrations/microsoft_sharepoint",
|
||||
"ko/enterprise/integrations/microsoft_teams",
|
||||
"ko/enterprise/integrations/microsoft_word",
|
||||
"ko/enterprise/integrations/notion",
|
||||
"ko/enterprise/integrations/salesforce",
|
||||
"ko/enterprise/integrations/shopify",
|
||||
@@ -1217,6 +1271,12 @@
|
||||
"group": "트리거",
|
||||
"pages": [
|
||||
"ko/enterprise/guides/automation-triggers",
|
||||
"ko/enterprise/guides/gmail-trigger",
|
||||
"ko/enterprise/guides/google-calendar-trigger",
|
||||
"ko/enterprise/guides/google-drive-trigger",
|
||||
"ko/enterprise/guides/outlook-trigger",
|
||||
"ko/enterprise/guides/onedrive-trigger",
|
||||
"ko/enterprise/guides/microsoft-teams-trigger",
|
||||
"ko/enterprise/guides/slack-trigger",
|
||||
"ko/enterprise/guides/hubspot-trigger",
|
||||
"ko/enterprise/guides/salesforce-trigger",
|
||||
@@ -1239,6 +1299,7 @@
|
||||
"ko/api-reference/introduction",
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
]
|
||||
}
|
||||
|
||||
6
docs/en/api-reference/resume.mdx
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "POST /resume"
|
||||
description: "Resume crew execution with human feedback"
|
||||
openapi: "/enterprise-api.en.yaml POST /resume"
|
||||
mode: "wide"
|
||||
---
|
||||
@@ -402,6 +402,77 @@ crewai config reset
|
||||
After resetting configuration, re-run `crewai login` to authenticate again.
|
||||
</Tip>
|
||||
|
||||
### 14. Trace Management
|
||||
|
||||
Manage trace collection preferences for your Crew and Flow executions.
|
||||
|
||||
```shell Terminal
|
||||
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
|
||||
```
|
||||
|
||||
#### How Tracing Works
|
||||
|
||||
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
|
||||
|
||||
3. **User preference** (lowest priority):
|
||||
```shell Terminal
|
||||
crewai traces enable
|
||||
```
|
||||
- Checked only if `tracing` is not set in code and `CREWAI_TRACING_ENABLED` is not set to `true`
|
||||
- Running `crewai traces enable` is sufficient to enable tracing by itself
|
||||
|
||||
<Note>
|
||||
**To enable tracing**, use any one of these methods:
|
||||
- Set `tracing=True` in your Crew/Flow code, OR
|
||||
- Add `CREWAI_TRACING_ENABLED=true` to your `.env` file, OR
|
||||
- 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).
|
||||
</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.
|
||||
</Tip>
|
||||
|
||||
@@ -739,7 +739,7 @@ class KnowledgeMonitorListener(BaseEventListener):
|
||||
knowledge_monitor = KnowledgeMonitorListener()
|
||||
```
|
||||
|
||||
For more information on using events, see the [Event Listeners](https://docs.crewai.com/concepts/event-listener) documentation.
|
||||
For more information on using events, see the [Event Listeners](/en/concepts/event-listener) documentation.
|
||||
|
||||
### Custom Knowledge Sources
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ mode: "wide"
|
||||
|
||||
## Overview
|
||||
|
||||
CrewAI integrates with multiple LLM providers through LiteLLM, 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.
|
||||
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.
|
||||
|
||||
|
||||
## What are LLMs?
|
||||
@@ -113,44 +113,104 @@ In this section, you'll find detailed examples that help you select, configure,
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="OpenAI">
|
||||
Set the following environment variables in your `.env` file:
|
||||
CrewAI provides native integration with OpenAI through the OpenAI Python SDK.
|
||||
|
||||
```toml Code
|
||||
# Required
|
||||
OPENAI_API_KEY=sk-...
|
||||
|
||||
# Optional
|
||||
OPENAI_API_BASE=<custom-base-url>
|
||||
OPENAI_ORGANIZATION=<your-org-id>
|
||||
OPENAI_BASE_URL=<custom-base-url>
|
||||
```
|
||||
|
||||
Example usage in your CrewAI project:
|
||||
**Basic Usage:**
|
||||
```python Code
|
||||
from crewai import LLM
|
||||
|
||||
llm = LLM(
|
||||
model="openai/gpt-4", # call model by provider/model_name
|
||||
temperature=0.8,
|
||||
max_tokens=150,
|
||||
model="openai/gpt-4o",
|
||||
api_key="your-api-key", # Or set OPENAI_API_KEY
|
||||
temperature=0.7,
|
||||
max_tokens=4000
|
||||
)
|
||||
```
|
||||
|
||||
**Advanced Configuration:**
|
||||
```python Code
|
||||
from crewai import LLM
|
||||
|
||||
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
|
||||
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
|
||||
)
|
||||
```
|
||||
|
||||
OpenAI is one of the leading providers of LLMs with a wide range of models and features.
|
||||
**Structured Outputs:**
|
||||
```python Code
|
||||
from pydantic import BaseModel
|
||||
from crewai import LLM
|
||||
|
||||
class ResponseFormat(BaseModel):
|
||||
name: str
|
||||
age: int
|
||||
summary: str
|
||||
|
||||
llm = LLM(
|
||||
model="openai/gpt-4o",
|
||||
)
|
||||
```
|
||||
|
||||
**Supported Environment Variables:**
|
||||
- `OPENAI_API_KEY`: Your OpenAI API key (required)
|
||||
- `OPENAI_BASE_URL`: Custom base URL for OpenAI API (optional)
|
||||
|
||||
**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
|
||||
|
||||
**Supported Models:**
|
||||
|
||||
| Model | Context Window | Best For |
|
||||
|---------------------|------------------|-----------------------------------------------|
|
||||
| GPT-4 | 8,192 tokens | High-accuracy tasks, complex reasoning |
|
||||
| GPT-4 Turbo | 128,000 tokens | Long-form content, document analysis |
|
||||
| GPT-4o & GPT-4o-mini | 128,000 tokens | Cost-effective large context processing |
|
||||
| o3-mini | 200,000 tokens | Fast reasoning, complex reasoning |
|
||||
| o1-mini | 128,000 tokens | Fast reasoning, complex reasoning |
|
||||
| o1-preview | 128,000 tokens | Fast reasoning, complex reasoning |
|
||||
| o1 | 200,000 tokens | Fast reasoning, complex reasoning |
|
||||
| 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 |
|
||||
|
||||
**Note:** To use OpenAI, install the required dependencies:
|
||||
```bash
|
||||
uv add "crewai[openai]"
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Meta-Llama">
|
||||
@@ -187,69 +247,186 @@ In this section, you'll find detailed examples that help you select, configure,
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Anthropic">
|
||||
CrewAI provides native integration with Anthropic through the Anthropic Python SDK.
|
||||
|
||||
```toml Code
|
||||
# Required
|
||||
ANTHROPIC_API_KEY=sk-ant-...
|
||||
|
||||
# Optional
|
||||
ANTHROPIC_API_BASE=<custom-base-url>
|
||||
```
|
||||
|
||||
Example usage in your CrewAI project:
|
||||
**Basic Usage:**
|
||||
```python Code
|
||||
from crewai import LLM
|
||||
|
||||
llm = LLM(
|
||||
model="anthropic/claude-3-sonnet-20240229-v1:0",
|
||||
temperature=0.7
|
||||
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)">
|
||||
Set your API key in your `.env` file. If you need a key, or need to find an
|
||||
existing key, check [AI Studio](https://aistudio.google.com/apikey).
|
||||
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
|
||||
# https://ai.google.dev/gemini-api/docs/api-key
|
||||
# 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
|
||||
```
|
||||
|
||||
Example usage in your CrewAI project:
|
||||
**Basic Usage:**
|
||||
```python Code
|
||||
from crewai import LLM
|
||||
|
||||
llm = LLM(
|
||||
model="gemini/gemini-2.0-flash",
|
||||
temperature=0.7,
|
||||
api_key="your-api-key", # Or set GOOGLE_API_KEY/GEMINI_API_KEY
|
||||
temperature=0.7
|
||||
)
|
||||
```
|
||||
|
||||
### Gemini models
|
||||
**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-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.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, 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 |
|
||||
| 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).
|
||||
|
||||
### Gemma
|
||||
|
||||
The Gemini API also allows you to use your API key to access [Gemma models](https://ai.google.dev/gemma/docs) hosted on Google infrastructure.
|
||||
|
||||
| Model | Context Window |
|
||||
|----------------|----------------|
|
||||
| gemma-3-1b-it | 32k tokens |
|
||||
| gemma-3-4b-it | 32k tokens |
|
||||
| gemma-3-12b-it | 32k tokens |
|
||||
| gemma-3-27b-it | 128k tokens |
|
||||
|
||||
</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:
|
||||
@@ -291,43 +468,146 @@ In this section, you'll find detailed examples that help you select, configure,
|
||||
</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_API_BASE=<your-resource-url>
|
||||
AZURE_API_VERSION=<api-version>
|
||||
AZURE_ENDPOINT=<your-endpoint-url>
|
||||
|
||||
# Optional
|
||||
AZURE_AD_TOKEN=<your-azure-ad-token>
|
||||
AZURE_API_TYPE=<your-azure-api-type>
|
||||
AZURE_API_VERSION=<api-version> # Defaults to 2024-06-01
|
||||
```
|
||||
|
||||
Example usage in your CrewAI project:
|
||||
**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_version="2023-05-15"
|
||||
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>
|
||||
AWS_DEFAULT_REGION=<your-region>
|
||||
|
||||
# Optional
|
||||
AWS_SESSION_TOKEN=<your-session-token> # For temporary credentials
|
||||
AWS_DEFAULT_REGION=<your-region> # Defaults to us-east-1
|
||||
```
|
||||
|
||||
Example usage in your CrewAI project:
|
||||
**Basic Usage:**
|
||||
```python Code
|
||||
from crewai import LLM
|
||||
|
||||
llm = LLM(
|
||||
model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0"
|
||||
model="bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
|
||||
region_name="us-east-1"
|
||||
)
|
||||
```
|
||||
|
||||
Before using Amazon Bedrock, make sure you have boto3 installed in your environment
|
||||
**Advanced Configuration:**
|
||||
```python Code
|
||||
from crewai import LLM
|
||||
|
||||
[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, enabling secure and responsible AI application development.
|
||||
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 |
|
||||
|-------------------------|----------------------|-------------------------------------------------------------------|
|
||||
@@ -357,7 +637,12 @@ In this section, you'll find detailed examples that help you select, configure,
|
||||
| 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">
|
||||
@@ -750,7 +1035,7 @@ CrewAI supports streaming responses from LLMs, allowing your application to rece
|
||||
```
|
||||
|
||||
<Tip>
|
||||
[Click here](https://docs.crewai.com/concepts/event-listener#event-listeners) for more details
|
||||
[Click here](/en/concepts/event-listener#event-listeners) for more details
|
||||
</Tip>
|
||||
</Tab>
|
||||
|
||||
@@ -899,7 +1184,7 @@ Learn how to get the most out of your LLM configuration:
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Drop Additional Parameters">
|
||||
CrewAI internally uses Litellm for LLM calls, which allows you to drop additional parameters that are not needed for your specific use case. This can help simplify your code and reduce the complexity of your LLM configuration.
|
||||
CrewAI internally uses native sdks for LLM calls, which allows you to drop additional parameters that are not needed for your specific use case. This can help simplify your code and reduce the complexity of your LLM configuration.
|
||||
For example, if you don't need to send the <code>stop</code> parameter, you can simply omit it from your LLM call:
|
||||
|
||||
```python
|
||||
@@ -915,6 +1200,52 @@ Learn how to get the most out of your LLM configuration:
|
||||
)
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Transport Interceptors">
|
||||
CrewAI provides message interceptors for several providers, allowing you to hook into request/response cycles at the transport layer.
|
||||
|
||||
**Supported Providers:**
|
||||
- ✅ OpenAI
|
||||
- ✅ Anthropic
|
||||
|
||||
**Basic Usage:**
|
||||
```python
|
||||
import httpx
|
||||
from crewai import LLM
|
||||
from crewai.llms.hooks import BaseInterceptor
|
||||
|
||||
class CustomInterceptor(BaseInterceptor[httpx.Request, httpx.Response]):
|
||||
"""Custom interceptor to modify requests and responses."""
|
||||
|
||||
def on_outbound(self, request: httpx.Request) -> httpx.Request:
|
||||
"""Print request before sending to the LLM provider."""
|
||||
print(request)
|
||||
return request
|
||||
|
||||
def on_inbound(self, response: httpx.Response) -> httpx.Response:
|
||||
"""Process response after receiving from the LLM provider."""
|
||||
print(f"Status: {response.status_code}")
|
||||
print(f"Response time: {response.elapsed}")
|
||||
return response
|
||||
|
||||
# Use the interceptor with an LLM
|
||||
llm = LLM(
|
||||
model="openai/gpt-4o",
|
||||
interceptor=CustomInterceptor()
|
||||
)
|
||||
```
|
||||
|
||||
**Important Notes:**
|
||||
- Both methods must return the received object or type of object.
|
||||
- Modifying received objects may result in unexpected behavior or application crashes.
|
||||
- Not all providers support interceptors - check the supported providers list above
|
||||
|
||||
<Info>
|
||||
Interceptors operate at the transport layer. This is particularly useful for:
|
||||
- Message transformation and filtering
|
||||
- Debugging API interactions
|
||||
</Info>
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
## Common Issues and Solutions
|
||||
|
||||
@@ -60,6 +60,7 @@ crew = Crew(
|
||||
| **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">
|
||||
@@ -223,6 +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. |
|
||||
|
||||
### Task Methods and Properties
|
||||
|
||||
@@ -341,7 +343,11 @@ Task guardrails provide a way to validate and transform task outputs before they
|
||||
are passed to the next task. This feature helps ensure data quality and provides
|
||||
feedback to agents when their output doesn't meet specific criteria.
|
||||
|
||||
Guardrails are implemented as Python functions that contain custom validation logic, giving you complete control over the validation process and ensuring reliable, deterministic results.
|
||||
CrewAI supports two types of guardrails:
|
||||
|
||||
1. **Function-based guardrails**: Python functions with custom validation logic, giving you complete control over the validation process and ensuring reliable, deterministic results.
|
||||
|
||||
2. **LLM-based guardrails**: String descriptions that use the agent's LLM to validate outputs based on natural language criteria. These are ideal for complex or subjective validation requirements.
|
||||
|
||||
### Function-Based Guardrails
|
||||
|
||||
@@ -355,12 +361,12 @@ def validate_blog_content(result: TaskOutput) -> Tuple[bool, Any]:
|
||||
"""Validate blog content meets requirements."""
|
||||
try:
|
||||
# Check word count
|
||||
word_count = len(result.split())
|
||||
word_count = len(result.raw.split())
|
||||
if word_count > 200:
|
||||
return (False, "Blog content exceeds 200 words")
|
||||
|
||||
# Additional validation logic here
|
||||
return (True, result.strip())
|
||||
return (True, result.raw.strip())
|
||||
except Exception as e:
|
||||
return (False, "Unexpected error during validation")
|
||||
|
||||
@@ -372,6 +378,147 @@ blog_task = Task(
|
||||
)
|
||||
```
|
||||
|
||||
### LLM-Based Guardrails (String Descriptions)
|
||||
|
||||
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
|
||||
|
||||
```python Code
|
||||
from crewai import Task
|
||||
|
||||
# Single LLM-based guardrail
|
||||
blog_task = Task(
|
||||
description="Write a blog post about AI",
|
||||
expected_output="A blog post under 200 words",
|
||||
agent=blog_agent,
|
||||
guardrail="The blog post must be under 200 words and contain no technical jargon"
|
||||
)
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
**Example with detailed validation criteria**:
|
||||
|
||||
```python Code
|
||||
research_task = Task(
|
||||
description="Research the latest developments in quantum computing",
|
||||
expected_output="A comprehensive research report",
|
||||
agent=researcher_agent,
|
||||
guardrail="""
|
||||
The research report must:
|
||||
- Be at least 1000 words long
|
||||
- Include at least 5 credible sources
|
||||
- Cover both technical and practical applications
|
||||
- Be written in a professional, academic tone
|
||||
- Avoid speculation or unverified claims
|
||||
"""
|
||||
)
|
||||
```
|
||||
|
||||
### Multiple Guardrails
|
||||
|
||||
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`)
|
||||
|
||||
**Note**: If `guardrails` is provided, it takes precedence over `guardrail`. The `guardrail` parameter will be ignored when `guardrails` is set.
|
||||
|
||||
```python Code
|
||||
from typing import Tuple, Any
|
||||
from crewai import TaskOutput, Task
|
||||
|
||||
def validate_word_count(result: TaskOutput) -> Tuple[bool, Any]:
|
||||
"""Validate word count is within limits."""
|
||||
word_count = len(result.raw.split())
|
||||
if word_count < 100:
|
||||
return (False, f"Content too short: {word_count} words. Need at least 100 words.")
|
||||
if word_count > 500:
|
||||
return (False, f"Content too long: {word_count} words. Maximum is 500 words.")
|
||||
return (True, result.raw)
|
||||
|
||||
def validate_no_profanity(result: TaskOutput) -> Tuple[bool, Any]:
|
||||
"""Check for inappropriate language."""
|
||||
profanity_words = ["badword1", "badword2"] # Example list
|
||||
content_lower = result.raw.lower()
|
||||
for word in profanity_words:
|
||||
if word in content_lower:
|
||||
return (False, f"Inappropriate language detected: {word}")
|
||||
return (True, result.raw)
|
||||
|
||||
def format_output(result: TaskOutput) -> Tuple[bool, Any]:
|
||||
"""Format and clean the output."""
|
||||
formatted = result.raw.strip()
|
||||
# Capitalize first letter
|
||||
formatted = formatted[0].upper() + formatted[1:] if formatted else formatted
|
||||
return (True, formatted)
|
||||
|
||||
# Apply multiple guardrails sequentially
|
||||
blog_task = Task(
|
||||
description="Write a blog post about AI",
|
||||
expected_output="A well-formatted blog post between 100-500 words",
|
||||
agent=blog_agent,
|
||||
guardrails=[
|
||||
validate_word_count, # First: validate length
|
||||
validate_no_profanity, # Second: check content
|
||||
format_output # Third: format the result
|
||||
],
|
||||
guardrail_max_retries=3
|
||||
)
|
||||
```
|
||||
|
||||
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)
|
||||
|
||||
If any guardrail fails, the error is sent back to the agent, and the task is retried up to `guardrail_max_retries` times.
|
||||
|
||||
**Mixing function-based and LLM-based guardrails**:
|
||||
|
||||
You can combine both function-based and string-based guardrails in the same list:
|
||||
|
||||
```python Code
|
||||
from typing import Tuple, Any
|
||||
from crewai import TaskOutput, Task
|
||||
|
||||
def validate_word_count(result: TaskOutput) -> Tuple[bool, Any]:
|
||||
"""Validate word count is within limits."""
|
||||
word_count = len(result.raw.split())
|
||||
if word_count < 100:
|
||||
return (False, f"Content too short: {word_count} words. Need at least 100 words.")
|
||||
if word_count > 500:
|
||||
return (False, f"Content too long: {word_count} words. Maximum is 500 words.")
|
||||
return (True, result.raw)
|
||||
|
||||
# Mix function-based and LLM-based guardrails
|
||||
blog_task = Task(
|
||||
description="Write a blog post about AI",
|
||||
expected_output="A well-formatted blog post between 100-500 words",
|
||||
agent=blog_agent,
|
||||
guardrails=[
|
||||
validate_word_count, # Function-based: precise word count check
|
||||
"The content must be engaging and suitable for a general audience", # LLM-based: subjective quality check
|
||||
"The writing style should be clear, concise, and free of technical jargon" # LLM-based: style validation
|
||||
],
|
||||
guardrail_max_retries=3
|
||||
)
|
||||
```
|
||||
|
||||
This approach combines the precision of programmatic validation with the flexibility of LLM-based assessment for subjective criteria.
|
||||
|
||||
### Guardrail Function Requirements
|
||||
|
||||
1. **Function Signature**:
|
||||
|
||||
@@ -37,7 +37,7 @@ you can use them locally or refine them to your needs.
|
||||
<Card title="Tools & Integrations" href="/en/enterprise/features/tools-and-integrations" icon="wrench">
|
||||
Connect external apps and manage internal tools your agents can use.
|
||||
</Card>
|
||||
<Card title="Tool Repository" href="/en/enterprise/features/tool-repository" icon="toolbox">
|
||||
<Card title="Tool Repository" href="/en/enterprise/guides/tool-repository#tool-repository" icon="toolbox">
|
||||
Publish and install tools to enhance your crews' capabilities.
|
||||
</Card>
|
||||
<Card title="Agents Repository" href="/en/enterprise/features/agent-repositories" icon="people-group">
|
||||
|
||||
@@ -43,7 +43,7 @@ Tools & Integrations is the central hub for connecting third‑party apps and ma
|
||||
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 the <b>Integration</b> tab
|
||||
4. Copy your Enterprise Token from <Link href="https://app.crewai.com/crewai_plus/settings/integrations">Integration Settings</Link>
|
||||
|
||||
<Frame>
|
||||

|
||||
@@ -57,29 +57,37 @@ Tools & Integrations is the central hub for connecting third‑party apps and ma
|
||||
uv add crewai-tools
|
||||
```
|
||||
|
||||
### 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>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
### Usage Example
|
||||
|
||||
<Tip>
|
||||
All services you have authenticated will be available as tools. Add `CrewaiEnterpriseTools` to your agent and you’re set.
|
||||
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
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Gmail tool will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
# print the tools
|
||||
print(enterprise_tools)
|
||||
|
||||
# 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.",
|
||||
tools=enterprise_tools
|
||||
apps=['gmail', 'gmail/send_email'] # Using canonical name 'gmail'
|
||||
)
|
||||
|
||||
# Task to send an email
|
||||
@@ -102,21 +110,14 @@ Tools & Integrations is the central hub for connecting third‑party apps and ma
|
||||
### Filtering Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
actions_list=["gmail_find_email"] # only gmail_find_email tool will be available
|
||||
)
|
||||
|
||||
|
||||
gmail_tool = enterprise_tools["gmail_find_email"]
|
||||
|
||||
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.",
|
||||
tools=[gmail_tool]
|
||||
apps=['gmail/fetch_emails'] # Using canonical name with specific action
|
||||
)
|
||||
|
||||
notification_task = Task(
|
||||
@@ -240,7 +241,7 @@ Tools & Integrations is the central hub for connecting third‑party apps and ma
|
||||
## Related
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Tool Repository" href="/en/enterprise/features/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">
|
||||
|
||||
@@ -117,27 +117,50 @@ Before wiring a trigger into production, make sure you:
|
||||
- Decide whether to pass trigger context automatically using `allow_crewai_trigger_context`
|
||||
- Set up monitoring—webhook logs, CrewAI execution history, and optional external alerting
|
||||
|
||||
### Payload & Crew Examples Repository
|
||||
### Testing Triggers Locally with CLI
|
||||
|
||||
We maintain a comprehensive repository with end-to-end trigger examples to help you build and test your automations:
|
||||
The CrewAI CLI provides powerful commands to help you develop and test trigger-driven automations without deploying to production.
|
||||
|
||||
This repository contains:
|
||||
#### List Available Triggers
|
||||
|
||||
- **Realistic payload samples** for every supported trigger integration
|
||||
- **Ready-to-run crew implementations** that parse each payload and turn it into a business workflow
|
||||
- **Multiple scenarios per integration** (e.g., new events, updates, deletions) so you can match the shape of your data
|
||||
View all available triggers for your connected integrations:
|
||||
|
||||
| Integration | When it fires | Payload Samples | Crew Examples |
|
||||
| :-- | :-- | :-- | :-- |
|
||||
| Gmail | New messages, thread updates | [New alerts, thread updates](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/gmail) | [`new-email-crew.py`, `gmail-alert-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/gmail) |
|
||||
| Google Calendar | Event created / updated / started / ended / cancelled | [Event lifecycle payloads](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/google_calendar) | [`calendar-event-crew.py`, `calendar-meeting-crew.py`, `calendar-working-location-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/google_calendar) |
|
||||
| Google Drive | File created / updated / deleted | [File lifecycle payloads](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/google_drive) | [`drive-file-crew.py`, `drive-file-deletion-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/google_drive) |
|
||||
| Outlook | New email, calendar event removed | [Outlook payloads](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/outlook) | [`outlook-message-crew.py`, `outlook-event-removal-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/outlook) |
|
||||
| OneDrive | File operations (create, update, share, delete) | [OneDrive payloads](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/onedrive) | [`onedrive-file-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/onedrive) |
|
||||
| HubSpot | Record created / updated (contacts, companies, deals) | [HubSpot payloads](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/hubspot) | [`hubspot-company-crew.py`, `hubspot-contact-crew.py`, `hubspot-record-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/hubspot) |
|
||||
| Microsoft Teams | Chat thread created | [Teams chat payload](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/microsoft-teams) | [`teams-chat-created-crew.py`](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/microsoft-teams) |
|
||||
```bash
|
||||
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
|
||||
|
||||
#### Simulate Trigger Execution
|
||||
|
||||
Test your crew with realistic trigger payloads before deployment:
|
||||
|
||||
```bash
|
||||
crewai triggers run <trigger_name>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
<Warning>
|
||||
**Important Development Notes:**
|
||||
- Use `crewai triggers run <trigger>` to simulate trigger execution during development
|
||||
- Using `crewai run` will NOT simulate trigger calls and won't pass the trigger payload
|
||||
- After deployment, your crew will be executed with the actual trigger payload
|
||||
- If your crew expects parameters that aren't in the trigger payload, execution may fail
|
||||
</Warning>
|
||||
|
||||
Use these samples to understand payload shape, copy the matching crew, and then replace the test payload with your live trigger data.
|
||||
|
||||
### Triggers with Crew
|
||||
|
||||
@@ -241,15 +264,20 @@ def delegate_to_crew(self, crewai_trigger_payload: dict = None):
|
||||
## Troubleshooting
|
||||
|
||||
**Trigger not firing:**
|
||||
- Verify the trigger is enabled
|
||||
- Check integration connection status
|
||||
- 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
|
||||
- If you are developing, make sure the inputs include the `crewai_trigger_payload` parameter with the correct payload
|
||||
- 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
|
||||
- After deployment, your crew will receive the actual trigger payload, so test thoroughly locally first
|
||||
|
||||
Automation triggers transform your CrewAI deployments into responsive, event-driven systems that can seamlessly integrate with your existing business processes and tools.
|
||||
|
||||
<Card title="CrewAI AMP Trigger Examples" href="https://github.com/crewAIInc/crewai-enterprise-trigger-examples" icon="github">
|
||||
Check them out on GitHub!
|
||||
</Card>
|
||||
|
||||
35
docs/en/enterprise/guides/capture_telemetry_logs.mdx
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "Open Telemetry Logs"
|
||||
description: "Understand how to capture telemetry logs from your CrewAI AMP 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.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="ENTERPRISE OTEL SETUP enabled" icon="users">
|
||||
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
|
||||
</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>
|
||||

|
||||
</Frame>
|
||||
@@ -51,16 +51,25 @@ class GmailProcessingCrew:
|
||||
)
|
||||
```
|
||||
|
||||
The Gmail payload will be available via the standard context mechanisms. See the payload samples repository for structure and fields.
|
||||
The Gmail payload will be available via the standard context mechanisms.
|
||||
|
||||
### Sample payloads & crews
|
||||
### Testing Locally
|
||||
|
||||
The [CrewAI AMP Trigger Examples repository](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/gmail) includes:
|
||||
Test your Gmail trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- `new-email-payload-1.json` / `new-email-payload-2.json` — production-style new message alerts with matching crews in `new-email-crew.py`
|
||||
- `thread-updated-sample-1.json` — follow-up messages on an existing thread, processed by `gmail-alert-crew.py`
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
Use these samples to validate your parsing logic locally before wiring the trigger to your live Gmail accounts.
|
||||
# Simulate a Gmail trigger with realistic payload
|
||||
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` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
|
||||
</Warning>
|
||||
|
||||
## Monitoring Executions
|
||||
|
||||
@@ -70,16 +79,10 @@ Track history and performance of triggered runs:
|
||||
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
|
||||
</Frame>
|
||||
|
||||
## Payload Reference
|
||||
|
||||
See the sample payloads and field descriptions:
|
||||
|
||||
<Card title="Gmail samples in Trigger Examples Repo" href="https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/gmail" icon="envelopes-bulk">
|
||||
Gmail samples in Trigger Examples Repo
|
||||
</Card>
|
||||
|
||||
## 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` 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
|
||||
|
||||
@@ -39,16 +39,23 @@ print(result.raw)
|
||||
|
||||
Use `crewai_trigger_payload` exactly as it is delivered by the trigger so the crew can extract the proper fields.
|
||||
|
||||
## Sample payloads & crews
|
||||
## Testing Locally
|
||||
|
||||
The [Google Calendar examples](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/google_calendar) show how to handle multiple event types:
|
||||
Test your Google Calendar trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- `new-event.json` → standard event creation handled by `calendar-event-crew.py`
|
||||
- `event-updated.json` / `event-started.json` / `event-ended.json` → in-flight updates processed by `calendar-meeting-crew.py`
|
||||
- `event-canceled.json` → cancellation workflow that alerts attendees via `calendar-meeting-crew.py`
|
||||
- Working location events use `calendar-working-location-crew.py` to extract on-site schedules
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
Each crew transforms raw event metadata (attendees, rooms, working locations) into the summaries your teams need.
|
||||
# Simulate a Google Calendar trigger with realistic payload
|
||||
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.
|
||||
</Warning>
|
||||
|
||||
## Monitoring Executions
|
||||
|
||||
@@ -61,5 +68,7 @@ The **Executions** list in the deployment dashboard tracks every triggered run a
|
||||
## Troubleshooting
|
||||
|
||||
- Ensure the correct Google account is connected and the trigger is enabled
|
||||
- Test locally with `crewai triggers run google_calendar/event_changed` to see the exact payload structure
|
||||
- Confirm your workflow handles all-day events (payloads use `start.date` and `end.date` instead of timestamps)
|
||||
- Check execution logs if reminders or attendee arrays are missing—calendar permissions can limit fields in the payload
|
||||
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution
|
||||
|
||||
@@ -36,15 +36,23 @@ crew.kickoff({
|
||||
})
|
||||
```
|
||||
|
||||
## Sample payloads & crews
|
||||
## Testing Locally
|
||||
|
||||
Explore the [Google Drive examples](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/google_drive) to cover different operations:
|
||||
Test your Google Drive trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- `new-file.json` → new uploads processed by `drive-file-crew.py`
|
||||
- `updated-file.json` → file edits and metadata changes handled by `drive-file-crew.py`
|
||||
- `deleted-file.json` → deletion events routed through `drive-file-deletion-crew.py`
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
Each crew highlights the file name, operation type, owner, permissions, and security considerations so downstream systems can respond appropriately.
|
||||
# Simulate a Google Drive trigger with realistic payload
|
||||
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.
|
||||
</Warning>
|
||||
|
||||
## Monitoring Executions
|
||||
|
||||
@@ -57,5 +65,7 @@ Track history and performance of triggered runs with the **Executions** list in
|
||||
## Troubleshooting
|
||||
|
||||
- Verify Google Drive is connected and the trigger toggle is enabled
|
||||
- Test locally with `crewai triggers run google_drive/file_changed` to see the exact payload structure
|
||||
- If a payload is missing permission data, ensure the connected account has access to the file or folder
|
||||
- The trigger sends file IDs only; use the Drive API if you need to fetch binary content during the crew run
|
||||
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution
|
||||
|
||||
@@ -49,16 +49,4 @@ This guide provides a step-by-step process to set up HubSpot triggers for CrewAI
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Additional Resources
|
||||
|
||||
### Sample payloads & crews
|
||||
|
||||
You can jump-start development with the [HubSpot examples in the trigger repository](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/hubspot):
|
||||
|
||||
- `record-created-contact.json`, `record-updated-contact.json` → contact lifecycle events handled by `hubspot-contact-crew.py`
|
||||
- `record-created-company.json`, `record-updated-company.json` → company enrichment flows in `hubspot-company-crew.py`
|
||||
- `record-created-deals.json`, `record-updated-deals.json` → deal pipeline automation in `hubspot-record-crew.py`
|
||||
|
||||
Each crew demonstrates how to parse HubSpot record fields, enrich context, and return structured insights.
|
||||
|
||||
For more detailed information on available actions and customization options, refer to the [HubSpot Workflows Documentation](https://knowledge.hubspot.com/workflows/create-workflows).
|
||||
|
||||
@@ -40,6 +40,28 @@ Human-In-The-Loop (HITL) is a powerful approach that combines artificial intelli
|
||||
<Frame>
|
||||
<img src="/images/enterprise/crew-resume-endpoint.png" alt="Crew Resume Endpoint" />
|
||||
</Frame>
|
||||
|
||||
<Warning>
|
||||
**Critical: Webhook URLs Must Be Provided Again**:
|
||||
You **must** provide the same webhook URLs (`taskWebhookUrl`, `stepWebhookUrl`, `crewWebhookUrl`) in the resume call that you used in the kickoff call. Webhook configurations are **NOT** automatically carried over from kickoff - they must be explicitly included in the resume request to continue receiving notifications for task completion, agent steps, and crew completion.
|
||||
</Warning>
|
||||
|
||||
Example resume call with webhooks:
|
||||
```bash
|
||||
curl -X POST {BASE_URL}/resume \
|
||||
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"execution_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv",
|
||||
"task_id": "research_task",
|
||||
"human_feedback": "Great work! Please add more details.",
|
||||
"is_approve": true,
|
||||
"taskWebhookUrl": "https://your-server.com/webhooks/task",
|
||||
"stepWebhookUrl": "https://your-server.com/webhooks/step",
|
||||
"crewWebhookUrl": "https://your-server.com/webhooks/crew"
|
||||
}'
|
||||
```
|
||||
|
||||
<Warning>
|
||||
**Feedback Impact on Task Execution**:
|
||||
It's crucial to exercise care when providing feedback, as the entire feedback content will be incorporated as additional context for further task executions.
|
||||
@@ -76,4 +98,4 @@ HITL workflows are particularly valuable for:
|
||||
- Complex decision-making scenarios
|
||||
- Sensitive or high-stakes operations
|
||||
- Creative tasks requiring human judgment
|
||||
- Compliance and regulatory reviews
|
||||
- Compliance and regulatory reviews
|
||||
|
||||
@@ -37,16 +37,28 @@ print(result.raw)
|
||||
|
||||
The crew parses thread metadata (subject, created time, roster) and generates an action plan for the receiving team.
|
||||
|
||||
## Sample payloads & crews
|
||||
## Testing Locally
|
||||
|
||||
The [Microsoft Teams examples](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/microsoft-teams) include:
|
||||
Test your Microsoft Teams trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- `chat-created.json` → chat creation payload processed by `teams-chat-created-crew.py`
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
The crew demonstrates how to extract participants, initial messages, tenant information, and compliance metadata from the Microsoft Graph webhook payload.
|
||||
# Simulate a Microsoft Teams trigger with realistic payload
|
||||
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.
|
||||
</Warning>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Ensure the Teams connection is active; it must be refreshed if the tenant revokes permissions
|
||||
- Test locally with `crewai triggers run microsoft_teams/teams_message_created` to see the exact payload structure
|
||||
- Confirm the webhook subscription in Microsoft 365 is still valid if payloads stop arriving
|
||||
- Review execution logs for payload shape mismatches—Graph notifications may omit fields when a chat is private or restricted
|
||||
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution
|
||||
|
||||
@@ -36,18 +36,28 @@ crew.kickoff({
|
||||
|
||||
The crew inspects file metadata, user activity, and permission changes to produce a compliance-friendly summary.
|
||||
|
||||
## Sample payloads & crews
|
||||
## Testing Locally
|
||||
|
||||
The [OneDrive examples](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/onedrive) showcase how to:
|
||||
Test your OneDrive trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- Parse file metadata, size, and folder paths
|
||||
- Track who created and last modified the file
|
||||
- Highlight permission and external sharing changes
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
`onedrive-file-crew.py` bundles the analysis and summarization tasks so you can add remediation steps as needed.
|
||||
# Simulate a OneDrive trigger with realistic payload
|
||||
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.
|
||||
</Warning>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Ensure the connected account has permission to read the file metadata included in the webhook
|
||||
- Test locally with `crewai triggers run microsoft_onedrive/file_changed` to see the exact payload structure
|
||||
- If the trigger fires but the payload is missing `permissions`, confirm the site-level sharing settings allow Graph to return this field
|
||||
- For large tenants, filter notifications upstream so the crew only runs on relevant directories
|
||||
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution
|
||||
|
||||
@@ -36,17 +36,28 @@ crew.kickoff({
|
||||
|
||||
The crew extracts sender details, subject, body preview, and attachments before generating a structured response.
|
||||
|
||||
## Sample payloads & crews
|
||||
## Testing Locally
|
||||
|
||||
Review the [Outlook examples](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/outlook) for two common scenarios:
|
||||
Test your Outlook trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- `new-message.json` → new mail notifications parsed by `outlook-message-crew.py`
|
||||
- `event-removed.json` → calendar cleanup handled by `outlook-event-removal-crew.py`
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
Each crew demonstrates how to handle Microsoft Graph payloads, normalize headers, and keep humans in-the-loop with concise summaries.
|
||||
# Simulate an Outlook trigger with realistic payload
|
||||
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.
|
||||
</Warning>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Verify the Outlook connector is still authorized; the subscription must be renewed periodically
|
||||
- Test locally with `crewai triggers run microsoft_outlook/email_received` to see the exact payload structure
|
||||
- If attachments are missing, confirm the webhook subscription includes the `includeResourceData` flag
|
||||
- Review execution logs when events fail to match—cancellation payloads lack attendee lists by design and the crew should account for that
|
||||
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution
|
||||
|
||||
@@ -21,7 +21,7 @@ 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
|
||||
- [CrewAI CLI](https://docs.crewai.com/concepts/cli#cli) installed
|
||||
- [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
|
||||
@@ -112,7 +112,7 @@ By default, tools are published as private. To make a tool public:
|
||||
crewai tool publish --public
|
||||
```
|
||||
|
||||
For more details on how to build tools, see [Creating your own tools](https://docs.crewai.com/concepts/tools#creating-your-own-tools).
|
||||
For more details on how to build tools, see [Creating your own tools](/en/concepts/tools#creating-your-own-tools).
|
||||
|
||||
## Updating Tools
|
||||
|
||||
@@ -151,3 +151,5 @@ You can check the security check status of a tool at:
|
||||
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
|
||||
Contact our support team for assistance with API integration or troubleshooting.
|
||||
</Card>
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Before using the Asana integration, ensure you have:
|
||||
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
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -33,10 +33,26 @@ Before using the Asana integration, ensure you have:
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="ASANA_CREATE_COMMENT">
|
||||
<Accordion title="asana/create_comment">
|
||||
**Description:** Create a comment in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -44,7 +60,7 @@ uv add crewai-tools
|
||||
- `text` (string, required): Text (example: "This is a comment.").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="ASANA_CREATE_PROJECT">
|
||||
<Accordion title="asana/create_project">
|
||||
**Description:** Create a project in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -54,7 +70,7 @@ uv add crewai-tools
|
||||
- `notes` (string, optional): Notes (example: "These are things we need to purchase.").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="ASANA_GET_PROJECTS">
|
||||
<Accordion title="asana/get_projects">
|
||||
**Description:** Get a list of projects in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -62,14 +78,14 @@ uv add crewai-tools
|
||||
- Options: `default`, `true`, `false`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="ASANA_GET_PROJECT_BY_ID">
|
||||
<Accordion title="asana/get_project_by_id">
|
||||
**Description:** Get a project by ID in Asana.
|
||||
|
||||
**Parameters:**
|
||||
- `projectFilterId` (string, required): Project ID.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="ASANA_CREATE_TASK">
|
||||
<Accordion title="asana/create_task">
|
||||
**Description:** Create a task in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -83,7 +99,7 @@ uv add crewai-tools
|
||||
- `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">
|
||||
<Accordion title="asana/update_task">
|
||||
**Description:** Update a task in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -98,7 +114,7 @@ uv add crewai-tools
|
||||
- `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">
|
||||
<Accordion title="asana/get_tasks">
|
||||
**Description:** Get a list of tasks in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -108,21 +124,21 @@ uv add crewai-tools
|
||||
- `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">
|
||||
<Accordion title="asana/get_tasks_by_id">
|
||||
**Description:** Get a list of tasks by ID in Asana.
|
||||
|
||||
**Parameters:**
|
||||
- `taskId` (string, required): Task ID.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="ASANA_GET_TASK_BY_EXTERNAL_ID">
|
||||
<Accordion title="asana/get_task_by_external_id">
|
||||
**Description:** Get a task by external ID in Asana.
|
||||
|
||||
**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">
|
||||
<Accordion title="asana/add_task_to_section">
|
||||
**Description:** Add a task to a section in Asana.
|
||||
|
||||
**Parameters:**
|
||||
@@ -132,14 +148,14 @@ uv add crewai-tools
|
||||
- `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">
|
||||
<Accordion title="asana/get_teams">
|
||||
**Description:** Get a list of teams in Asana.
|
||||
|
||||
**Parameters:**
|
||||
- `workspace` (string, required): Workspace - Returns the teams in this workspace visible to the authorized user.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="ASANA_GET_WORKSPACES">
|
||||
<Accordion title="asana/get_workspaces">
|
||||
**Description:** Get a list of workspaces in Asana.
|
||||
|
||||
**Parameters:** None required.
|
||||
@@ -152,19 +168,13 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Asana tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create an agent with Asana capabilities
|
||||
asana_agent = Agent(
|
||||
role="Project Manager",
|
||||
goal="Manage tasks and projects in Asana efficiently",
|
||||
backstory="An AI assistant specialized in project management and task coordination.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['asana'] # All Asana actions will be available
|
||||
)
|
||||
|
||||
# Task to create a new project
|
||||
@@ -186,19 +196,18 @@ crew.kickoff()
|
||||
### Filtering Specific Asana Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific Asana tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["asana_create_task", "asana_update_task", "asana_get_tasks"]
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create agent with specific Asana actions only
|
||||
task_manager_agent = Agent(
|
||||
role="Task Manager",
|
||||
goal="Create and manage tasks efficiently",
|
||||
backstory="An AI assistant that focuses on task creation and management.",
|
||||
tools=enterprise_tools
|
||||
apps=[
|
||||
'asana/create_task',
|
||||
'asana/update_task',
|
||||
'asana/get_tasks'
|
||||
] # Specific Asana actions
|
||||
)
|
||||
|
||||
# Task to create and assign a task
|
||||
@@ -220,17 +229,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
project_coordinator = Agent(
|
||||
role="Project Coordinator",
|
||||
goal="Coordinate project activities and track progress",
|
||||
backstory="An experienced project coordinator who ensures projects run smoothly.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['asana']
|
||||
)
|
||||
|
||||
# Complex task involving multiple Asana operations
|
||||
|
||||
@@ -25,7 +25,7 @@ Before using the Box integration, ensure you have:
|
||||
2. Find **Box** in the Authentication Integrations section
|
||||
3. Click **Connect** and complete the OAuth flow
|
||||
4. Grant the necessary permissions for file and folder management
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -33,10 +33,26 @@ Before using the Box integration, ensure you have:
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="BOX_SAVE_FILE">
|
||||
<Accordion title="box/save_file">
|
||||
**Description:** Save a file from URL in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -52,7 +68,7 @@ uv add crewai-tools
|
||||
- `file` (string, required): File URL - Files must be smaller than 50MB in size. (example: "https://picsum.photos/200/300").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_SAVE_FILE_FROM_OBJECT">
|
||||
<Accordion title="box/save_file_from_object">
|
||||
**Description:** Save a file in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -61,14 +77,14 @@ uv add crewai-tools
|
||||
- `folder` (string, optional): Folder - Use Connect Portal Workflow Settings to allow users to select the File's Folder destination. Defaults to the user's root folder if left blank.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_GET_FILE_BY_ID">
|
||||
<Accordion title="box/get_file_by_id">
|
||||
**Description:** Get a file by ID in Box.
|
||||
|
||||
**Parameters:**
|
||||
- `fileId` (string, required): File ID - The unique identifier that represents a file. (example: "12345").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_LIST_FILES">
|
||||
<Accordion title="box/list_files">
|
||||
**Description:** List files in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -93,7 +109,7 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_CREATE_FOLDER">
|
||||
<Accordion title="box/create_folder">
|
||||
**Description:** Create a folder in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -106,7 +122,7 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_MOVE_FOLDER">
|
||||
<Accordion title="box/move_folder">
|
||||
**Description:** Move a folder in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -120,14 +136,14 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_GET_FOLDER_BY_ID">
|
||||
<Accordion title="box/get_folder_by_id">
|
||||
**Description:** Get a folder by ID in Box.
|
||||
|
||||
**Parameters:**
|
||||
- `folderId` (string, required): Folder ID - The unique identifier that represents a folder. (example: "0").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_SEARCH_FOLDERS">
|
||||
<Accordion title="box/search_folders">
|
||||
**Description:** Search folders in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -152,7 +168,7 @@ uv add crewai-tools
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="BOX_DELETE_FOLDER">
|
||||
<Accordion title="box/delete_folder">
|
||||
**Description:** Delete a folder in Box.
|
||||
|
||||
**Parameters:**
|
||||
@@ -167,19 +183,14 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Box tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create an agent with Box capabilities
|
||||
box_agent = Agent(
|
||||
role="Document Manager",
|
||||
goal="Manage files and folders in Box efficiently",
|
||||
backstory="An AI assistant specialized in document management and file organization.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['box'] # All Box actions will be available
|
||||
)
|
||||
|
||||
# Task to create a folder structure
|
||||
@@ -201,19 +212,14 @@ crew.kickoff()
|
||||
### Filtering Specific Box Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific Box tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["box_create_folder", "box_save_file", "box_list_files"]
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create agent with specific Box actions only
|
||||
file_organizer_agent = Agent(
|
||||
role="File Organizer",
|
||||
goal="Organize and manage file storage efficiently",
|
||||
backstory="An AI assistant that focuses on file organization and storage management.",
|
||||
tools=enterprise_tools
|
||||
apps=['box/create_folder', 'box/save_file', 'box/list_files'] # Specific Box actions
|
||||
)
|
||||
|
||||
# Task to organize files
|
||||
@@ -235,17 +241,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
file_manager = Agent(
|
||||
role="File Manager",
|
||||
goal="Maintain organized file structure and manage document lifecycle",
|
||||
backstory="An experienced file manager who ensures documents are properly organized and accessible.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['box']
|
||||
)
|
||||
|
||||
# Complex task involving multiple Box operations
|
||||
|
||||
@@ -25,7 +25,7 @@ Before using the ClickUp integration, ensure you have:
|
||||
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
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -33,10 +33,26 @@ Before using the ClickUp integration, ensure you have:
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="CLICKUP_SEARCH_TASKS">
|
||||
<Accordion title="clickup/search_tasks">
|
||||
**Description:** Search for tasks in ClickUp using advanced filters.
|
||||
|
||||
**Parameters:**
|
||||
@@ -61,7 +77,7 @@ uv add crewai-tools
|
||||
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">
|
||||
<Accordion title="clickup/get_task_in_list">
|
||||
**Description:** Get tasks in a specific list in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
@@ -69,7 +85,7 @@ uv add crewai-tools
|
||||
- `taskFilterFormula` (string, optional): Search for tasks that match specified filters. For example: name=task1.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_CREATE_TASK">
|
||||
<Accordion title="clickup/create_task">
|
||||
**Description:** Create a task in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
@@ -82,7 +98,7 @@ uv add crewai-tools
|
||||
- `additionalFields` (string, optional): Additional Fields - Specify additional fields to include on this task as JSON.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_UPDATE_TASK">
|
||||
<Accordion title="clickup/update_task">
|
||||
**Description:** Update a task in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
@@ -96,49 +112,49 @@ uv add crewai-tools
|
||||
- `additionalFields` (string, optional): Additional Fields - Specify additional fields to include on this task as JSON.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_DELETE_TASK">
|
||||
<Accordion title="clickup/delete_task">
|
||||
**Description:** Delete a task in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
- `taskId` (string, required): Task ID - The ID of the task to delete.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_GET_LIST">
|
||||
<Accordion title="clickup/get_list">
|
||||
**Description:** Get List information in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
- `spaceId` (string, required): Space ID - The ID of the space containing the lists.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_GET_CUSTOM_FIELDS_IN_LIST">
|
||||
<Accordion title="clickup/get_custom_fields_in_list">
|
||||
**Description:** Get Custom Fields in a List in ClickUp.
|
||||
|
||||
**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">
|
||||
<Accordion title="clickup/get_all_fields_in_list">
|
||||
**Description:** Get All Fields in a List in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
- `listId` (string, required): List ID - The ID of the list to get all fields from.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_GET_SPACE">
|
||||
<Accordion title="clickup/get_space">
|
||||
**Description:** Get Space information in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
- `spaceId` (string, optional): Space ID - The ID of the space to retrieve.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_GET_FOLDERS">
|
||||
<Accordion title="clickup/get_folders">
|
||||
**Description:** Get Folders in ClickUp.
|
||||
|
||||
**Parameters:**
|
||||
- `spaceId` (string, required): Space ID - The ID of the space containing the folders.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="CLICKUP_GET_MEMBER">
|
||||
<Accordion title="clickup/get_member">
|
||||
**Description:** Get Member information in ClickUp.
|
||||
|
||||
**Parameters:** None required.
|
||||
@@ -151,19 +167,14 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Get enterprise tools (ClickUp tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create an agent with ClickUp capabilities
|
||||
# Create an agent with Clickup capabilities
|
||||
clickup_agent = Agent(
|
||||
role="Task Manager",
|
||||
goal="Manage tasks and projects in ClickUp efficiently",
|
||||
backstory="An AI assistant specialized in task management and productivity coordination.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['clickup'] # All Clickup actions will be available
|
||||
)
|
||||
|
||||
# Task to create a new task
|
||||
@@ -185,19 +196,12 @@ crew.kickoff()
|
||||
### Filtering Specific ClickUp Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific ClickUp tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["clickup_create_task", "clickup_update_task", "clickup_search_tasks"]
|
||||
)
|
||||
|
||||
task_coordinator = Agent(
|
||||
role="Task Coordinator",
|
||||
goal="Create and manage tasks efficiently",
|
||||
backstory="An AI assistant that focuses on task creation and status management.",
|
||||
tools=enterprise_tools
|
||||
apps=['clickup/create_task']
|
||||
)
|
||||
|
||||
# Task to manage task workflow
|
||||
@@ -219,17 +223,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
project_manager = Agent(
|
||||
role="Project Manager",
|
||||
goal="Coordinate project activities and track team productivity",
|
||||
backstory="An experienced project manager who ensures projects are delivered on time.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['clickup']
|
||||
)
|
||||
|
||||
# Complex task involving multiple ClickUp operations
|
||||
@@ -256,17 +255,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
task_analyst = Agent(
|
||||
role="Task Analyst",
|
||||
goal="Analyze task patterns and optimize team productivity",
|
||||
backstory="An AI assistant that analyzes task data to improve team efficiency.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['clickup']
|
||||
)
|
||||
|
||||
# Task to analyze and optimize task distribution
|
||||
|
||||
@@ -25,7 +25,7 @@ Before using the GitHub integration, ensure you have:
|
||||
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
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -33,10 +33,26 @@ Before using the GitHub integration, ensure you have:
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="GITHUB_CREATE_ISSUE">
|
||||
<Accordion title="github/create_issue">
|
||||
**Description:** Create an issue in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -47,7 +63,7 @@ uv add crewai-tools
|
||||
- `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">
|
||||
<Accordion title="github/update_issue">
|
||||
**Description:** Update an issue in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -61,7 +77,7 @@ uv add crewai-tools
|
||||
- Options: `open`, `closed`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_GET_ISSUE_BY_NUMBER">
|
||||
<Accordion title="github/get_issue_by_number">
|
||||
**Description:** Get an issue by number in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -70,7 +86,7 @@ uv add crewai-tools
|
||||
- `issue_number` (string, required): Issue Number - Specify the number of the issue to fetch.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_LOCK_ISSUE">
|
||||
<Accordion title="github/lock_issue">
|
||||
**Description:** Lock an issue in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -81,7 +97,7 @@ uv add crewai-tools
|
||||
- Options: `off-topic`, `too heated`, `resolved`, `spam`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_SEARCH_ISSUE">
|
||||
<Accordion title="github/search_issue">
|
||||
**Description:** Search for issues in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -108,7 +124,7 @@ uv add crewai-tools
|
||||
Available fields: `assignee`, `creator`, `mentioned`, `labels`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_CREATE_RELEASE">
|
||||
<Accordion title="github/create_release">
|
||||
**Description:** Create a release in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -126,7 +142,7 @@ uv add crewai-tools
|
||||
- Options: `true`, `false`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_UPDATE_RELEASE">
|
||||
<Accordion title="github/update_release">
|
||||
**Description:** Update a release in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -145,7 +161,7 @@ uv add crewai-tools
|
||||
- Options: `true`, `false`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_GET_RELEASE_BY_ID">
|
||||
<Accordion title="github/get_release_by_id">
|
||||
**Description:** Get a release by ID in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -154,7 +170,7 @@ uv add crewai-tools
|
||||
- `id` (string, required): Release ID - Specify the release ID of the release to fetch.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_GET_RELEASE_BY_TAG_NAME">
|
||||
<Accordion title="github/get_release_by_tag_name">
|
||||
**Description:** Get a release by tag name in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -163,7 +179,7 @@ uv add crewai-tools
|
||||
- `tag_name` (string, required): Name - Specify the tag of the release to fetch. (example: "v1.0.0").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GITHUB_DELETE_RELEASE">
|
||||
<Accordion title="github/delete_release">
|
||||
**Description:** Delete a release in GitHub.
|
||||
|
||||
**Parameters:**
|
||||
@@ -179,19 +195,14 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Get enterprise tools (GitHub tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create an agent with GitHub capabilities
|
||||
# Create an agent with Github capabilities
|
||||
github_agent = Agent(
|
||||
role="Repository Manager",
|
||||
goal="Manage GitHub repositories, issues, and releases efficiently",
|
||||
backstory="An AI assistant specialized in repository management and issue tracking.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['github'] # All Github actions will be available
|
||||
)
|
||||
|
||||
# Task to create a new issue
|
||||
@@ -213,19 +224,12 @@ crew.kickoff()
|
||||
### Filtering Specific GitHub Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific GitHub tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["github_create_issue", "github_update_issue", "github_search_issue"]
|
||||
)
|
||||
|
||||
issue_manager = Agent(
|
||||
role="Issue Manager",
|
||||
goal="Create and manage GitHub issues efficiently",
|
||||
backstory="An AI assistant that focuses on issue tracking and management.",
|
||||
tools=enterprise_tools
|
||||
apps=['github/create_issue']
|
||||
)
|
||||
|
||||
# Task to manage issue workflow
|
||||
@@ -247,17 +251,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
release_manager = Agent(
|
||||
role="Release Manager",
|
||||
goal="Manage software releases and versioning",
|
||||
backstory="An experienced release manager who handles version control and release processes.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['github']
|
||||
)
|
||||
|
||||
# Task to create a new release
|
||||
@@ -284,17 +283,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
project_coordinator = Agent(
|
||||
role="Project Coordinator",
|
||||
goal="Track and coordinate project issues and development progress",
|
||||
backstory="An AI assistant that helps coordinate development work and track project progress.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['github']
|
||||
)
|
||||
|
||||
# Complex task involving multiple GitHub operations
|
||||
|
||||
@@ -25,7 +25,7 @@ Before using the Gmail integration, ensure you have:
|
||||
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
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -33,141 +33,122 @@ Before using the Gmail integration, ensure you have:
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="GMAIL_SEND_EMAIL">
|
||||
**Description:** Send an email in Gmail.
|
||||
<Accordion title="gmail/fetch_emails">
|
||||
**Description:** Retrieve a list of messages.
|
||||
|
||||
**Parameters:**
|
||||
- `toRecipients` (array, required): To - Specify the recipients as either a single string or a JSON array.
|
||||
```json
|
||||
[
|
||||
"recipient1@domain.com",
|
||||
"recipient2@domain.com"
|
||||
]
|
||||
```
|
||||
- `from` (string, required): From - Specify the email of the sender.
|
||||
- `subject` (string, required): Subject - Specify the subject of the message.
|
||||
- `messageContent` (string, required): Message Content - Specify the content of the email message as plain text or HTML.
|
||||
- `attachments` (string, optional): Attachments - Accepts either a single file object or a JSON array of file objects.
|
||||
- `additionalHeaders` (object, optional): Additional Headers - Specify any additional header fields here.
|
||||
```json
|
||||
{
|
||||
"reply-to": "Sender Name <sender@domain.com>"
|
||||
}
|
||||
```
|
||||
- `userId` (string, required): The user's email address or 'me' for the authenticated user. (default: "me")
|
||||
- `q` (string, optional): Search query to filter messages (e.g., 'from:someone@example.com is:unread').
|
||||
- `maxResults` (integer, optional): Maximum number of messages to return (1-500). (default: 100)
|
||||
- `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_GET_EMAIL_BY_ID">
|
||||
**Description:** Get an email by ID in Gmail.
|
||||
<Accordion title="gmail/send_email">
|
||||
**Description:** Send an email.
|
||||
|
||||
**Parameters:**
|
||||
- `userId` (string, required): User ID - Specify the user's email address. (example: "user@domain.com").
|
||||
- `messageId` (string, required): Message ID - Specify the ID of the message to retrieve.
|
||||
- `to` (string, required): Recipient email address.
|
||||
- `subject` (string, required): Email subject line.
|
||||
- `body` (string, required): Email message content.
|
||||
- `userId` (string, optional): The user's email address or 'me' for the authenticated user. (default: "me")
|
||||
- `cc` (string, optional): CC email addresses (comma-separated).
|
||||
- `bcc` (string, optional): BCC email addresses (comma-separated).
|
||||
- `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_SEARCH_FOR_EMAIL">
|
||||
**Description:** Search for emails in Gmail using advanced filters.
|
||||
<Accordion title="gmail/delete_email">
|
||||
**Description:** Delete an email by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `emailFilterFormula` (object, optional): A filter in disjunctive normal form - OR of AND groups of single conditions.
|
||||
```json
|
||||
{
|
||||
"operator": "OR",
|
||||
"conditions": [
|
||||
{
|
||||
"operator": "AND",
|
||||
"conditions": [
|
||||
{
|
||||
"field": "from",
|
||||
"operator": "$stringContains",
|
||||
"value": "example@domain.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
Available fields: `from`, `to`, `date`, `label`, `subject`, `cc`, `bcc`, `category`, `deliveredto:`, `size`, `filename`, `older_than`, `newer_than`, `list`, `is:important`, `is:unread`, `is:snoozed`, `is:starred`, `is:read`, `has:drive`, `has:document`, `has:spreadsheet`, `has:presentation`, `has:attachment`, `has:youtube`, `has:userlabels`
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
- `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_DELETE_EMAIL">
|
||||
**Description:** Delete an email in Gmail.
|
||||
<Accordion title="gmail/create_draft">
|
||||
**Description:** Create a new draft email.
|
||||
|
||||
**Parameters:**
|
||||
- `userId` (string, required): User ID - Specify the user's email address. (example: "user@domain.com").
|
||||
- `messageId` (string, required): Message ID - Specify the ID of the message to trash.
|
||||
- `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_CREATE_A_CONTACT">
|
||||
**Description:** Create a contact in Gmail.
|
||||
<Accordion title="gmail/get_message">
|
||||
**Description:** Retrieve a specific message by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `givenName` (string, required): Given Name - Specify the Given Name of the Contact to create. (example: "John").
|
||||
- `familyName` (string, required): Family Name - Specify the Family Name of the Contact to create. (example: "Doe").
|
||||
- `email` (string, required): Email - Specify the Email Address of the Contact to create.
|
||||
- `additionalFields` (object, optional): Additional Fields - Additional contact information.
|
||||
```json
|
||||
{
|
||||
"addresses": [
|
||||
{
|
||||
"streetAddress": "1000 North St.",
|
||||
"city": "Los Angeles"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
- `userId` (string, required): The user's email address or 'me' for the authenticated user. (default: "me")
|
||||
- `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_CONTACT_BY_RESOURCE_NAME">
|
||||
**Description:** Get a contact by resource name in Gmail.
|
||||
<Accordion title="gmail/get_attachment">
|
||||
**Description:** Retrieve a message attachment.
|
||||
|
||||
**Parameters:**
|
||||
- `resourceName` (string, required): Resource Name - Specify the resource name of the contact to fetch.
|
||||
- `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_SEARCH_FOR_CONTACT">
|
||||
**Description:** Search for a contact in Gmail.
|
||||
<Accordion title="gmail/fetch_thread">
|
||||
**Description:** Retrieve a specific email thread by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `searchTerm` (string, required): Term - Specify a search term to search for near or exact matches on the names, nickNames, emailAddresses, phoneNumbers, or organizations Contact properties.
|
||||
- `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 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_DELETE_CONTACT">
|
||||
**Description:** Delete a contact in Gmail.
|
||||
<Accordion title="gmail/modify_thread">
|
||||
**Description:** Modify the labels applied to a thread.
|
||||
|
||||
**Parameters:**
|
||||
- `resourceName` (string, required): Resource Name - Specify the resource name of the contact to delete.
|
||||
- `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 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_CREATE_DRAFT">
|
||||
**Description:** Create a draft in Gmail.
|
||||
<Accordion title="gmail/trash_thread">
|
||||
**Description:** Move a thread to the trash.
|
||||
|
||||
**Parameters:**
|
||||
- `toRecipients` (array, optional): To - Specify the recipients as either a single string or a JSON array.
|
||||
```json
|
||||
[
|
||||
"recipient1@domain.com",
|
||||
"recipient2@domain.com"
|
||||
]
|
||||
```
|
||||
- `from` (string, optional): From - Specify the email of the sender.
|
||||
- `subject` (string, optional): Subject - Specify the subject of the message.
|
||||
- `messageContent` (string, optional): Message Content - Specify the content of the email message as plain text or HTML.
|
||||
- `attachments` (string, optional): Attachments - Accepts either a single file object or a JSON array of file objects.
|
||||
- `additionalHeaders` (object, optional): Additional Headers - Specify any additional header fields here.
|
||||
```json
|
||||
{
|
||||
"reply-to": "Sender Name <sender@domain.com>"
|
||||
}
|
||||
```
|
||||
- `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">
|
||||
**Description:** Remove a thread from the trash.
|
||||
|
||||
**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>
|
||||
|
||||
@@ -177,19 +158,13 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Gmail tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create an agent with Gmail capabilities
|
||||
gmail_agent = Agent(
|
||||
role="Email Manager",
|
||||
goal="Manage email communications and contacts efficiently",
|
||||
goal="Manage email communications and messages efficiently",
|
||||
backstory="An AI assistant specialized in email management and communication.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['gmail'] # All Gmail actions will be available
|
||||
)
|
||||
|
||||
# Task to send a follow-up email
|
||||
@@ -211,19 +186,18 @@ crew.kickoff()
|
||||
### Filtering Specific Gmail Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific Gmail tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["gmail_send_email", "gmail_search_for_email", "gmail_create_draft"]
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create agent with specific Gmail actions only
|
||||
email_coordinator = Agent(
|
||||
role="Email Coordinator",
|
||||
goal="Coordinate email communications and manage drafts",
|
||||
backstory="An AI assistant that focuses on email coordination and draft management.",
|
||||
tools=enterprise_tools
|
||||
apps=[
|
||||
'gmail/send_email',
|
||||
'gmail/fetch_emails',
|
||||
'gmail/create_draft'
|
||||
]
|
||||
)
|
||||
|
||||
# Task to prepare and send emails
|
||||
@@ -241,57 +215,17 @@ crew = Crew(
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Contact Management
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
contact_manager = Agent(
|
||||
role="Contact Manager",
|
||||
goal="Manage and organize email contacts efficiently",
|
||||
backstory="An experienced contact manager who maintains organized contact databases.",
|
||||
tools=[enterprise_tools]
|
||||
)
|
||||
|
||||
# Task to manage contacts
|
||||
contact_task = Task(
|
||||
description="""
|
||||
1. Search for contacts from the 'example.com' domain
|
||||
2. Create new contacts for recent email senders not in the contact list
|
||||
3. Update contact information with recent interaction data
|
||||
""",
|
||||
agent=contact_manager,
|
||||
expected_output="Contact database updated with new contacts and recent interactions"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[contact_manager],
|
||||
tasks=[contact_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Email Search and Analysis
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create agent with Gmail search and analysis capabilities
|
||||
email_analyst = Agent(
|
||||
role="Email Analyst",
|
||||
goal="Analyze email patterns and provide insights",
|
||||
backstory="An AI assistant that analyzes email data to provide actionable insights.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['gmail/fetch_emails', 'gmail/get_message'] # Specific actions for email analysis
|
||||
)
|
||||
|
||||
# Task to analyze email patterns
|
||||
@@ -313,38 +247,37 @@ crew = Crew(
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Automated Email Workflows
|
||||
### Thread Management
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
# Create agent with Gmail thread management capabilities
|
||||
thread_manager = Agent(
|
||||
role="Thread Manager",
|
||||
goal="Organize and manage email threads efficiently",
|
||||
backstory="An AI assistant that specializes in email thread organization and management.",
|
||||
apps=[
|
||||
'gmail/fetch_thread',
|
||||
'gmail/modify_thread',
|
||||
'gmail/trash_thread'
|
||||
]
|
||||
)
|
||||
|
||||
workflow_manager = Agent(
|
||||
role="Email Workflow Manager",
|
||||
goal="Automate email workflows and responses",
|
||||
backstory="An AI assistant that manages automated email workflows and responses.",
|
||||
tools=[enterprise_tools]
|
||||
)
|
||||
|
||||
# Complex task involving multiple Gmail operations
|
||||
workflow_task = Task(
|
||||
# Task to organize email threads
|
||||
thread_task = Task(
|
||||
description="""
|
||||
1. Search for emails with 'urgent' in the subject from the last 24 hours
|
||||
2. Create draft responses for each urgent email
|
||||
3. Send automated acknowledgment emails to senders
|
||||
4. Create a summary report of urgent items requiring attention
|
||||
1. Fetch all threads from the last month
|
||||
2. Apply appropriate labels to organize threads by project
|
||||
3. Archive or trash threads that are no longer relevant
|
||||
""",
|
||||
agent=workflow_manager,
|
||||
expected_output="Urgent emails processed with automated responses and summary report"
|
||||
agent=thread_manager,
|
||||
expected_output="Email threads organized with appropriate labels and cleanup completed"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[workflow_manager],
|
||||
tasks=[workflow_task]
|
||||
agents=[thread_manager],
|
||||
tasks=[thread_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
|
||||
@@ -24,8 +24,8 @@ Before using the Google Calendar integration, ensure you have:
|
||||
1. Navigate to [CrewAI AMP 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 and contact access
|
||||
5. Copy your Enterprise Token from [Account Settings](https://app.crewai.com/crewai_plus/settings/account)
|
||||
4. Grant the necessary permissions for calendar access
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -33,144 +33,140 @@ Before using the Google Calendar integration, ensure you have:
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="GOOGLE_CALENDAR_CREATE_EVENT">
|
||||
**Description:** Create an event in Google Calendar.
|
||||
<Accordion title="google_calendar/get_availability">
|
||||
**Description:** Get calendar availability (free/busy information).
|
||||
|
||||
**Parameters:**
|
||||
- `eventName` (string, required): Event name.
|
||||
- `startTime` (string, required): Start time - Accepts Unix timestamp or ISO8601 date formats.
|
||||
- `endTime` (string, optional): End time - Defaults to one hour after the start time if left blank.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
- `attendees` (string, optional): Attendees - Accepts an array of email addresses or email addresses separated by commas.
|
||||
- `eventLocation` (string, optional): Event location.
|
||||
- `eventDescription` (string, optional): Event description.
|
||||
- `eventId` (string, optional): Event ID - An ID from your application to associate this event with. You can use this ID to sync updates to this event later.
|
||||
- `includeMeetLink` (boolean, optional): Include Google Meet link? - Automatically creates Google Meet conference link for this event.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_UPDATE_EVENT">
|
||||
**Description:** Update an existing event in Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `eventId` (string, required): Event ID - The ID of the event to update.
|
||||
- `eventName` (string, optional): Event name.
|
||||
- `startTime` (string, optional): Start time - Accepts Unix timestamp or ISO8601 date formats.
|
||||
- `endTime` (string, optional): End time - Defaults to one hour after the start time if left blank.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
- `attendees` (string, optional): Attendees - Accepts an array of email addresses or email addresses separated by commas.
|
||||
- `eventLocation` (string, optional): Event location.
|
||||
- `eventDescription` (string, optional): Event description.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_LIST_EVENTS">
|
||||
**Description:** List events from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
- `after` (string, optional): After - Filters events that start after the provided date (Unix in milliseconds or ISO timestamp). (example: "2025-04-12T10:00:00Z or 1712908800000").
|
||||
- `before` (string, optional): Before - Filters events that end before the provided date (Unix in milliseconds or ISO timestamp). (example: "2025-04-12T10:00:00Z or 1712908800000").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_GET_EVENT_BY_ID">
|
||||
**Description:** Get a specific event by ID from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `eventId` (string, required): Event ID.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_DELETE_EVENT">
|
||||
**Description:** Delete an event from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `eventId` (string, required): Event ID - The ID of the calendar event to be deleted.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_GET_CONTACTS">
|
||||
**Description:** Get contacts from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_SEARCH_CONTACTS">
|
||||
**Description:** Search for contacts in Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, optional): Search query to search contacts.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_LIST_DIRECTORY_PEOPLE">
|
||||
**Description:** List directory people.
|
||||
|
||||
**Parameters:**
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_SEARCH_DIRECTORY_PEOPLE">
|
||||
**Description:** Search directory people.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, required): Search query to search contacts.
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_LIST_OTHER_CONTACTS">
|
||||
**Description:** List other contacts.
|
||||
|
||||
**Parameters:**
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_SEARCH_OTHER_CONTACTS">
|
||||
**Description:** Search other contacts.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, optional): Search query to search contacts.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_GET_AVAILABILITY">
|
||||
**Description:** Get availability information for calendars.
|
||||
|
||||
**Parameters:**
|
||||
- `timeMin` (string, required): The start of the interval. In ISO format.
|
||||
- `timeMax` (string, required): The end of the interval. In ISO format.
|
||||
- `timeZone` (string, optional): Time zone used in the response. Optional. The default is UTC.
|
||||
- `items` (array, optional): List of calendars and/or groups to query. Defaults to the user default calendar.
|
||||
- `timeMin` (string, required): Start time (RFC3339 format)
|
||||
- `timeMax` (string, required): End time (RFC3339 format)
|
||||
- `items` (array, required): Calendar IDs to check
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "calendar_id_1"
|
||||
},
|
||||
{
|
||||
"id": "calendar_id_2"
|
||||
"id": "calendar_id"
|
||||
}
|
||||
]
|
||||
```
|
||||
- `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">
|
||||
**Description:** Create a new event in the specified calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID (use 'primary' for main calendar)
|
||||
- `summary` (string, required): Event title/summary
|
||||
- `start_dateTime` (string, required): Start time in RFC3339 format (e.g., 2024-01-20T10:00:00-07:00)
|
||||
- `end_dateTime` (string, required): End time in RFC3339 format
|
||||
- `description` (string, optional): Event description
|
||||
- `timeZone` (string, optional): Time zone (e.g., America/Los_Angeles)
|
||||
- `location` (string, optional): Geographic location of the event as free-form text.
|
||||
- `attendees` (array, optional): List of attendees for the event.
|
||||
```json
|
||||
[
|
||||
{
|
||||
"email": "attendee@example.com",
|
||||
"displayName": "Attendee Name",
|
||||
"optional": false
|
||||
}
|
||||
]
|
||||
```
|
||||
- `reminders` (object, optional): Information about the event's reminders.
|
||||
```json
|
||||
{
|
||||
"useDefault": true,
|
||||
"overrides": [
|
||||
{
|
||||
"method": "email",
|
||||
"minutes": 15
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
- `conferenceData` (object, optional): The conference-related information, such as details of a Google Meet conference.
|
||||
```json
|
||||
{
|
||||
"createRequest": {
|
||||
"requestId": "unique-request-id",
|
||||
"conferenceSolutionKey": {
|
||||
"type": "hangoutsMeet"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
- `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">
|
||||
**Description:** Retrieve events for the specified calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID (use 'primary' for main calendar)
|
||||
- `timeMin` (string, optional): Lower bound for events (RFC3339)
|
||||
- `timeMax` (string, optional): Upper bound for events (RFC3339)
|
||||
- `maxResults` (integer, optional): Maximum number of events (default 10). Minimum: 1, Maximum: 2500
|
||||
- `orderBy` (string, optional): The order of the events returned in the result. Options: startTime, updated. Default: startTime
|
||||
- `singleEvents` (boolean, optional): Whether to expand recurring events into instances and only return single one-off events and instances of recurring events. Default: true
|
||||
- `showDeleted` (boolean, optional): Whether to include deleted events (with status equals cancelled) in the result. Default: false
|
||||
- `showHiddenInvitations` (boolean, optional): Whether to include hidden invitations in the result. Default: false
|
||||
- `q` (string, optional): Free text search terms to find events that match these terms in any field.
|
||||
- `pageToken` (string, optional): Token specifying which result page to return.
|
||||
- `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">
|
||||
**Description:** Update an existing event.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID
|
||||
- `eventId` (string, required): Event ID to update
|
||||
- `summary` (string, optional): Updated event title
|
||||
- `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">
|
||||
**Description:** Delete a specified event.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID
|
||||
- `eventId` (string, required): Event ID to delete
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_calendar/view_calendar_list">
|
||||
**Description:** Retrieve user's calendar list.
|
||||
|
||||
**Parameters:**
|
||||
- `maxResults` (integer, optional): Maximum number of entries returned on one result page. Minimum: 1
|
||||
- `pageToken` (string, optional): Token specifying which result page to return.
|
||||
- `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>
|
||||
|
||||
@@ -180,19 +176,13 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Google Calendar tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create an agent with Google Calendar capabilities
|
||||
calendar_agent = Agent(
|
||||
role="Schedule Manager",
|
||||
goal="Manage calendar events and scheduling efficiently",
|
||||
backstory="An AI assistant specialized in calendar management and scheduling coordination.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['google_calendar'] # All Google Calendar actions will be available
|
||||
)
|
||||
|
||||
# Task to create a meeting
|
||||
@@ -214,19 +204,11 @@ crew.kickoff()
|
||||
### Filtering Specific Calendar Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific Google Calendar tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["google_calendar_create_event", "google_calendar_list_events", "google_calendar_get_availability"]
|
||||
)
|
||||
|
||||
meeting_coordinator = Agent(
|
||||
role="Meeting Coordinator",
|
||||
goal="Coordinate meetings and check availability",
|
||||
backstory="An AI assistant that focuses on meeting scheduling and availability management.",
|
||||
tools=enterprise_tools
|
||||
apps=['google_calendar/create_event', 'google_calendar/get_availability']
|
||||
)
|
||||
|
||||
# Task to schedule a meeting with availability check
|
||||
@@ -248,17 +230,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
event_manager = Agent(
|
||||
role="Event Manager",
|
||||
goal="Manage and update calendar events efficiently",
|
||||
backstory="An experienced event manager who handles event logistics and updates.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['google_calendar']
|
||||
)
|
||||
|
||||
# Task to manage event updates
|
||||
@@ -266,10 +243,10 @@ event_management = Task(
|
||||
description="""
|
||||
1. List all events for this week
|
||||
2. Update any events that need location changes to include video conference links
|
||||
3. Send calendar invitations to new team members for recurring meetings
|
||||
3. Check availability for upcoming meetings
|
||||
""",
|
||||
agent=event_manager,
|
||||
expected_output="Weekly events updated with proper locations and new attendees added"
|
||||
expected_output="Weekly events updated with proper locations and availability checked"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
@@ -280,33 +257,28 @@ crew = Crew(
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Contact and Availability Management
|
||||
### Availability and Calendar Management
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
availability_coordinator = Agent(
|
||||
role="Availability Coordinator",
|
||||
goal="Coordinate availability and manage contacts for scheduling",
|
||||
backstory="An AI assistant that specializes in availability management and contact coordination.",
|
||||
tools=[enterprise_tools]
|
||||
goal="Coordinate availability and manage calendars for scheduling",
|
||||
backstory="An AI assistant that specializes in availability management and calendar coordination.",
|
||||
apps=['google_calendar']
|
||||
)
|
||||
|
||||
# Task to coordinate availability
|
||||
availability_task = Task(
|
||||
description="""
|
||||
1. Search for contacts in the engineering department
|
||||
2. Check availability for all engineers next Friday afternoon
|
||||
1. Get the list of available calendars
|
||||
2. Check availability for all calendars next Friday afternoon
|
||||
3. Create a team meeting for the first available 2-hour slot
|
||||
4. Include Google Meet link and send invitations
|
||||
""",
|
||||
agent=availability_coordinator,
|
||||
expected_output="Team meeting scheduled based on availability with all engineers invited"
|
||||
expected_output="Team meeting scheduled based on availability with all team members invited"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
@@ -321,17 +293,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
scheduling_automator = Agent(
|
||||
role="Scheduling Automator",
|
||||
goal="Automate scheduling workflows and calendar management",
|
||||
backstory="An AI assistant that automates complex scheduling scenarios and calendar workflows.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['google_calendar']
|
||||
)
|
||||
|
||||
# Complex scheduling automation task
|
||||
@@ -365,21 +332,16 @@ crew.kickoff()
|
||||
- Check if calendar sharing settings allow the required access level
|
||||
|
||||
**Event Creation Issues**
|
||||
- Verify that time formats are correct (ISO8601 or Unix timestamps)
|
||||
- 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 ISO format for time ranges when checking availability
|
||||
- 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
|
||||
|
||||
**Contact and People Search**
|
||||
- Ensure search queries are properly formatted
|
||||
- Check that directory access permissions are granted
|
||||
- Verify that contact information is up to date and accessible
|
||||
|
||||
**Event Updates and Deletions**
|
||||
- Verify that event IDs are correct and events exist
|
||||
- Ensure you have edit permissions for the events
|
||||
|
||||
418
docs/en/enterprise/integrations/google_contacts.mdx
Normal file
@@ -0,0 +1,418 @@
|
||||
---
|
||||
title: Google Contacts Integration
|
||||
description: "Contact and directory management with Google Contacts integration for CrewAI."
|
||||
icon: "address-book"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Enable your agents to manage contacts and directory information through Google Contacts. Access personal contacts, search directory people, create and update contact information, and manage contact groups with AI-powered automation.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before using the Google Contacts integration, ensure you have:
|
||||
|
||||
- A [CrewAI AMP](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)
|
||||
|
||||
## Setting Up Google Contacts Integration
|
||||
|
||||
### 1. Connect Your Google Account
|
||||
|
||||
1. Navigate to [CrewAI AMP 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
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
```bash
|
||||
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.
|
||||
</Note>
|
||||
|
||||
```bash
|
||||
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
||||
```
|
||||
|
||||
Or add it to your `.env` file:
|
||||
|
||||
```
|
||||
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
||||
```
|
||||
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="google_contacts/get_contacts">
|
||||
**Description:** Retrieve user's contacts from Google Contacts.
|
||||
|
||||
**Parameters:**
|
||||
- `pageSize` (integer, optional): Number of contacts to return (max 1000). Minimum: 1, Maximum: 1000
|
||||
- `pageToken` (string, optional): The token of the page to retrieve.
|
||||
- `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">
|
||||
**Description:** Search for contacts using a query string.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, required): Search query string
|
||||
- `readMask` (string, required): Fields to read (e.g., 'names,emailAddresses,phoneNumbers')
|
||||
- `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">
|
||||
**Description:** List people in the authenticated user's directory.
|
||||
|
||||
**Parameters:**
|
||||
- `sources` (array, required): Directory sources to search within. Options: DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE, DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT. Default: DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE
|
||||
- `pageSize` (integer, optional): Number of people to return. Minimum: 1, Maximum: 1000
|
||||
- `pageToken` (string, optional): Token specifying which result page to return.
|
||||
- `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">
|
||||
**Description:** Search for people in the directory.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, required): Search query
|
||||
- `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">
|
||||
**Description:** List other contacts (not in user's personal contacts).
|
||||
|
||||
**Parameters:**
|
||||
- `pageSize` (integer, optional): Number of contacts to return. Minimum: 1, Maximum: 1000
|
||||
- `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">
|
||||
**Description:** Search other contacts.
|
||||
|
||||
**Parameters:**
|
||||
- `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">
|
||||
**Description:** Get a single person's contact information by resource name.
|
||||
|
||||
**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">
|
||||
**Description:** Create a new contact in the user's address book.
|
||||
|
||||
**Parameters:**
|
||||
- `names` (array, optional): Person's names
|
||||
```json
|
||||
[
|
||||
{
|
||||
"givenName": "John",
|
||||
"familyName": "Doe",
|
||||
"displayName": "John Doe"
|
||||
}
|
||||
]
|
||||
```
|
||||
- `emailAddresses` (array, optional): Email addresses
|
||||
```json
|
||||
[
|
||||
{
|
||||
"value": "john.doe@example.com",
|
||||
"type": "work"
|
||||
}
|
||||
]
|
||||
```
|
||||
- `phoneNumbers` (array, optional): Phone numbers
|
||||
```json
|
||||
[
|
||||
{
|
||||
"value": "+1234567890",
|
||||
"type": "mobile"
|
||||
}
|
||||
]
|
||||
```
|
||||
- `addresses` (array, optional): Postal addresses
|
||||
```json
|
||||
[
|
||||
{
|
||||
"formattedValue": "123 Main St, City, State 12345",
|
||||
"type": "home"
|
||||
}
|
||||
]
|
||||
```
|
||||
- `organizations` (array, optional): Organizations/companies
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "Company Name",
|
||||
"title": "Job Title",
|
||||
"type": "work"
|
||||
}
|
||||
]
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_contacts/update_contact">
|
||||
**Description:** Update an existing contact's information.
|
||||
|
||||
**Parameters:**
|
||||
- `resourceName` (string, required): The resource name of the person to update (e.g., 'people/c123456789')
|
||||
- `updatePersonFields` (string, required): Fields to update (e.g., 'names,emailAddresses,phoneNumbers')
|
||||
- `names` (array, optional): Person's names
|
||||
- `emailAddresses` (array, optional): Email addresses
|
||||
- `phoneNumbers` (array, optional): Phone numbers
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_contacts/delete_contact">
|
||||
**Description:** Delete a contact from the user's address book.
|
||||
|
||||
**Parameters:**
|
||||
- `resourceName` (string, required): The resource name of the person to delete (e.g., 'people/c123456789')
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_contacts/batch_get_people">
|
||||
**Description:** Get information about multiple people in a single request.
|
||||
|
||||
**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">
|
||||
**Description:** List the user's contact groups (labels).
|
||||
|
||||
**Parameters:**
|
||||
- `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>
|
||||
</AccordionGroup>
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Basic Google Contacts Agent Setup
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create an agent with Google Contacts capabilities
|
||||
contacts_agent = Agent(
|
||||
role="Contact Manager",
|
||||
goal="Manage contacts and directory information efficiently",
|
||||
backstory="An AI assistant specialized in contact management and directory operations.",
|
||||
apps=['google_contacts'] # All Google Contacts actions will be available
|
||||
)
|
||||
|
||||
# Task to retrieve and organize contacts
|
||||
contact_management_task = Task(
|
||||
description="Retrieve all contacts and organize them by company affiliation",
|
||||
agent=contacts_agent,
|
||||
expected_output="Contacts retrieved and organized by company with summary report"
|
||||
)
|
||||
|
||||
# Run the task
|
||||
crew = Crew(
|
||||
agents=[contacts_agent],
|
||||
tasks=[contact_management_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Directory Search and Management
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
directory_manager = Agent(
|
||||
role="Directory Manager",
|
||||
goal="Search and manage directory people and contacts",
|
||||
backstory="An AI assistant that specializes in directory management and people search.",
|
||||
apps=[
|
||||
'google_contacts/search_directory_people',
|
||||
'google_contacts/list_directory_people',
|
||||
'google_contacts/search_contacts'
|
||||
]
|
||||
)
|
||||
|
||||
# Task to search and manage directory
|
||||
directory_task = Task(
|
||||
description="Search for team members in the company directory and create a team contact list",
|
||||
agent=directory_manager,
|
||||
expected_output="Team directory compiled with contact information"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[directory_manager],
|
||||
tasks=[directory_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Contact Creation and Updates
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
contact_curator = Agent(
|
||||
role="Contact Curator",
|
||||
goal="Create and update contact information systematically",
|
||||
backstory="An AI assistant that maintains accurate and up-to-date contact information.",
|
||||
apps=['google_contacts']
|
||||
)
|
||||
|
||||
# Task to create and update contacts
|
||||
curation_task = Task(
|
||||
description="""
|
||||
1. Search for existing contacts related to new business partners
|
||||
2. Create new contacts for partners not in the system
|
||||
3. Update existing contact information with latest details
|
||||
4. Organize contacts into appropriate groups
|
||||
""",
|
||||
agent=contact_curator,
|
||||
expected_output="Contact database updated with new partners and organized groups"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[contact_curator],
|
||||
tasks=[curation_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Contact Group Management
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
group_organizer = Agent(
|
||||
role="Contact Group Organizer",
|
||||
goal="Organize contacts into meaningful groups and categories",
|
||||
backstory="An AI assistant that specializes in contact organization and group management.",
|
||||
apps=['google_contacts']
|
||||
)
|
||||
|
||||
# Task to organize contact groups
|
||||
organization_task = Task(
|
||||
description="""
|
||||
1. List all existing contact groups
|
||||
2. Analyze contact distribution across groups
|
||||
3. Create new groups for better organization
|
||||
4. Move contacts to appropriate groups based on their information
|
||||
""",
|
||||
agent=group_organizer,
|
||||
expected_output="Contacts organized into logical groups with improved structure"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[group_organizer],
|
||||
tasks=[organization_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Comprehensive Contact Management
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
contact_specialist = Agent(
|
||||
role="Contact Management Specialist",
|
||||
goal="Provide comprehensive contact management across all sources",
|
||||
backstory="An AI assistant that handles all aspects of contact management including personal, directory, and other contacts.",
|
||||
apps=['google_contacts']
|
||||
)
|
||||
|
||||
# Complex contact management task
|
||||
comprehensive_task = Task(
|
||||
description="""
|
||||
1. Retrieve contacts from all sources (personal, directory, other)
|
||||
2. Search for duplicate contacts and merge information
|
||||
3. Update outdated contact information
|
||||
4. Create missing contacts for important stakeholders
|
||||
5. Organize contacts into meaningful groups
|
||||
6. Generate a comprehensive contact report
|
||||
""",
|
||||
agent=contact_specialist,
|
||||
expected_output="Complete contact management performed with unified contact database and detailed report"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[contact_specialist],
|
||||
tasks=[comprehensive_task]
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### 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
|
||||
|
||||
### 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.
|
||||
</Card>
|
||||