docs: Update agent tool documentation and enhance flow as tool component (#4636)

* docs: Update agent tool documentation and enhance flow as tool component details

* docs: Update component terminology for consistency and improve section title

* chore: add lucide-react dependency to package-lock and yarn.lock
This commit is contained in:
Mendon Kissling 2024-11-20 14:21:44 -05:00 committed by GitHub
commit 3fd4a61310
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 10 deletions

View file

@ -148,10 +148,6 @@ Text Analyzer: I can analyze and transform input text.
Current Date and Time: I can retrieve the current date and time in various time zones.
```
4. Click **Check & Save**.
Your component now has a **Tool Mode** button, and can be used by an agent.
## Make any component a tool
These components support **Tool Mode**:
@ -181,12 +177,12 @@ inputs = [
## Add flows as tools
An agent can use flows that are saved in your workspace as tools.
An agent can use flows that are saved in your workspace as tools with the [Flow as Tool](/components-logic#flow-as-tool) component.
1. To add a **Flow as tool** component, click and drag a **Flow as tool** component to your workspace.
1. To add a **Flow as Tool** component, click and drag a **Flow as Tool** component to your workspace.
2. Select the flow you want the agent to use as a tool.
3. Connect the tool output to the agent's tools input.
4. Ask the agent, `What tools are you using to answer my questions?`
Your **Flow as tool** flow should be visible in the response.
Your **Flow as Tool** flow should be visible in the response.

View file

@ -1,9 +1,11 @@
---
title: Types of agents in Langflow
title: Agents
sidebar_position: 12
slug: /components-agents
---
# Agent components in Langflow
Agent components are used to define the behavior and capabilities of AI agents in your flow. Agents can interact with APIs, databases, and other services and use LLMs as a reasoning engine to decide which course to take in your flow.
## Agent component {#agent-component}

View file

@ -1,3 +1,8 @@
---
title: Logic
sidebar_position: 13
slug: /components-logic
---
# Logic components in Langflow
Logic components provide functionalities for routing, conditional processing, and flow management.
@ -50,7 +55,7 @@ This component is particularly useful in workflows that require conditional rout
| false_output | Data/List | Output when the condition is not met. |
## Flow as Tool
## Flow as Tool {#flow-as-tool}
This component constructs a tool from a function that runs a loaded flow.

View file

@ -20,6 +20,7 @@
"clsx": "^1.2.1",
"docusaurus-node-polyfills": "^1.0.0",
"docusaurus-plugin-image-zoom": "^2.0.0",
"lucide-react": "^0.460.0",
"prism-react-renderer": "^1.3.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@ -12179,6 +12180,14 @@
"yallist": "^2.1.2"
}
},
"node_modules/lucide-react": {
"version": "0.460.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.460.0.tgz",
"integrity": "sha512-BVtq/DykVeIvRTJvRAgCsOwaGL8Un3Bxh8MbDxMhEWlZay3T4IpEKDEpwt5KZ0KJMHzgm6jrltxlT5eXOWXDHg==",
"peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc"
}
},
"node_modules/lunr": {
"version": "2.3.9",
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",

View file

@ -7279,6 +7279,11 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"
lucide-react@^0.460.0:
version "0.460.0"
resolved "https://registry.npmjs.org/lucide-react/-/lucide-react-0.460.0.tgz"
integrity sha512-BVtq/DykVeIvRTJvRAgCsOwaGL8Un3Bxh8MbDxMhEWlZay3T4IpEKDEpwt5KZ0KJMHzgm6jrltxlT5eXOWXDHg==
lunr-languages@^1.4.0:
version "1.14.0"
resolved "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.14.0.tgz"
@ -9474,7 +9479,7 @@ react-router@^5.3.4, react-router@>=5, react-router@5.3.4:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
react@*, "react@^16.13.1 || ^17.0.0 || ^18.0.0", "react@^16.14.0 || ^17 || ^18", "react@^16.6.0 || ^17.0.0 || ^18.0.0", "react@^16.8.3 || ^17 || ^18", "react@^17.x || ^18.x", react@^18.0.0, react@^18.2.0, react@^18.3.1, "react@>= 16.8.0 < 19.0.0", react@>=0.14.9, react@>=15, react@>=16, react@>=16.0.0, react@>=16.6.0, "react@0.14 || 15 || 16 || 17 || 18":
react@*, "react@^16.13.1 || ^17.0.0 || ^18.0.0", "react@^16.14.0 || ^17 || ^18", "react@^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc", "react@^16.6.0 || ^17.0.0 || ^18.0.0", "react@^16.8.3 || ^17 || ^18", "react@^17.x || ^18.x", react@^18.0.0, react@^18.2.0, react@^18.3.1, "react@>= 16.8.0 < 19.0.0", react@>=0.14.9, react@>=15, react@>=16, react@>=16.0.0, react@>=16.6.0, "react@0.14 || 15 || 16 || 17 || 18":
version "18.3.1"
resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz"
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==