Export deep-agent factory and omit memory/research from task registry.

This commit is contained in:
CREDO23 2026-05-01 23:18:17 +02:00
parent eb4b570265
commit fbcff79a58
2 changed files with 14 additions and 2 deletions

View file

@ -1 +1,7 @@
"""Deepagents-backed multi-agent routes (subagents under ``subagents/``).""" """Deepagents-backed routes: ``subagents/``; main-agent graph under ``main_agent/`` (SRP subpackages)."""
from __future__ import annotations
from .main_agent import create_surfsense_deep_agent
__all__ = ["create_surfsense_deep_agent"]

View file

@ -114,10 +114,16 @@ def build_subagents(
mcp_tools_by_agent: dict[str, ToolsPermissions] | None = None, mcp_tools_by_agent: dict[str, ToolsPermissions] | None = None,
only_names: frozenset[str] | None = None, only_names: frozenset[str] | None = None,
) -> list[SubAgent]: ) -> list[SubAgent]:
"""Build registry route specs; ``only_names`` selects which routes.""" """Build registry route specs.
``memory`` and ``research`` are never included (main agent holds those tools).
When ``only_names`` is set, only matching routes among the remainder are built.
"""
mcp = mcp_tools_by_agent or {} mcp = mcp_tools_by_agent or {}
specs: list[SubAgent] = [] specs: list[SubAgent] = []
for name in sorted(SUBAGENT_BUILDERS_BY_NAME): for name in sorted(SUBAGENT_BUILDERS_BY_NAME):
if name in ("memory", "research"):
continue
if only_names is not None and name not in only_names: if only_names is not None and name not in only_names:
continue continue
builder = SUBAGENT_BUILDERS_BY_NAME[name] builder = SUBAGENT_BUILDERS_BY_NAME[name]