forked from langflow-ai/langflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add new starter flows (langflow-ai#3688)
add-new-starter-flows
- Loading branch information
Showing
3 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
docs/docs/Starter-Projects/starter-projects-complex-agent.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Complex Agent | ||
|
||
Build a Complex Agent flow for a chatbot application using [CrewAI](https://docs.crewai.com/). This flow uses CrewAI to manage a Hierarchical Crew of Agents as they perform a sequence of Tasks. | ||
|
||
This flow features a unique method of creating a CrewAI agent out of OpenAI prompt responses. The tool-calling agent's `Role`, `Goal`, and `Backstory` are defined by prompting OpenAI LLM with the user's query. The agent then builds a response by querying the Yahoo Finance News and Search API tools. | ||
|
||
The Manager Agent oversees the tool-calling agent, using the OpenAI LLM as a brain to make decisions about how to manage its agents. It can answer general questions from the user, but can also call for help from the tool-calling agent if needed. | ||
|
||
## Prerequisites | ||
|
||
- [Langflow installed and running](/getting-started-installation) | ||
- [OpenAI API key created](https://platform.openai.com/) | ||
- [SearchAPI API key created](https://www.searchapi.io/) | ||
|
||
## Open Langflow and Start a New Project | ||
|
||
Click **New Project**, and then select the **Complex Agent** project. | ||
|
||
This opens a starter project with the necessary components to run a chatbot application using CrewAI. | ||
|
||
## Complex Agent Flow Components | ||
|
||
- **Chat Input**: Accepts user input to the chat | ||
- **Prompt**: Combines user input with a user-defined prompt | ||
- **OpenAI model**: Sends user input and prompt to the OpenAI API and receives a response | ||
- **Chat Output**: Prints the flow's output to the chat | ||
- **CrewAI Agent**: An autonomous unit programmed to perform tasks, make decisions, and communicate with other agents | ||
- **Crew AI Crew**: Represents a collaborative group of agents working together to achieve a set of tasks | ||
- **Crew AI Task**: A specific assignment to be completed by agents | ||
- **SearchAPI tool**: Performs web searches using the SearchAPI.io API | ||
|
||
## Run the Complex Agent Flow | ||
|
||
1. Add your credentials to the OpenAI and SearchAPI components using Langflow's Global Variables: | ||
- Click **Settings**, then **Global Variables** | ||
- Click **Add New** | ||
- Name your variable and paste your API key in the **Value** field | ||
- In the **Apply To Fields** field, select the field to apply this variable to | ||
- Click **Save Variable** | ||
|
||
2. In the **Chat Output** component, click **Play** to start the end-to-end application flow. | ||
|
||
3. Click **Playground** to chat with the flow. | ||
|
||
4. Ask the bot a question. The question is passed through the Prompt component to the Hierarchical Task component, then to the Hierarchical Crew component. | ||
|
||
Once your query has completed the journey from Chat Input to Chat Output, you have successfully completed the Complex Agent flow. |
43 changes: 43 additions & 0 deletions
43
docs/docs/Starter-Projects/starter-projects-hierarchical-crew.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Hierarchical Tasks Agent | ||
|
||
Build a Hierarchical Tasks Agent flow for a multi-shot application using [CrewAI](https://docs.crewai.com/). This flow uses CrewAI to manage a Hierarchical Crew of Agents as they perform disparate tasks under the control of a Manager Agent. | ||
|
||
Unlike the agents in the [Sequential Crew starter flow](./starter-projects-sequential-crew.md), the CrewAI agents in this flow don't just perform a task one after the other. One Agent is a Researcher that queries the Search API tool, another is an Editor that evaluates the retrieved information, and the Manager Agent oversees the Researcher and Editor Agents, using the OpenAI LLM as a brain to make decisions about how to manage the Researcher and Editor agents. | ||
|
||
## Prerequisites | ||
|
||
- [Langflow installed and running](/getting-started-installation) | ||
- [OpenAI API key created](https://platform.openai.com/) | ||
- [SearchAPI API key created](https://www.searchapi.io/) | ||
|
||
## Open Langflow and Start a New Project | ||
|
||
Click **New Project**, and then select the **Hierarchical Tasks Agent** project. | ||
|
||
This opens a starter project with the necessary components to run a multi-shot application using CrewAI. | ||
|
||
## Hierarchical Tasks Agent Flow Components | ||
|
||
- **Chat Input**: Accepts user input to the chat | ||
- **Prompt**: Combines user input with a user-defined prompt | ||
- **OpenAI model**: Sends user input and prompt to the OpenAI API and receives a response | ||
- **Chat Output**: Prints the flow's output to the chat | ||
- **CrewAI Agent**: An autonomous unit programmed to perform tasks, make decisions, and communicate with other agents | ||
- **Crew AI Crew**: Represents a collaborative group of agents working together to achieve a set of tasks | ||
- **Crew AI Task**: A specific assignment to be completed by agents | ||
- **SearchAPI tool**: Performs web searches using the SearchAPI.io API | ||
|
||
## Run the Hierarchical Tasks Agent Flow | ||
|
||
1. Add your credentials to the OpenAI and SearchAPI components using Langflow's Global Variables: | ||
- Click **Settings**, then **Global Variables** | ||
- Click **Add New** | ||
- Name your variable and paste your API key in the **Value** field | ||
- In the **Apply To Fields** field, select the field to apply this variable to | ||
- Click **Save Variable** | ||
|
||
2. In the **Chat Output** component, click **Play** to start the end-to-end application flow. | ||
|
||
3. Click **Playground** to view the flow's output. The default output is a concise explanatory text about Langflow. | ||
|
||
Once your query has completed the journey from Chat Input to Chat Output, you have successfully completed the Hierarchical Tasks Agent flow. |
41 changes: 41 additions & 0 deletions
41
docs/docs/Starter-Projects/starter-projects-sequential-crew.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Sequential Tasks Agent | ||
|
||
Build a Sequential Tasks Agent flow for a multi-shot application using [CrewAI](https://docs.crewai.com/). This flow uses CrewAI to manage a Crew of Agents as they perform a sequence of Tasks. | ||
|
||
## Prerequisites | ||
|
||
- [Langflow installed and running](/getting-started-installation) | ||
- [OpenAI API key created](https://platform.openai.com/) | ||
- [SearchAPI API key created](https://www.searchapi.io/) | ||
|
||
## Open Langflow and Start a New Project | ||
|
||
Click **New Project**, and then select the **Sequential Tasks Agent** project. | ||
|
||
This opens a starter project with the necessary components to run a multi-shot application using CrewAI. | ||
|
||
## Sequential Tasks Agent Flow Components | ||
|
||
- **Text Input**: Accepts text input | ||
- **Prompt**: Combines user input with a user-defined prompt | ||
- **OpenAI model**: Sends user input and prompt to the OpenAI API and receives a response | ||
- **Chat Output**: Prints the flow's output to the chat | ||
- **CrewAI Agent**: An autonomous unit programmed to perform tasks, make decisions, and communicate with other agents | ||
- **Crew AI Crew**: Represents a collaborative group of agents working together to achieve a set of tasks | ||
- **Crew AI Task**: A specific assignment to be completed by agents | ||
- **SearchAPI tool**: Performs web searches using the SearchAPI.io API | ||
|
||
## Run the Sequential Tasks Agent Flow | ||
|
||
1. Add your credentials to the OpenAI and SearchAPI components using Langflow's Global Variables: | ||
- Click **Settings**, then **Global Variables** | ||
- Click **Add New** | ||
- Name your variable and paste your API key in the **Value** field | ||
- In the **Apply To Fields** field, select the field to apply this variable to | ||
- Click **Save Variable** | ||
|
||
2. In the **Chat Output** component, click **Play** to start the end-to-end application flow. | ||
|
||
3. Click **Playground** to view the flow's output. The default output is a short, comedic blog post about Agile methodology. | ||
|
||
Once your query has completed the journey from Text Input to Chat Output, you have successfully completed the Sequential Tasks Agent flow. |