Defer sandbox acquisition and thread directory creation until first use to improve performance and reduce resource usage. Changes: - Add lazy_init parameter to SandboxMiddleware (default: true) - Add ensure_sandbox_initialized() helper for lazy sandbox acquisition - Update all sandbox tools to use lazy initialization - Add lazy_init parameter to ThreadDataMiddleware (default: true) - Create thread directories on-demand in AioSandboxProvider - LocalSandbox already creates directories on write (no changes needed) Benefits: - Saves 1-2s Docker container startup for conversations without tools - Reduces unnecessary directory creation and file system operations - Backward compatible with lazy_init=false option Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
🦌 DeerFlow - v2
Originated from Open Source, give back to Open Source.
A LangGraph-based AI agent backend with sandbox execution capabilities.
Quick Start
-
Configure the application:
# Copy example configuration cp config.example.yaml config.yaml # Set your API keys export OPENAI_API_KEY="your-key-here" # or edit config.yaml directly -
Install dependencies:
cd backend make install -
Run development server:
make dev
Project Structure
deer-flow/
├── config.example.yaml # Configuration template (copy to config.yaml)
├── backend/ # Backend application
│ ├── src/ # Source code
│ └── docs/ # Documentation
├── frontend/ # Frontend application
└── skills/ # Agent skills
├── public/ # Public skills
└── custom/ # Custom skills
Documentation
- Configuration Guide - Setup and configuration instructions
- Architecture Overview - Technical architecture details
License
This project is open source and available under the MIT License.
Acknowledgments
DeerFlow is built upon the incredible work of the open-source community. We are deeply grateful to all the projects and contributors whose efforts have made DeerFlow possible. Truly, we stand on the shoulders of giants.
We would like to extend our sincere appreciation to the following projects for their invaluable contributions:
- LangChain: Their exceptional framework powers our LLM interactions and chains, enabling seamless integration and functionality.
- LangGraph: Their innovative approach to multi-agent orchestration has been instrumental in enabling DeerFlow's sophisticated workflows.
These projects exemplify the transformative power of open-source collaboration, and we are proud to build upon their foundations.
Key Contributors
A heartfelt thank you goes out to the core authors of DeerFlow, whose vision, passion, and dedication have brought this project to life:
Your unwavering commitment and expertise have been the driving force behind DeerFlow's success. We are honored to have you at the helm of this journey.