### Quick Setup Summary Source: https://docs.crewai.com/v1.15.2/en/observability/neatlogs A summary of the installation and initialization steps required to start capturing agent runs. ```bash pip install neatlogs import neatlogs neatlogs.init("YOUR_API_KEY") ``` -------------------------------- ### LangDB and CrewAI Quick Start Source: https://docs.crewai.com/v1.15.2/en/observability/langdb A complete example demonstrating initialization, LLM configuration, and agent execution. ```python import os from pylangdb.crewai import init from crewai import Agent, Task, Crew, LLM # Initialize LangDB before any CrewAI imports init() def create_llm(model): return LLM( model=model, api_key=os.environ.get("LANGDB_API_KEY"), base_url=os.environ.get("LANGDB_API_BASE_URL"), extra_headers={"x-project-id": os.environ.get("LANGDB_PROJECT_ID")} ) # Define your agent researcher = Agent( role="Research Specialist", goal="Research topics thoroughly", backstory="Expert researcher with skills in finding information", llm=create_llm("openai/gpt-4o"), # Replace with the model you want to use verbose=True ) # Create a task task = Task( description="Research the given topic and provide a comprehensive summary", agent=researcher, expected_output="Detailed research summary with key findings" ) # Create and run the crew crew = Crew(agents=[researcher], tasks=[task]) result = crew.kickoff() print(result) ``` -------------------------------- ### Install Linkup SDK Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/linkupsearchtool Command to install the necessary SDK for the LinkupSearchTool. ```shell uv add linkup-sdk ``` -------------------------------- ### Install Dependencies Source: https://docs.crewai.com/v1.15.2/en/concepts/flows Installs the necessary project dependencies. ```bash crewai install ``` -------------------------------- ### Install Daytona Tools Source: https://docs.crewai.com/v1.15.2/en/tools/ai-ml/daytona Install the necessary package using pip or uv. ```shell uv add "crewai-tools[daytona]" # or pip install "crewai-tools[daytona]" ``` -------------------------------- ### Install Weaviate Client Source: https://docs.crewai.com/v1.15.2/en/tools/database-data/weaviatevectorsearchtool Install the necessary Weaviate client library to enable tool functionality. ```shell uv add weaviate-client ``` -------------------------------- ### Install SingleStore Tool Source: https://docs.crewai.com/v1.15.2/en/tools/database-data/singlestoresearchtool Install the necessary package to use the SingleStore search tool. ```shell uv add crewai-tools[singlestore] ``` -------------------------------- ### Install Custom Tool Source: https://docs.crewai.com/v1.15.2/en/guides/tools/publish-custom-tools Methods for installing the published tool using pip or uv. ```bash pip install crewai-geolocate ``` ```bash uv add crewai-geolocate ``` -------------------------------- ### Install Patronus Package Source: https://docs.crewai.com/v1.15.2/en/observability/patronus-evaluation Install the required Patronus package using uv. ```shell uv add patronus ``` -------------------------------- ### Install Qdrant Client Source: https://docs.crewai.com/v1.15.2/en/tools/database-data/qdrantvectorsearchtool Install the necessary dependency to use the Qdrant vector search tool. ```bash uv add qdrant-client ``` -------------------------------- ### Install MCP dependencies Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/youai-search Install the required packages for connecting to the You.com MCP server. ```shell # For DSL (MCPServerHTTP) β€” recommended pip install "mcp>=1.0" # For MCPServerAdapter β€” when you need more control pip install "crewai-tools[mcp]>=0.1" ``` -------------------------------- ### Install Scrapfly SDK Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/scrapflyscrapetool Install the required Scrapfly SDK dependency using uv. ```shell uv add scrapfly-sdk ``` -------------------------------- ### Install Traceloop SDK Source: https://docs.crewai.com/v1.15.2/en/observability/truefoundry Install the required SDK via pip to enable tracing capabilities. ```bash pip install traceloop-sdk ``` -------------------------------- ### Install Bedrock Knowledge Base Retriever Tool Source: https://docs.crewai.com/v1.15.2/en/tools/cloud-storage/bedrockkbretriever Install the necessary package using uv to enable the tool. ```bash uv pip install 'crewai[tools]' ``` -------------------------------- ### Get Availability Items Parameter Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/google_calendar Example structure for the items parameter when checking calendar availability. ```json [ { "id": "calendar_id" } ] ``` -------------------------------- ### Install Multiple Native Providers Source: https://docs.crewai.com/v1.15.2/en/learn/litellm-removal-guide Command to install necessary extras for using multiple native providers simultaneously. ```bash uv add "crewai[openai,anthropic,gemini]" ``` -------------------------------- ### Create and Navigate to React Project Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/react-component-export Commands to initialize a new React application and enter the project directory. ```bash npx create-react-app my-crew-app ``` ```bash cd my-crew-app ``` -------------------------------- ### Start Development Server Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/react-component-export Command to launch the local development server. ```bash npm start ``` -------------------------------- ### GET /getRequiredInputs Source: https://docs.crewai.com/v1.15.2/en/api-reference/inputs Retrieves the list of required input parameters needed to start a specific crew execution. ```APIDOC ## GET /getRequiredInputs ### Description Use this endpoint to discover what inputs you need to provide when starting a crew execution. ### Method GET ### Endpoint /getRequiredInputs ### Response #### Success Response (200) - **inputs** (array) - Array of required input parameter names #### Response Example { "inputs": [ "budget", "interests", "duration", "age" ] } #### Error Responses - **401** - Authentication failed - check your bearer token - **404** - Resource not found - **500** - Internal server error ``` -------------------------------- ### Initiate Crew Assistant Conversation Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/enable-crew-studio Example prompt to provide to the Crew Assistant when starting a new project in Crew Studio. ```markdown I need a crew that can research the latest AI developments and create a summary report. ``` -------------------------------- ### Initialize WebsiteSearchTool Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/websitesearchtool Demonstrates how to initialize the tool for general searches or for a specific website. ```python from crewai_tools import WebsiteSearchTool # Example of initiating tool that agents can use # to search across any discovered websites tool = WebsiteSearchTool() # Example of limiting the search to the content of a specific website, # so now agents can only search within that website tool = WebsiteSearchTool(website='https://example.com') ``` -------------------------------- ### Deployment Creation Output Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/deploy-to-amp Example output after successfully creating a deployment. ```shell Deployment created successfully! Name: your_project_name Deployment ID: 01234567-89ab-cdef-0123-456789abcdef Current Status: Deploy Enqueued ``` -------------------------------- ### Agent Setup Prompt Source: https://docs.crewai.com/index A prompt template for configuring a development environment for CrewAI, including Python version checks, CLI installation, and project initialization. ```javascript async (event) => { const prompt = `Set up this environment so I can build with CrewAI. First install the official CrewAI coding-agent skills if this environment supports npx: npx skills add crewaiinc/skills If npx is missing or the current agent cannot load skills, do not fail the whole setup. Report the exact issue and continue using the CrewAI docs directly. Use these CrewAI docs as source of truth before making assumptions: - https://skills.crewai.com - https://docs.crewai.com/llms.txt - https://docs.crewai.com/en/installation - https://docs.crewai.com/en/guides/coding-tools/build-with-ai Setup steps: 1. Check python3 --version. CrewAI requires Python >=3.10 and <3.14. 2. Install uv if missing: curl -LsSf https://astral.sh/uv/install.sh | sh 3. Source the uv environment if needed: source "$HOME/.local/bin/env" 4. Install the CrewAI CLI: uv tool install crewai 5. Verify the CLI: crewai version crewai create --help 6. Create a project: CREWAI_DMN=true crewai create 7. After project creation, inspect the generated files before editing. 8. Run: crewai install crewai run Do not hardcode API keys. Use .env. Do not invent CLI flags. Validate with crewai --help or crewai create --help. If a command fails, show the exact command and error, explain the likely cause, fix what you can safely fix, and retry once.`; const button = event.currentTarget; const resetTimeout = button.dataset.resetTimeout; if (resetTimeout) { window.clearTimeout(Number(resetTimeout)); } try { await navigator.clipboard.writeText(prompt); button.textContent = "Copied"; } catch { button.textContent = "Copy failed"; } finally { button.dataset.resetTimeout = String(window.setTimeout(() => { button.textContent = "Copy agent setup prompt"; delete button.dataset.resetTimeout; }, 1600)); } } ``` -------------------------------- ### Coding Agent Setup Prompt Source: https://docs.crewai.com/v1.15.2/en/installation A comprehensive prompt for configuring coding agents like Claude Code or Cursor to work with CrewAI. It includes steps for installing dependencies, setting up the CLI, and initializing a project. ```bash Set up this environment so I can build with CrewAI. First install the official CrewAI coding-agent skills if this environment supports npx: npx skills add crewaiinc/skills If npx is missing or the current agent cannot load skills, do not fail the whole setup. Report the exact issue and continue using the CrewAI docs directly. Use these CrewAI docs as source of truth before making assumptions: - https://skills.crewai.com - https://docs.crewai.com/llms.txt - https://docs.crewai.com/en/installation - https://docs.crewai.com/en/guides/coding-tools/build-with-ai Setup steps: 1. Check python3 --version. CrewAI requires Python >=3.10 and <3.14. 2. Install uv if missing: curl -LsSf https://astral.sh/uv/install.sh | sh 3. Source the uv environment if needed: source "$HOME/.local/bin/env" 4. Install the CrewAI CLI: uv tool install crewai 5. Verify the CLI: crewai version crewai create --help 6. Create a project: CREWAI_DMN=true crewai create 7. After project creation, inspect the generated files before editing. 8. Run: crewai install crewai run Do not hardcode API keys. Use .env. Do not invent CLI flags. Validate with crewai --help or crewai create --help. If a command fails, show the exact command and error, explain the likely cause, fix what you can safely fix, and retry once. ``` -------------------------------- ### Instantiate an Agent in Python Source: https://docs.crewai.com/v1.15.2/en/concepts/agents Comprehensive example showing all available parameters for the Agent class. ```python from crewai import Agent from crewai_tools import SerperDevTool # Create an agent with all available parameters agent = Agent( role="Senior Data Scientist", goal="Analyze and interpret complex datasets to provide actionable insights", backstory="With over 10 years of experience in data science and machine learning, " "you excel at finding patterns in complex datasets.", llm="gpt-4", # Default: OPENAI_MODEL_NAME or "gpt-4" function_calling_llm=None, # Optional: Separate LLM for tool calling verbose=False, # Default: False allow_delegation=False, # Default: False max_iter=20, # Default: 20 iterations max_rpm=None, # Optional: Rate limit for API calls max_execution_time=None, # Optional: Maximum execution time in seconds max_retry_limit=2, # Default: 2 retries on error allow_code_execution=False, # Default: False code_execution_mode="safe", # Default: "safe" (options: "safe", "unsafe") respect_context_window=True, # Default: True use_system_prompt=True, # Default: True multimodal=False, # Default: False inject_date=False, # Default: False date_format="%Y-%m-%d", # Default: ISO format reasoning=False, # Default: False max_reasoning_attempts=None, # Default: None tools=[SerperDevTool()], # Optional: List of tools knowledge_sources=None, # Optional: List of knowledge sources embedder=None, # Optional: Custom embedder configuration system_template=None, # Optional: Custom system prompt template prompt_template=None, # Optional: Custom prompt template response_template=None, # Optional: Custom response template step_callback=None, # Optional: Callback function for monitoring ) ``` -------------------------------- ### Basic Google Drive Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/google_drive Initializes an agent with full Google Drive capabilities by including 'google_drive' in the apps list. ```python from crewai import Agent, Task, Crew # Create an agent with Google Drive capabilities drive_agent = Agent( role="File Manager", goal="Manage files and folders in Google Drive efficiently", backstory="An AI assistant specialized in document and file management.", apps=['google_drive'] # All Google Drive actions will be available ) # Task to organize files organize_files_task = Task( description="List all files in the root directory and organize them into appropriate folders", agent=drive_agent, expected_output="Summary of files organized with folder structure" ) # Run the task crew = Crew( agents=[drive_agent], tasks=[organize_files_task] ) crew.kickoff() ``` -------------------------------- ### Interact directly with an agent using kickoff() Source: https://docs.crewai.com/v1.15.2/en/concepts/agents Demonstrates initializing an agent and executing a direct query using the kickoff method. ```python from crewai import Agent from crewai_tools import SerperDevTool # Create an agent researcher = Agent( role="AI Technology Researcher", goal="Research the latest AI developments", tools=[SerperDevTool()], verbose=True ) # Use kickoff() to interact directly with the agent result = researcher.kickoff("What are the latest developments in language models?") # Access the raw response print(result.raw) ``` -------------------------------- ### Install crewai_tools Source: https://docs.crewai.com/v1.15.2/en/tools/file-document/docxsearchtool Install the necessary packages to use the DOCXSearchTool. ```shell uv pip install docx2txt 'crewai[tools]' ``` -------------------------------- ### Install CrewAI Source: https://docs.crewai.com/v1.15.2/en/concepts/cli Install the library to enable CLI functionality. ```shell pip install crewai ``` -------------------------------- ### Initialize Tool with Predefined Parameters Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/scrapeelementfromwebsitetool Configure the tool with a specific website URL and CSS selector upon initialization. ```python # Initialize the tool with predefined parameters scrape_tool = ScrapeElementFromWebsiteTool( website_url="https://www.example.com", css_element=".main-content" ) ``` -------------------------------- ### Install SeleniumScrapingTool dependencies Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/seleniumscrapingtool Install the necessary packages to use the SeleniumScrapingTool. ```shell pip install 'crewai[tools]' uv add selenium webdriver-manager ``` -------------------------------- ### Basic Shopify Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/shopify Initializes an agent with full Shopify capabilities and executes a customer creation task. ```python from crewai import Agent, Task, Crew from crewai import Agent, Task, Crew # Create an agent with Shopify capabilities shopify_agent = Agent( role="E-commerce Manager", goal="Manage online store operations and customer relationships efficiently", backstory="An AI assistant specialized in e-commerce operations and online store management.", apps=['shopify'] # All Shopify actions will be available ) # Task to create a new customer create_customer_task = Task( description="Create a new VIP customer Jane Smith with email jane.smith@example.com and phone +1-555-0123", agent=shopify_agent, expected_output="Customer created successfully with customer ID" ) # Run the task crew = Crew( agents=[shopify_agent], tasks=[create_customer_task] ) crew.kickoff() ``` -------------------------------- ### Initialize and Use SerpApiGoogleShoppingTool Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/serpapi-googleshoppingtool Example showing how to instantiate the tool and assign it to a CrewAI agent for searching products. ```python from crewai import Agent, Task, Crew from crewai_tools import SerpApiGoogleShoppingTool tool = SerpApiGoogleShoppingTool() agent = Agent( role="Shopping Researcher", goal="Find relevant products", backstory="Expert in product search", tools=[tool], verbose=True, ) task = Task( description="Search Google Shopping for 'wireless noise-canceling headphones'", expected_output="Top relevant products with titles and links", agent=agent, ) crew = Crew(agents=[agent], tasks=[task]) result = crew.kickoff() ``` -------------------------------- ### Install Hyperbrowser SDK Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/hyperbrowserloadtool Install the necessary SDK to use the HyperbrowserLoadTool. ```shell uv add hyperbrowser ``` -------------------------------- ### Basic GitHub Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/github Initializes an agent with full GitHub capabilities by setting the apps parameter to ['github']. ```python from crewai import Agent, Task, Crew from crewai import Agent, Task, Crew # 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.", apps=['github'] # All Github actions will be available ) # Task to create a new issue create_issue_task = Task( description="Create a bug report issue for the login functionality in the main repository", agent=github_agent, expected_output="Issue created successfully with issue number" ) # Run the task crew = Crew( agents=[github_agent], tasks=[create_issue_task] ) crew.kickoff() ``` -------------------------------- ### Basic Asana Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/asana Initializes an agent with full access to all Asana tools by including 'asana' in the apps list. ```python from crewai import Agent, Task, Crew # 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.", apps=['asana'] # All Asana actions will be available ) # Task to create a new project create_project_task = Task( description="Create a new project called 'Q1 Marketing Campaign' in the Marketing workspace", agent=asana_agent, expected_output="Confirmation that the project was created successfully with project ID" ) # Run the task crew = Crew( agents=[asana_agent], tasks=[create_project_task] ) crew.kickoff() ``` -------------------------------- ### Install LlamaIndex Source: https://docs.crewai.com/v1.15.2/en/tools/ai-ml/llamaindextool Install the necessary LlamaIndex package via uv. ```shell uv add llama-index ``` -------------------------------- ### Install React Dependencies Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/react-component-export Command to install the required react-dom package. ```bash npm install react-dom ``` -------------------------------- ### Basic ClickUp Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/clickup Initializes an agent with full ClickUp capabilities to manage tasks and projects. ```python from crewai import Agent, Task, Crew from crewai import Agent, Task, Crew # 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.", apps=['clickup'] # All Clickup actions will be available ) # Task to create a new task create_task = Task( description="Create a task called 'Review Q1 Reports' in the Marketing list with high priority", agent=clickup_agent, expected_output="Task created successfully with task ID" ) # Run the task crew = Crew( agents=[clickup_agent], tasks=[create_task] ) crew.kickoff() ``` -------------------------------- ### Install Scrapegraph Python Client Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/scrapegraphscrapetool Install the necessary dependency to use the ScrapegraphScrapeTool. ```shell uv add scrapegraph-py ``` -------------------------------- ### Example Planning Output Source: https://docs.crewai.com/v1.15.2/en/concepts/planning Sample output generated by the AgentPlanner showing the step-by-step logic for task execution. ```markdown [2024-07-15 16:49:11][INFO]: Planning the crew execution **Step-by-Step Plan for Task Execution** **Task Number 1: Conduct a thorough research about AI LLMs** **Agent:** AI LLMs Senior Data Researcher **Agent Goal:** Uncover cutting-edge developments in AI LLMs **Task Expected Output:** A list with 10 bullet points of the most relevant information about AI LLMs **Task Tools:** None specified **Agent Tools:** None specified **Step-by-Step Plan:** 1. **Define Research Scope:** - Determine the specific areas of AI LLMs to focus on, such as advancements in architecture, use cases, ethical considerations, and performance metrics. 2. **Identify Reliable Sources:** - List reputable sources for AI research, including academic journals, industry reports, conferences (e.g., NeurIPS, ACL), AI research labs (e.g., OpenAI, Google AI), and online databases (e.g., IEEE Xplore, arXiv). 3. **Collect Data:** - Search for the latest papers, articles, and reports published in 2024 and early 2025. - Use keywords like "Large Language Models 2025", "AI LLM advancements", "AI ethics 2025", etc. 4. **Analyze Findings:** - Read and summarize the key points from each source. - Highlight new techniques, models, and applications introduced in the past year. 5. **Organize Information:** - Categorize the information into relevant topics (e.g., new architectures, ethical implications, real-world applications). - Ensure each bullet point is concise but informative. 6. **Create the List:** - Compile the 10 most relevant pieces of information into a bullet point list. - Review the list to ensure clarity and relevance. **Expected Output:** A list with 10 bullet points of the most relevant information about AI LLMs. --- **Task Number 2: Review the context you got and expand each topic into a full section for a report** **Agent:** AI LLMs Reporting Analyst **Agent Goal:** Create detailed reports based on AI LLMs data analysis and research findings **Task Expected Output:** A fully fledged report with the main topics, each with a full section of information. Formatted as markdown without '```' **Task Tools:** None specified **Agent Tools:** None specified **Step-by-Step Plan:** 1. **Review the Bullet Points:** - Carefully read through the list of 10 bullet points provided by the AI LLMs Senior Data Researcher. 2. **Outline the Report:** - Create an outline with each bullet point as a main section heading. - Plan sub-sections under each main heading to cover different aspects of the topic. 3. **Research Further Details:** - For each bullet point, conduct additional research if necessary to gather more detailed information. - Look for case studies, examples, and statistical data to support each section. 4. **Write Detailed Sections:** - Expand each bullet point into a comprehensive section. - Ensure each section includes an introduction, detailed explanation, examples, and a conclusion. - Use markdown formatting for headings, subheadings, lists, and emphasis. 5. **Review and Edit:** - Proofread the report for clarity, coherence, and correctness. - Make sure the report flows logically from one section to the next. - Format the report according to markdown standards. 6. **Finalize the Report:** - Ensure the report is complete with all sections expanded and detailed. - Double-check formatting and make any necessary adjustments. **Expected Output:** A fully fledged report with the main topics, each with a full section of information. Formatted as markdown without '```'. ``` -------------------------------- ### Basic Google Docs Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/google_docs Initializes an agent with general Google Docs capabilities to create and manage documents. ```python from crewai import Agent, Task, Crew # Create an agent with Google Docs capabilities docs_agent = Agent( role="Document Creator", goal="Create and manage Google Docs documents efficiently", backstory="An AI assistant specialized in Google Docs document creation and editing.", apps=['google_docs'] # All Google Docs actions will be available ) # Task to create a new document create_doc_task = Task( description="Create a new Google Document titled 'Project Status Report'", agent=docs_agent, expected_output="New Google Document 'Project Status Report' created successfully" ) # Run the task crew = Crew( agents=[docs_agent], tasks=[create_doc_task] ) crew.kickoff() ``` -------------------------------- ### Install Stagehand Python SDK Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/stagehandtool Install the required dependency to use the StagehandTool. ```bash pip install stagehand-py ``` -------------------------------- ### Install Dependencies Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/scrapeelementfromwebsitetool Install the necessary packages to enable web scraping functionality. ```shell uv add requests beautifulsoup4 ``` -------------------------------- ### Initialize ExaSearchTool with highlights Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/exasearchtool Configure the tool to return token-efficient excerpts and integrate it into a CrewAI Agent. ```python # Get token-efficient excerpts most relevant to the query exa_tool = ExaSearchTool( highlights=True, type="auto", ) # Use it in an agent agent = Agent( role="Researcher", goal="Answer questions with current web data", tools=[exa_tool] ) ``` -------------------------------- ### Install Snowflake dependencies Source: https://docs.crewai.com/v1.15.2/en/tools/database-data/snowflakesearchtool Commands to install the necessary packages for using the SnowflakeSearchTool. ```shell uv add cryptography snowflake-connector-python snowflake-sqlalchemy ``` ```shell uv sync --extra snowflake ``` -------------------------------- ### Basic Notion Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/notion Initializes an agent with full Notion capabilities to manage workspace users. ```python from crewai import Agent, Task, Crew # Create an agent with Notion capabilities notion_agent = Agent( role="Workspace Manager", goal="Manage workspace users and facilitate collaboration through comments", backstory="An AI assistant specialized in user management and team collaboration.", apps=['notion'] # All Notion actions will be available ) # Task to list workspace users user_management_task = Task( description="List all users in the workspace and provide a summary of team members", agent=notion_agent, expected_output="Complete list of workspace users with their details" ) # Run the task crew = Crew( agents=[notion_agent], tasks=[user_management_task] ) crew.kickoff() ``` -------------------------------- ### Initialize ImageFile from various sources Source: https://docs.crewai.com/v1.15.2/en/concepts/files Demonstrates creating an ImageFile instance from a local file path, a URL, or raw byte data. ```python from crewai_files import ImageFile image = ImageFile(source="./images/chart.png") ``` ```python from crewai_files import ImageFile image = ImageFile(source="https://example.com/image.png") ``` ```python from crewai_files import ImageFile, FileBytes image_bytes = download_image_from_api() image = ImageFile(source=FileBytes(data=image_bytes, filename="downloaded.png")) image = ImageFile(source=image_bytes) ``` -------------------------------- ### Basic SharePoint Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/microsoft_sharepoint Initializes an agent with full SharePoint access to list sites and organize content. ```python from crewai import Agent, Task, Crew # Create an agent with SharePoint capabilities sharepoint_agent = Agent( role="SharePoint Manager", goal="Manage SharePoint sites, lists, and documents efficiently", backstory="An AI assistant specialized in SharePoint content management and collaboration.", apps=['microsoft_sharepoint'] # All SharePoint actions will be available ) # Task to organize SharePoint content content_organization_task = Task( description="List all accessible SharePoint sites and organize content by department", agent=sharepoint_agent, expected_output="SharePoint sites listed and content organized by department" ) # Run the task crew = Crew( agents=[sharepoint_agent], tasks=[content_organization_task] ) crew.kickoff() ``` -------------------------------- ### Install MultiOn Package Source: https://docs.crewai.com/v1.15.2/en/tools/automation/multiontool Install the necessary MultiOn package via uv. ```shell uv add multion ``` -------------------------------- ### Install OpenLIT SDK Source: https://docs.crewai.com/v1.15.2/en/observability/openlit Install the OpenLIT Python package via pip. ```shell pip install openlit ``` -------------------------------- ### Basic Box Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/box Initializes an agent with full Box capabilities by including 'box' in the apps list. ```python from crewai import Agent, Task, Crew 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.", apps=['box'] # All Box actions will be available ) # Task to create a folder structure create_structure_task = Task( description="Create a folder called 'Project Files' in the root directory and upload a document from URL", agent=box_agent, expected_output="Folder created and file uploaded successfully" ) # Run the task crew = Crew( agents=[box_agent], tasks=[create_structure_task] ) crew.kickoff() ``` -------------------------------- ### Install Required Packages Source: https://docs.crewai.com/v1.15.2/en/observability/weave Install the necessary dependencies for CrewAI and Weave integration. ```shell pip install crewai weave ``` -------------------------------- ### Initialize and Use NL2SQLTool Source: https://docs.crewai.com/v1.15.2/en/tools/database-data/nl2sqltool Configure the tool with a database URI and assign it to an agent. ```python from crewai_tools import NL2SQLTool # psycopg2 was installed to run this example with PostgreSQL nl2sql = NL2SQLTool(db_uri="postgresql://example@localhost:5432/test_db") @agent def researcher(self) -> Agent: return Agent( config=self.agents_config["researcher"], allow_delegation=False, tools=[nl2sql] ) ``` -------------------------------- ### Install Neatlogs SDK Source: https://docs.crewai.com/v1.15.2/en/observability/neatlogs Install the required Python package for Neatlogs integration. ```bash pip install neatlogs ``` -------------------------------- ### Basic Stripe Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/stripe Initializes an agent with Stripe capabilities to perform basic customer creation tasks. ```python from crewai import Agent, Task, Crew from crewai import Agent, Task, Crew # Create an agent with Stripe capabilities stripe_agent = Agent( role="Payment Manager", goal="Manage customer payments, subscriptions, and billing operations efficiently", backstory="An AI assistant specialized in payment processing and subscription management.", apps=['stripe'] # All Stripe actions will be available ) # Task to create a new customer create_customer_task = Task( description="Create a new premium customer John Doe with email john.doe@example.com", agent=stripe_agent, expected_output="Customer created successfully with customer ID" ) # Run the task crew = Crew( agents=[stripe_agent], tasks=[create_customer_task] ) crew.kickoff() ``` -------------------------------- ### Install Dependencies Source: https://docs.crewai.com/v1.15.2/en/observability/langfuse Install the necessary packages including langfuse, openlit, and crewai. ```python %pip install langfuse openlit crewai crewai_tools ``` -------------------------------- ### Install Galileo dependencies Source: https://docs.crewai.com/v1.15.2/en/observability/galileo Install the necessary Galileo package using uv. ```bash uv add galileo ``` -------------------------------- ### Basic HubSpot Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/hubspot Initializes an agent with full HubSpot capabilities by including 'hubspot' in the apps list. ```python from crewai import Agent, Task, Crew # Create an agent with HubSpot capabilities hubspot_agent = Agent( role="CRM Manager", goal="Manage company and contact records in HubSpot", backstory="An AI assistant specialized in CRM management.", apps=['hubspot'] # All HubSpot actions will be available ) # Task to create a new company create_company_task = Task( description="Create a new company in HubSpot with name 'Innovate Corp' and domain 'innovatecorp.com'.", agent=hubspot_agent, expected_output="Company created successfully with confirmation" ) # Run the task crew = Crew( agents=[hubspot_agent], tasks=[create_company_task] ) crew.kickoff() ``` -------------------------------- ### Install CrewAI CLI Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/deploy-to-amp Install the CrewAI CLI with necessary tools dependencies. ```bash pip install crewai[tools] ``` -------------------------------- ### Initialize and Use LinkupSearchTool Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/linkupsearchtool Example showing how to initialize the tool with an API key and assign it to a CrewAI agent. ```python from crewai_tools import LinkupSearchTool from crewai import Agent import os # Initialize the tool with your API key linkup_tool = LinkupSearchTool(api_key=os.getenv("LINKUP_API_KEY")) # Define an agent that uses the tool @agent def researcher(self) -> Agent: ''' This agent uses the LinkupSearchTool to retrieve contextual information from the Linkup API. ''' return Agent( config=self.agents_config["researcher"], tools=[linkup_tool] ) ``` -------------------------------- ### Initialize and Use SingleStoreSearchTool Source: https://docs.crewai.com/v1.15.2/en/tools/database-data/singlestoresearchtool Configure the tool with database credentials and integrate it into a CrewAI agent. ```python from crewai import Agent, Task, Crew from crewai_tools import SingleStoreSearchTool tool = SingleStoreSearchTool( tables=["products"], host="host", user="user", password="pass", database="db", ) agent = Agent( role="Analyst", goal="Query SingleStore", tools=[tool], verbose=True, ) task = Task( description="List 5 products", expected_output="5 rows as JSON/text", agent=agent, ) crew = Crew( agents=[agent], tasks=[task], verbose=True, ) result = crew.kickoff() ``` -------------------------------- ### Install Oxylabs tools Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/oxylabsscraperstool Install the necessary packages to use Oxylabs scrapers with CrewAI. ```shell pip install 'crewai[tools]' oxylabs ``` -------------------------------- ### Basic Linear Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/linear Initializes an agent with full access to Linear capabilities to manage issues. ```python from crewai import Agent, Task, Crew from crewai import Agent, Task, Crew # Create an agent with Linear capabilities linear_agent = Agent( role="Development Manager", goal="Manage Linear issues and track development progress efficiently", backstory="An AI assistant specialized in software development project management.", apps=['linear'] # All Linear actions will be available ) # Task to create a bug report create_bug_task = Task( description="Create a high-priority bug report for the authentication system and assign it to the backend team", agent=linear_agent, expected_output="Bug report created successfully with issue ID" ) # Run the task crew = Crew( agents=[linear_agent], tasks=[create_bug_task] ) crew.kickoff() ``` -------------------------------- ### Initialize and Configure RagTool Source: https://docs.crewai.com/v1.15.2/en/tools/ai-ml/ragtool Demonstrates how to instantiate the RagTool, add data sources, and assign it to an agent. ```python from crewai_tools import RagTool # Create a RAG tool with default settings rag_tool = RagTool() # Add content from a file rag_tool.add(data_type="file", path="path/to/your/document.pdf") # Add content from a web page rag_tool.add(data_type="web_page", url="https://example.com") # Define an agent with the RagTool @agent def knowledge_expert(self) -> Agent: ''' This agent uses the RagTool to answer questions about the knowledge base. ''' return Agent( config=self.agents_config["knowledge_expert"], allow_delegation=False, tools=[rag_tool] ) ``` -------------------------------- ### Install Browserbase SDK and CrewAI Tools Source: https://docs.crewai.com/v1.15.2/en/tools/web-scraping/browserbaseloadtool Install the necessary packages to use the BrowserbaseLoadTool. ```shell pip install browserbase 'crewai[tools]' ``` -------------------------------- ### Basic Gmail Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/gmail Initializes an agent with full Gmail capabilities by including 'gmail' in the apps list. ```python from crewai import Agent, Task, Crew # Create an agent with Gmail capabilities gmail_agent = Agent( role="Email Manager", goal="Manage email communications and messages efficiently", backstory="An AI assistant specialized in email management and communication.", apps=['gmail'] # All Gmail actions will be available ) # Task to send a follow-up email send_email_task = Task( description="Send a follow-up email to john@example.com about the project update meeting", agent=gmail_agent, expected_output="Email sent successfully with confirmation" ) # Run the task crew = Crew( agents=[gmail_agent], tasks=[send_email_task] ) crew.kickoff() ``` -------------------------------- ### Set Up Environment Variables Source: https://docs.crewai.com/v1.15.2/en/observability/langfuse Configure the required API keys and host settings for Langfuse and OpenAI. ```python import os # Get keys for your project from the project settings page: https://cloud.langfuse.com os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-lf-..." os.environ["LANGFUSE_SECRET_KEY"] = "sk-lf-..." os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com" # πŸ‡ͺπŸ‡Ί EU region # os.environ["LANGFUSE_HOST"] = "https://us.cloud.langfuse.com" # πŸ‡ΊπŸ‡Έ US region # Your OpenAI key os.environ["OPENAI_API_KEY"] = "sk-proj-..." ``` -------------------------------- ### Install Databricks Tool Source: https://docs.crewai.com/v1.15.2/en/tools/search-research/databricks-query-tool Install the necessary dependencies for the Databricks tool using uv. ```shell uv add crewai-tools[databricks-sdk] ``` -------------------------------- ### Install S3ReaderTool dependencies Source: https://docs.crewai.com/v1.15.2/en/tools/cloud-storage/s3readertool Install the required boto3 library to enable S3 interaction. ```shell uv add boto3 ``` -------------------------------- ### Project Entry Points Source: https://docs.crewai.com/v1.15.2/en/enterprise/guides/prepare-for-deployment Define how to execute the project, whether via CLI or Python entry points. ```bash crewai run ``` ```python # src/my_crew/main.py from my_crew.crew import MyCrew def run(): """Run the crew.""" inputs = {'topic': 'AI in Healthcare'} result = MyCrew().crew().kickoff(inputs=inputs) return result if __name__ == "__main__": run() ``` ```python # src/my_flow/main.py from crewai.flow import Flow, listen, start from my_flow.crews.poem_crew.poem_crew import PoemCrew class MyFlow(Flow): @start() def begin(self): # Flow logic here result = PoemCrew().crew().kickoff(inputs={...}) return result def kickoff(): """Run the flow.""" MyFlow().kickoff() if __name__ == "__main__": kickoff() ``` -------------------------------- ### Install E2B tools Source: https://docs.crewai.com/v1.15.2/en/tools/ai-ml/e2bsandboxtools Install the necessary dependencies for using E2B tools with CrewAI. ```shell uv add "crewai-tools[e2b]" ``` -------------------------------- ### Basic Jira Agent Setup Source: https://docs.crewai.com/v1.15.2/en/enterprise/integrations/jira Initializes an agent with Jira capabilities and executes a bug report creation task. ```python from crewai import Agent, Task, Crew from crewai import Agent, Task, Crew # Create an agent with Jira capabilities jira_agent = Agent( role="Issue Manager", goal="Manage Jira issues and track project progress efficiently", backstory="An AI assistant specialized in issue tracking and project management.", apps=['jira'] # All Jira actions will be available ) # Task to create a bug report create_bug_task = Task( description="Create a bug report for the login functionality with high priority and assign it to the development team", agent=jira_agent, expected_output="Bug report created successfully with issue key" ) # Run the task crew = Crew( agents=[jira_agent], tasks=[create_bug_task] ) crew.kickoff() ``` -------------------------------- ### Install Minds SDK Source: https://docs.crewai.com/v1.15.2/en/tools/ai-ml/aimindtool Install the required Minds SDK package via shell. ```shell uv add minds-sdk ```