feat: enhance task management and timeout configurations in multi-agent chat

- Added new environment variables for controlling task execution limits, including `SURFSENSE_SUBAGENT_INVOKE_TIMEOUT_SECONDS`, `SURFSENSE_TASK_BATCH_CONCURRENCY`, and `SURFSENSE_TASK_BATCH_MAX_SIZE`.
- Updated documentation to reflect new batch processing capabilities for `task` calls, allowing for concurrent execution of multiple subagent tasks.
- Improved error handling and receipt generation for deliverables, ensuring consistent feedback on task status.
- Refactored middleware to incorporate search space ID for better task management.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-05-27 14:58:10 -07:00
parent 820f541f08
commit 9d6e9b7e2d
66 changed files with 2561 additions and 380 deletions

View file

@ -2608,9 +2608,7 @@ async def stream_resume_chat(
visibility = thread_visibility or ChatVisibility.PRIVATE
from app.config import config as _app_config
chat_agent_mode = (
"multi" if _app_config.MULTI_AGENT_CHAT_ENABLED else "single"
)
chat_agent_mode = "multi" if _app_config.MULTI_AGENT_CHAT_ENABLED else "single"
with contextlib.suppress(Exception):
chat_span.set_attribute("agent.mode", chat_agent_mode)
_t0 = time.perf_counter()