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.
Prerequisites
1. Ensure gVisor is properly installed
We use gVisor to isolate code execution from the host system. Please follow the official installation guide to install gVisor, ensuring your operating system is compatible before proceeding.
2. Ensure Sandbox is properly installed
RAGFlow Sandbox is a secure, pluggable code execution backend. It serves as the code executor for the Code component. Please follow the instructions here to install RAGFlow Sandbox.
If your RAGFlow Sandbox is not working, please be sure to consult the Troubleshooting section in this document. We assure you that it addresses 99.99% of the issues!
3. (Optional) Install necessary dependencies
If you need to import your own Python or JavaScript packages into Sandbox, please follow the commands provided in the How to import my own Python or JavaScript packages into Sandbox? section to install the additional dependencies.