hetaoBackend ffb9ed3198 fix: use shared httpx client to prevent premature closure in SSE streaming
The proxy was creating a temporary httpx.AsyncClient within an async context manager.
When returning StreamingResponse for SSE endpoints, the client was being closed before
the streaming generator could use it, causing "client has been closed" errors.

This change introduces a shared httpx.AsyncClient that persists for the application
lifecycle, properly cleaned up during shutdown. This also improves performance by
reusing TCP connections across requests.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 16:52:30 +08:00
2026-01-19 15:42:19 +08:00
2026-01-14 07:09:20 +08:00
2026-01-14 07:09:20 +08:00

🦌 DeerFlow - v2

Originated from Open Source, give back to Open Source.

A LangGraph-based AI agent backend with sandbox execution capabilities.

Quick Start

  1. 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
    
  2. Install dependencies:

    cd backend
    make install
    
  3. 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

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.

Star History

Star History Chart

Description
No description provided
Readme MIT 24 MiB
Languages
Python 59.3%
TypeScript 24.3%
HTML 7.3%
CSS 3.2%
JavaScript 2.8%
Other 3.1%