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:
DanielWalnut
2026-01-14 23:29:18 +08:00
committed by GitHub
parent de2d18561a
commit ab427731dc
21 changed files with 1479 additions and 13 deletions

View File

@@ -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,
)