mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
📝 feat: Agents maxRecursionLimit, Config Version Update, Agent Chain And Missing Artifacts Info (#264)
* 📝 feat: Update agent capabilities to include 'artifacts' and 'chain' * 📝 feat: Add Agent Chain capability and Advanced Settings documentation * 📝 feat: Add maxRecursionLimit option to agents configuration and update documentation * 📝 feat: Update agents configuration with maxRecursionLimit and enhance capabilities documentation * feat: Update Agent Chain documentation to include beta status and maximum agent limit
This commit is contained in:
17
components/changelog/content/config_v1.2.3.mdx
Normal file
17
components/changelog/content/config_v1.2.3.mdx
Normal file
@@ -0,0 +1,17 @@
|
||||
- Added `maxRecursionLimit` to [Agents Endpoint](/docs/configuration/librechat_yaml/object_structure/agents#maxrecursionlimit)
|
||||
- Sets the absolute maximum number of steps an agent can take in a run
|
||||
- Defines the upper limit for `recursionLimit` that can be set from the UI
|
||||
- If omitted, defaults to the value of `recursionLimit` or 25 if `recursionLimit` is also omitted
|
||||
- For more information about agent steps, see [Max Agent Steps](/docs/features/agents#max-agent-steps)
|
||||
- Updated `recursionLimit` in [Agents Endpoint](/docs/configuration/librechat_yaml/object_structure/agents#recursionlimit)
|
||||
- Now represents the default number of steps an agent can take in a run
|
||||
- This value can be configured from the UI up to the `maxRecursionLimit` (if one is provided)
|
||||
- For more information about agent steps, see [Max Agent Steps](/docs/features/agents#max-agent-steps)
|
||||
- Added `artifacts` to [Agent Capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities)
|
||||
- Enables agents to generate and display interactive content, such as React components, HTML code, and Mermaid diagrams
|
||||
- For more information, see [Artifacts](/docs/features/artifacts)
|
||||
- Added `chain` to [Agent Capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities)
|
||||
- Enables a Mixture-of-Agents (MoA) approach for complex tasks
|
||||
- Allows creation of chains of specialized agents that work together
|
||||
- Each agent in the chain can access outputs from previous agents
|
||||
- For more information, see [Agent Chain](/docs/features/agents#agent-chain)
|
||||
13
pages/changelog/config_v1.2.3.mdx
Normal file
13
pages/changelog/config_v1.2.3.mdx
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
date: 2025/3/17
|
||||
title: ⚙️ Config v1.2.3
|
||||
---
|
||||
|
||||
import { ChangelogHeader } from '@/components/changelog/ChangelogHeader'
|
||||
import Content from '@/components/changelog/content/config_v1.2.3.mdx'
|
||||
|
||||
<ChangelogHeader />
|
||||
|
||||
---
|
||||
|
||||
<Content />
|
||||
@@ -8,9 +8,10 @@ This page applies to the [`agents`](/docs/features/agents) endpoint.
|
||||
endpoints:
|
||||
agents:
|
||||
recursionLimit: 50
|
||||
maxRecursionLimit: 100
|
||||
disableBuilder: false
|
||||
# (optional) Agent Capabilities available to all users. Omit the ones you wish to exclude. Defaults to list below.
|
||||
# capabilities: ["execute_code", "file_search", "actions", "tools", "ocr"]
|
||||
# capabilities: ["execute_code", "file_search", "actions", "tools", "artifacts", "ocr", "chain"]
|
||||
```
|
||||
> This configuration enables the builder interface for agents.
|
||||
|
||||
@@ -18,7 +19,7 @@ endpoints:
|
||||
|
||||
<OptionTable
|
||||
options={[
|
||||
['recursionLimit', 'Number', 'Sets the maximum number of super-steps the graph can execute during a single execution.', 'Controls recursion depth to prevent infinite loops. When limit is reached, raises GraphRecursionError.'],
|
||||
['recursionLimit', 'Number', 'Sets the default number of steps an agent can take in a run.', 'Controls recursion depth to prevent infinite loops. When limit is reached, raises GraphRecursionError. This value can be configured from the UI up to the maxRecursionLimit.'],
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -29,6 +30,25 @@ endpoints:
|
||||
recursionLimit: 50
|
||||
```
|
||||
|
||||
For more information about agent steps, see [Max Agent Steps](/docs/features/agents#max-agent-steps).
|
||||
|
||||
## maxRecursionLimit
|
||||
|
||||
<OptionTable
|
||||
options={[
|
||||
['maxRecursionLimit', 'Number', 'Sets the absolute maximum number of steps an agent can take in a run.', 'Defines the upper limit for the recursionLimit that can be set from the UI. This prevents users from setting excessively high values.'],
|
||||
]}
|
||||
/>
|
||||
|
||||
**Default:** If omitted, defaults to the value of recursionLimit or 25 if recursionLimit is also omitted.
|
||||
|
||||
**Example:**
|
||||
```yaml filename="endpoints / agents / maxRecursionLimit"
|
||||
maxRecursionLimit: 100
|
||||
```
|
||||
|
||||
For more information about agent steps, see [Max Agent Steps](/docs/features/agents#max-agent-steps).
|
||||
|
||||
## disableBuilder
|
||||
|
||||
<OptionTable
|
||||
@@ -52,7 +72,7 @@ disableBuilder: false
|
||||
]}
|
||||
/>
|
||||
|
||||
**Default:** `["execute_code", "file_search", "actions", "tools", "ocr"]`
|
||||
**Default:** `["execute_code", "file_search", "actions", "tools", "artifacts", "ocr", "chain"]`
|
||||
|
||||
**Example:**
|
||||
```yaml filename="endpoints / agents / capabilities"
|
||||
@@ -61,7 +81,9 @@ capabilities:
|
||||
- "file_search"
|
||||
- "actions"
|
||||
- "tools"
|
||||
- "artifacts"
|
||||
- "ocr"
|
||||
- "chain"
|
||||
```
|
||||
**Note:** This field is optional. If omitted, the default behavior is to include all the capabilities listed in the default.
|
||||
|
||||
@@ -88,6 +110,7 @@ endpoints:
|
||||
capabilities:
|
||||
- "execute_code"
|
||||
- "actions"
|
||||
- "artifacts"
|
||||
- "ocr"
|
||||
```
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ The model parameters interface allows fine-tuning of your agent's responses:
|
||||
|
||||
## Agent Capabilities
|
||||
|
||||
> **Note:** All capabilities can be toggled via the `librechat.yaml` configuration file. See [docs/configuration/librechat_yaml/object_structure/agents#capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities) for more information.
|
||||
|
||||
### Code Interpreter
|
||||
|
||||
When enabled, the Code Interpreter capability allows your agent to:
|
||||
@@ -69,6 +71,40 @@ The File Context (OCR) capability allows your agent to extract and process text
|
||||
- [More info about OCR](/docs/features/ocr)
|
||||
- **Currently uses Mistral OCR API which may incur costs**
|
||||
|
||||
### Artifacts
|
||||
|
||||
The Artifacts capability enables your agent to generate and display interactive content:
|
||||
|
||||
- Create React components, HTML code, and Mermaid diagrams
|
||||
- Display content in a separate UI window for clarity and interaction
|
||||
- Configure artifact-specific instructions at the agent level
|
||||
- [More info about Artifacts](/docs/features/artifacts)
|
||||
|
||||
When enabled, additional instructions specific to the use of artifacts are added by default. Options include:
|
||||
|
||||
- **Enable shadcn/ui instructions**: Adds instructions for using shadcn/ui components (a collection of re-usable components built using Radix UI and Tailwind CSS)
|
||||
- **Custom Prompt Mode**: When enabled, the default artifacts system prompt will not be included, allowing you to provide your own custom instructions
|
||||
|
||||
Configuring artifacts at the agent level is the preferred approach, as it allows for more granular control compared to the legacy app-wide configuration.
|
||||
|
||||
If you enable Custom Prompt Mode, you should include at minimum the basic artifact format in your instructions. Here's a simple example of the minimum instructions needed:
|
||||
|
||||
```
|
||||
When creating content that should be displayed as an artifact, use the following format:
|
||||
|
||||
:::artifact{identifier="unique-identifier" type="mime-type" title="Artifact Title"}
|
||||
```
|
||||
Your artifact content here
|
||||
```
|
||||
:::
|
||||
|
||||
For the type attribute, use one of:
|
||||
- "text/html" for HTML content
|
||||
- "application/vnd.mermaid" for Mermaid diagrams
|
||||
- "application/vnd.react" for React components
|
||||
- "image/svg+xml" for SVG images
|
||||
```
|
||||
|
||||
### Tools
|
||||
|
||||
Agents can also be enhanced with various built-in tools:
|
||||
@@ -104,6 +140,37 @@ Note that you can add add the 'x-strict': true flag at operation-level in the Op
|
||||
If using an OpenAI model supporting it, this will automatically generate function calls with 'strict' mode enabled.
|
||||
Strict mode supports only a partial subset of json. Read https://platform.openai.com/docs/guides/structured-outputs/some-type-specific-keywords-are-not-yet-supported for details.
|
||||
|
||||
### Agent Chain
|
||||
|
||||
The Agent Chain capability enables a Mixture-of-Agents (MoA) approach, allowing you to create a sequence of agents that work together:
|
||||
|
||||
- Create chains of specialized agents for complex tasks
|
||||
- Each agent in the chain can access outputs from previous agents
|
||||
- Configure the maximum number of steps for the agent chain
|
||||
- **Note:** Access this feature from the Advanced Settings panel in the Agent Builder
|
||||
- **Note:** This feature is currently in beta and may be subject to change
|
||||
- The current maximum of agents that can be chained is 10, but this may be configurable in the future
|
||||
|
||||

|
||||
|
||||
This feature introduces a layered Mixture-of-Agents architecture to LibreChat, where each agent takes all the outputs from agents in the previous layer as auxiliary information in generating its response, as described in [the eponymous "Mixture-of-Agents" paper](https://arxiv.org/abs/2406.04692).
|
||||
|
||||
### Advanced Settings
|
||||
|
||||
Advanced settings for your agent (found in the Advanced view of the Agent form) outside of "capabilities."
|
||||
|
||||
#### Max Agent Steps
|
||||
|
||||
This setting allows you to limit the number of steps an agent can take in a "run," which refers to the agent loop before a final response is given.
|
||||
|
||||
If left unconfigured, the default is 25 steps, but you can adjust this to suit your needs. For admins, you can set a global default as well as a global maximum in the [`librechat.yaml`](/docs/configuration/librechat_yaml/object_structure/agents#recursionlimit) file.
|
||||
|
||||
A "step" refers to either an AI API request or a round of tool usage (1 or many tools, depending on how many tool calls the LLM provides from a single request).
|
||||
|
||||
A single, non-tool response is 1 step. A singular round of tool usage is usually 3 steps:
|
||||
|
||||
1. API Request -> 2. Tool Usage (1 or many tools) -> 3. Follow-up API Request
|
||||
|
||||
### Model Context Protocol (MCP)
|
||||
|
||||
MCP is an open protocol that standardizes how applications provide context to Large Language Models (LLMs), acting like a universal adapter for AI tools and data sources.
|
||||
|
||||
@@ -8,6 +8,9 @@ description: Discover LibreChat's revolutionary Artifacts feature for instant cr
|
||||
- **Generative UI:** Create React components, HTML code, and Mermaid diagrams
|
||||
- **Flexible Integration:** Use any model you have set up
|
||||
- **Iterative Design:** Rapidly improve and refine generated outputs
|
||||
- **Agent Integration:** Configure artifacts at the agent level (recommended approach)
|
||||
|
||||
> **Note:** The preferred way to use artifacts is now through the [Agents feature](/docs/features/agents#artifacts), which allows for more granular control by enabling/disabling artifacts at the agent level rather than app-wide.
|
||||
|
||||
<div align="center">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/GfTj7O4gmd0?si=NrtqGoodGpfANBfT" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="true"></iframe>
|
||||
|
||||
BIN
public/images/agents/agent_chain.png
Normal file
BIN
public/images/agents/agent_chain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
Reference in New Issue
Block a user