docs: agent blocks - #11529
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ngflow into docs-agent-blocks
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| "Components/components-bundles", | ||
| { | ||
| type: "category", | ||
| label: "Agent Blocks", |
aimurphy
left a comment
There was a problem hiding this comment.
Approved but please see my comments
| @@ -0,0 +1,34 @@ | |||
| --- | |||
| title: AgentLoop | |||
There was a problem hiding this comment.
The titles of these pages don't match the spelling used in the screenshot and on the pages. For example AgentLoop vs Agent Loop.
The "no space" versions are also in other places, like AgentLoop parameters.
|
|
||
| An agent is fundamentally a while loop. | ||
| The while loop accepts input and iterates over the agent's reasoning. | ||
| The agent's reasoning sends messages to an LLM and examines the LLM's response to determine where to route the request. |
There was a problem hiding this comment.
| The agent's reasoning sends messages to an LLM and examines the LLM's response to determine where to route the request. | |
| The agent's reasoning sends messages to an LLM, and then it examines the LLM's response to determine where to route the request. |
| ``` | ||
| ChatInput → WhileLoop → AgentStep → [Tool Calls] → ExecuteTool → WhileLoop | ||
| ↓ [AI Message - done] | ||
| ChatOutput | ||
| ``` |
There was a problem hiding this comment.
I suggest a mermaid diagram here instead.
You can use the free editor https://mermaid.live/edit
I can't remember if mermaid was already enabled in this repo https://docusaurus.io/docs/next/markdown-features/diagrams
| ChatOutput | ||
| ``` | ||
|
|
||
| Langflow's [**Agent** component](/components-agents) is composed of this same architecture, and is suitable for most tasks that require a reasoning loop that can choose from a list of registered functions. |
There was a problem hiding this comment.
| Langflow's [**Agent** component](/components-agents) is composed of this same architecture, and is suitable for most tasks that require a reasoning loop that can choose from a list of registered functions. | |
| Langflow's [**Agent** component](/components-agents) uses this architecture, and it is suitable for most tasks that require a reasoning loop that can choose from a list of registered functions. |
| But what if you want to modify the agent's behavior? For example, how do you include a validation step in your tool outputs before execution? | ||
|
|
||
| Use **Agent Blocks** to construct an agent in Langflow's visual builder. |
There was a problem hiding this comment.
| But what if you want to modify the agent's behavior? For example, how do you include a validation step in your tool outputs before execution? | |
| Use **Agent Blocks** to construct an agent in Langflow's visual builder. | |
| If you want to modify the agent's behavior, you can use **Agent Blocks** to construct an agent. For example, you could add a validation step to `tool_calls` outputs. | |
| import Icon from "@site/src/components/icon"; | ||
| import PartialParams from '@site/docs/_partial-hidden-params.mdx'; | ||
|
|
||
| The **Think Tool** component provides think tool support for step-by-step reasoning. It enables agents to perform explicit reasoning steps before taking action, improving the quality of tool selection and parameter generation. |
There was a problem hiding this comment.
The first sentence is repetitive and doesn't help explain what it does.
| **Think Tool** is typically used as a tool that the [**Agent Step** component](/agent-blocks-agent-step) can call during reasoning: | ||
|
|
||
| ``` | ||
| AgentStep → [Think Tool Call] → ThinkTool → [Reasoning Output] → AgentStep |
There was a problem hiding this comment.
I'm not sure this is adding any value.
| | chat_history | Chat Memory | Data[] | Input parameter. Chat history for context-aware responses. | | ||
| | input_value | Input | Message | Input parameter. The input message to process. | | ||
| | tool_calls | Tool Calls | ToolCall[] | Output parameter. Tool calls requested by the LLM (routes to [**Execute Tool** component](/agent-blocks-execute-tool)). | | ||
| | ai_message | AI Message | Message | Output parameter. Final answer from the LLM (routes to [**Chat Output** component](/chat-input-and-output)). | |
There was a problem hiding this comment.
On the quickstart, the outputs are Response and Tool Calls.
| import PartialParams from '@site/docs/_partial-hidden-params.mdx'; | ||
|
|
||
| The **Agent Loop** component is a pre-composed component that encapsulates the complete agent loop. It combines the [**While Loop** component](/agent-blocks-while-loop), [**Agent Step** component](/agent-blocks-agent-step), and [**Execute Tool** component](/agent-blocks-execute-tool) into a single, ready-to-use component. | ||
|
|
There was a problem hiding this comment.
I would add an explanation or list here about when to use:
- Individual Agent Blocks components: You want to build a custom agent with extra steps or logic beyond regular tool calls.
- Agent Loop component: ?
- Agents component: ?
| label: "Bundles", | ||
| items: [ | ||
| "Components/components-bundles", | ||
| { |
There was a problem hiding this comment.
strange this is under bundles instead of core 🤷🏻♀️
|
Build successful! ✅ |
|
Closing as won't do for 1.8 release. |
Add a quickstart, component docs, and release note for the Agent Blocks feature.
Preview build