Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
Used model-agnostic examples in quickstart/firsts. (#2773)
Mark McDonalde3887ae36e6f
diff --git a/docs/guides/crews/first-crew.mdx b/docs/guides/crews/first-crew.mdxindex 8eb2619d1..db770c0de 100644--- a/docs/guides/crews/first-crew.mdx+++ b/docs/guides/crews/first-crew.mdx@@ -35,7 +35,8 @@ Let's get started building your first crew!Before starting, make sure you have:1. Installed CrewAI following the [installation guide](/installation)-2. Set up your OpenAI API key in your environment variables+2. Set up your LLM API key in your environment, following the [LLM setup+ guide](/concepts/llms#setting-up-your-llm)3. Basic understanding of Python## Step 1: Create a New CrewAI Project@@ -92,7 +93,8 @@ For our research crew, we'll create two agents:1. A **researcher** who excels at finding and organizing information2. An **analyst** who can interpret research findings and create insightful reports-Let's modify the `agents.yaml` file to define these specialized agents:+Let's modify the `agents.yaml` file to define these specialized agents. Be sure+to set `llm` to the provider you are using.```yaml# src/research_crew/config/agents.yaml@@ -107,7 +109,7 @@ researcher:finding relevant information from various sources. You excel atorganizing information in a clear and structured manner, makingcomplex topics accessible to others.- llm: openai/gpt-4o-mini+ llm: provider/model-id # e.g. openai/gpt-4o, google/gemini-2.0-flash, anthropic/claude...analyst:role: >@@ -120,7 +122,7 @@ analyst:and technical writing. You have a talent for identifying patternsand extracting meaningful insights from research data, thencommunicating those insights effectively through well-crafted reports.- llm: openai/gpt-4o-mini+ llm: provider/model-id # e.g. openai/gpt-4o, google/gemini-2.0-flash, anthropic/claude...```Notice how each agent has a distinct role, goal, and backstory. These elements aren't just descriptive - they actively shape how the agent approaches its tasks. By crafting these carefully, you can create agents with specialized skills and perspectives that complement each other.@@ -282,12 +284,12 @@ This script prepares the environment, specifies our research topic, and kicks ofCreate a `.env` file in your project root with your API keys:-```-OPENAI_API_KEY=your_openai_api_key+```shSERPER_API_KEY=your_serper_api_key+# Add your provider's API key here too.```-You can get a Serper API key from [Serper.dev](https://serper.dev/).+See the [LLM Setup guide](/concepts/llms#setting-up-your-llm) for details on configuring your provider of choice. You can get a Serper API key from [Serper.dev](https://serper.dev/).## Step 8: Install Dependenciesdiff --git a/docs/guides/flows/first-flow.mdx b/docs/guides/flows/first-flow.mdxindex d5784f0a9..fab6f8e42 100644--- a/docs/guides/flows/first-flow.mdx+++ b/docs/guides/flows/first-flow.mdx@@ -45,7 +45,8 @@ Let's dive in and build your first flow!Before starting, make sure you have:1. Installed CrewAI following the [installation guide](/installation)-2. Set up your OpenAI API key in your environment variables+2. Set up your LLM API key in your environment, following the [LLM setup+ guide](/concepts/llms#setting-up-your-llm)3. Basic understanding of Python## Step 1: Create a New CrewAI Flow Project@@ -107,6 +108,8 @@ Now, let's modify the generated files for the content writer crew. We'll set up1. First, update the agents configuration file to define our content creation team:+ Remember to set `llm` to the provider you are using.+```yaml# src/guide_creator_flow/crews/content_crew/config/agents.yamlcontent_writer:@@ -119,7 +122,7 @@ content_writer:You are a talented educational writer with expertise in creating clear, engagingcontent. You have a gift for explaining complex concepts in accessible languageand organizing information in a way that helps readers build their understanding.- llm: openai/gpt-4o-mini+ llm: provider/model-id # e.g. openai/gpt-4o, google/gemini-2.0-flash, anthropic/claude...content_reviewer:role: >@@ -132,7 +135,7 @@ content_reviewer:content. You have an eye for detail, clarity, and coherence. You excel atimproving content while maintaining the original author's voice and ensuringconsistent quality across multiple sections.- llm: openai/gpt-4o-mini+ llm: provider/model-id # e.g. openai/gpt-4o, google/gemini-2.0-flash, anthropic/claude...```These agent definitions establish the specialized roles and perspectives that will shape how our AI agents approach content creation. Notice how each agent has a distinct purpose and expertise.@@ -441,10 +444,15 @@ This is the power of flows - combining different types of processing (user inter## Step 6: Set Up Your Environment Variables-Create a `.env` file in your project root with your API keys:+Create a `.env` file in your project root with your API keys. See the [LLM setup+guide](/concepts/llms#setting-up-your-llm) for details on configuring a provider.-```+```sh .envOPENAI_API_KEY=your_openai_api_key+# or+GEMINI_API_KEY=your_gemini_api_key+# or+ANTHROPIC_API_KEY=your_anthropic_api_key```## Step 7: Install Dependencies@@ -547,7 +555,10 @@ Let's break down the key components of flows to help you understand how to buildFlows allow you to make direct calls to language models when you need simple, structured responses:```python-llm = LLM(model="openai/gpt-4o-mini", response_format=GuideOutline)+llm = LLM(+ model="model-id-here", # gpt-4o, gemini-2.0-flash, anthropic/claude...+ response_format=GuideOutline+)response = llm.call(messages=messages)```diff --git a/docs/quickstart.mdx b/docs/quickstart.mdxindex 1f773fb23..b9f04dba4 100644--- a/docs/quickstart.mdx+++ b/docs/quickstart.mdx@@ -180,8 +180,9 @@ Follow the steps below to get Crewing! 🚣♂️</Step><Step title="Set your environment variables">Before running your crew, make sure you have the following keys set as environment variables in your `.env` file:- - An [OpenAI API key](https://platform.openai.com/account/api-keys) (or other LLM API key): `OPENAI_API_KEY=sk-...`- A [Serper.dev](https://serper.dev/) API key: `SERPER_API_KEY=YOUR_KEY_HERE`+ - The configuration for your choice of model, such as an API key. See the+ [LLM setup guide](/concepts/llms#setting-up-your-llm) to learn how to configure models from any provider.</Step><Step title="Lock and install the dependencies">- Lock the dependencies and install them by using the CLI command:@@ -317,7 +318,7 @@ email_summarizer:Summarize emails into a concise and clear summarybackstory: >You will create a 5 bullet point summary of the report- llm: openai/gpt-4o+ llm: provider/model-id # Add your choice of model here```<Tip>