RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Docs: Added code component reference (#7821)
writinwaters1f756947dac8
diff --git a/docs/guides/agent/agent_component_reference/code.mdx b/docs/guides/agent/agent_component_reference/code.mdxnew file mode 100644index 0000000000..cb572f6d1d--- /dev/null+++ b/docs/guides/agent/agent_component_reference/code.mdx@@ -0,0 +1,50 @@+---+sidebar_position: 13+slug: /code_component+---++# Code component++A component that enables users to integrate Python or JavaScript codes into their Agent for dynamic data processing.++---++## Scenarios++A **Code** component is essential when you need to integrate complex code logic (Python or JavaScript) into your Agent for dynamic data processing.++## Input variables++You can specify multiple input sources for the **Code** component. Click **+ Add variable** in the **Input variables** section to include the desired input variables.++After defining an input variable, you are required to select from the dropdown menu:+ - A component ID under **Component Output**, or+ - A global variable under **Begin input**, which is defined in the **Begin** component.++## Coding field++### A Python code example++```Python+ def main(arg1: str, arg2: str) -> dict:+ return {+ "result": arg1 + arg2,+ }+```++### A JavaScript code example++```JavaScript++ const axios = require('axios');+ async function main(args) {+ try {+ const response = await axios.get('https://github.com/infiniflow/ragflow');+ console.log('Body:', response.data);+ } catch (error) {+ console.error('Error:', error.message);+ }+ }+```++diff --git a/docs/guides/agent/agent_component_reference/note.mdx b/docs/guides/agent/agent_component_reference/note.mdxindex 445648a36a..015e40b2ba 100644--- a/docs/guides/agent/agent_component_reference/note.mdx+++ b/docs/guides/agent/agent_component_reference/note.mdx@@ -1,5 +1,5 @@----sidebar_position: 13+sidebar_position: 18slug: /note_component---diff --git a/docs/release_notes.md b/docs/release_notes.mdindex 1062860d74..282de9960d 100644--- a/docs/release_notes.md+++ b/docs/release_notes.md@@ -31,13 +31,13 @@ Released on May 26, 2025.- Cross-language search is supported in the Knowledge and Chat modules, enhancing search accuracy and user experience in multilingual environments, such as in Chinese-English knowledge bases.- Agent component: A new Code component supports Python and JavaScript scripts, enabling developers to handle more complex tasks like dynamic data processing.- Enhanced image display: Images in Chat and Search now render directly within responses, rather than as external references. Knowledge retrieval testing can retrieve images directly, instead of texts extracted from images.-- Claude 4: Developers can now use the newly released, most advanced Claude model.+- Claude 4 and ChatGPT o3: Developers can now use the newly released, most advanced Claude model alongside OpenAI’s latest ChatGPT o3 inference model.> The following features are contributed by our community contributors:-- Agent component: Enables tool calling within the Generate Component. Kudos to [notsyncing](https://github.com/notsyncing).-- Markdown rendering: Image references in a markdown file can be displayed after chunking. Kudos to [Woody-Hu](https://github.com/Woody-Hu).-- Vector database support: OpenSearch can now be used as RAGFlow's document engine. Kudos to [pyyuhao](https://github.com/pyyuhao).+- Agent component: Enables tool calling within the Generate Component. Thanks to [notsyncing](https://github.com/notsyncing).+- Markdown rendering: Image references in a markdown file can be displayed after chunking. Thanks to [Woody-Hu](https://github.com/Woody-Hu).+- Document engine support: OpenSearch can now be used as RAGFlow's document engine. Thanks to [pyyuhao](https://github.com/pyyuhao).## v0.18.0