mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 04:14:46 +08:00
feat: add AIO sandbox provider and auto title generation (#1)
- 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>
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
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=[SandboxMiddleware()],
|
||||
middleware=middlewares,
|
||||
system_prompt=apply_prompt_template(),
|
||||
state_schema=ThreadState,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
MOUNT_POINT = "/Users/henry/mnt"
|
||||
MOUNT_POINT = os.path.expanduser("~/mnt")
|
||||
|
||||
SYSTEM_PROMPT = f"""
|
||||
<role>
|
||||
|
||||
Reference in New Issue
Block a user