mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
- Add AioSandboxProvider for Docker-based sandbox execution with configurable container lifecycle, volume mounts, and port management - Add TitleMiddleware to auto-generate thread titles after first user-assistant exchange using LLM - Add Claude Code documentation (CLAUDE.md, AGENTS.md) - Extend SandboxConfig with Docker-specific options (image, port, mounts) - Fix hardcoded mount path to use expanduser - Add agent-sandbox and dotenv dependencies Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
630 B
Python
19 lines
630 B
Python
from langchain.agents import create_agent
|
|
|
|
from src.agents.lead_agent.prompt import apply_prompt_template
|
|
from src.agents.middlewares.title_middleware import TitleMiddleware
|
|
from src.agents.thread_state import ThreadState
|
|
from src.models import create_chat_model
|
|
from src.sandbox.middleware import SandboxMiddleware
|
|
from src.tools import get_available_tools
|
|
|
|
middlewares = [SandboxMiddleware(), TitleMiddleware()]
|
|
|
|
lead_agent = create_agent(
|
|
model=create_chat_model(thinking_enabled=True),
|
|
tools=get_available_tools(),
|
|
middleware=middlewares,
|
|
system_prompt=apply_prompt_template(),
|
|
state_schema=ThreadState,
|
|
)
|