mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-07 06:42:39 +02:00
Add expert_agent vertical slices and MCP bridge prompts.
This commit is contained in:
parent
c974fcefe6
commit
1f7343298c
63 changed files with 644 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
"""Expert subgraphs (specialists the supervisor delegates to).
|
||||
|
||||
- :mod:`expert_agent.builtins` — cross-cutting registry categories (e.g. research, memory, deliverables).
|
||||
- :mod:`expert_agent.connectors` — vendor/product integrations (mail, calendar, chat, doc stores, …).
|
||||
"""
|
||||
|
|
@ -0,0 +1 @@
|
|||
"""Built-ins: broad capability categories from the registry (not single-vendor integrations)."""
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
"""Deliverables vertical slice: registry tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.builtins.deliverables.agent import build_deliverables_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.builtins.deliverables.slice_tools import (
|
||||
build_deliverables_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_deliverables_tools",
|
||||
"build_deliverables_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Deliverables domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.builtins.deliverables as deliverables_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_deliverables_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled deliverables domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=deliverables_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the deliverables domain agent. Use reports, podcasts, video presentations, resumes, and image generation tools as provided. Clarify constraints in your reasoning and respond concisely when reporting results.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed deliverables tools (reports, media exports, resume, images)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_deliverables_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``deliverables`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "deliverables")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"""Memory vertical slice: registry tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.builtins.memory.agent import build_memory_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.builtins.memory.slice_tools import build_memory_tools
|
||||
|
||||
__all__ = [
|
||||
"build_memory_tools",
|
||||
"build_memory_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Memory domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.builtins.memory as memory_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_memory_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled memory domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=memory_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the memory domain agent. Use the update_memory tool only when the user explicitly asks to remember something, or when saving durable preferences and facts that should persist across sessions. Do not store secrets unless the user requests it. Respond concisely after updating memory.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed memory tools (long-term personal or team memory)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_memory_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``memory`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "memory")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"""Research vertical slice: registry tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.builtins.research.agent import build_research_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.builtins.research.slice_tools import build_research_tools
|
||||
|
||||
__all__ = [
|
||||
"build_research_tools",
|
||||
"build_research_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Research domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.builtins.research as research_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_research_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled research domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=research_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the research domain agent. Use web search, page scraping, and SurfSense documentation search to gather facts. Stay focused on research tasks and respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed research tools (web, scrape, SurfSense docs help)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_research_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``research`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "research")
|
||||
|
|
@ -0,0 +1 @@
|
|||
"""External integrations: third-party products (explicit factories or registry-backed connector tools)."""
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
"""Google Calendar vertical slice: connector tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.calendar.agent import build_calendar_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.calendar.slice_tools import (
|
||||
build_calendar_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_calendar_domain_agent",
|
||||
"build_calendar_tools",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Google Calendar domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.calendar as calendar_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_calendar_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Calendar domain-agent graph (prompt + tools co-located under ``calendar``)."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=calendar_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Google Calendar domain agent. Use only the tools provided to complete calendar-related tasks. Stay focused on scheduling and calendar operations and respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Google Calendar tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_calendar_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``calendar`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "calendar")
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
"""Confluence connector slice."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.confluence.agent import build_confluence_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.confluence.slice_tools import (
|
||||
build_confluence_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_confluence_tools",
|
||||
"build_confluence_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Confluence domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.confluence as confluence_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_confluence_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Confluence domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=confluence_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Confluence domain agent. Use only the Confluence tools provided for pages in the connected space. Respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Confluence tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_confluence_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``confluence`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "confluence")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"""Discord vertical slice: registry tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.discord.agent import build_discord_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.discord.slice_tools import build_discord_tools
|
||||
|
||||
__all__ = [
|
||||
"build_discord_tools",
|
||||
"build_discord_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Discord domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.discord as discord_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_discord_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Discord domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=discord_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Discord domain agent. Use only the Discord tools provided (list channels, read messages, send messages). Stay focused on the connected server and respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Discord tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_discord_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``discord`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "discord")
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
"""Dropbox connector slice."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.dropbox.agent import build_dropbox_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.dropbox.slice_tools import (
|
||||
build_dropbox_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_dropbox_tools",
|
||||
"build_dropbox_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Dropbox domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.dropbox as dropbox_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_dropbox_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Dropbox domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=dropbox_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Dropbox domain agent. Use only the Dropbox tools provided for files in the connected account. Respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Dropbox tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_dropbox_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``dropbox`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "dropbox")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"""Gmail vertical slice: connector tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.gmail.agent import build_gmail_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.gmail.slice_tools import build_gmail_tools
|
||||
|
||||
__all__ = [
|
||||
"build_gmail_tools",
|
||||
"build_gmail_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Gmail domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.gmail as gmail_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_gmail_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Gmail domain-agent graph (prompt + tools co-located under ``gmail``)."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=gmail_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Gmail domain agent. Use only the tools provided to complete Gmail-related tasks. Stay focused on email operations and respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Gmail tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_gmail_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``gmail`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "gmail")
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
"""Google Drive connector slice."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.google_drive.agent import (
|
||||
build_google_drive_domain_agent,
|
||||
)
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.google_drive.slice_tools import (
|
||||
build_google_drive_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_google_drive_tools",
|
||||
"build_google_drive_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Google Drive domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.google_drive as google_drive_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_google_drive_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Google Drive domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=google_drive_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Google Drive domain agent. Use only the Google Drive tools provided for Docs/Sheets files in the connected account. Respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Google Drive tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_google_drive_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``google_drive`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "google_drive")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"""Luma vertical slice: registry tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.luma.agent import build_luma_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.luma.slice_tools import build_luma_tools
|
||||
|
||||
__all__ = [
|
||||
"build_luma_tools",
|
||||
"build_luma_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Luma domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.luma as luma_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_luma_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Luma domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=luma_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Luma domain agent. Use only the Luma tools provided (list events, read event details, create events). Stay focused on the user's calendar and respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Luma tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_luma_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``luma`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "luma")
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
"""Notion connector slice."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.notion.agent import build_notion_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.notion.slice_tools import (
|
||||
build_notion_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_notion_tools",
|
||||
"build_notion_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Notion domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.notion as notion_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_notion_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Notion domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=notion_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Notion domain agent. Use only the Notion tools provided for pages in the connected workspace. Respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Notion tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_notion_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``notion`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "notion")
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
"""Microsoft OneDrive connector slice."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.onedrive.agent import build_onedrive_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.onedrive.slice_tools import (
|
||||
build_onedrive_tools,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"build_onedrive_tools",
|
||||
"build_onedrive_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Microsoft OneDrive domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.onedrive as onedrive_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_onedrive_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled OneDrive domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=onedrive_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Microsoft OneDrive domain agent. Use only the OneDrive tools provided for files in the connected account. Respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Microsoft OneDrive tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_onedrive_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``onedrive`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "onedrive")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"""Microsoft Teams vertical slice: registry tools, domain agent, ``domain_prompt.md``."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.teams.agent import build_teams_domain_agent
|
||||
from app.agents.multi_agent_chat.expert_agent.connectors.teams.slice_tools import build_teams_tools
|
||||
|
||||
__all__ = [
|
||||
"build_teams_tools",
|
||||
"build_teams_domain_agent",
|
||||
]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"""Microsoft Teams domain agent graph."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.connectors.teams as teams_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_teams_domain_agent(llm: BaseChatModel, tools: Sequence[BaseTool]):
|
||||
"""Compiled Microsoft Teams domain-agent graph."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=teams_pkg.__name__,
|
||||
prompt_stem="domain_prompt",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Microsoft Teams domain agent. Use only the Teams tools provided (list teams and channels, read messages, send messages). Stay focused on the connected workspace and respond concisely.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
"""Registry-backed Microsoft Teams tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.registry import build_registry_tools_for_category
|
||||
|
||||
|
||||
def build_teams_tools(dependencies: dict[str, Any]) -> list[BaseTool]:
|
||||
"""Tools from ``new_chat`` registry: ``teams`` category."""
|
||||
return build_registry_tools_for_category(dependencies, "teams")
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
"""Prompt-backed subgraphs for MCP OAuth integrations without a native tool registry slice."""
|
||||
|
||||
from app.agents.multi_agent_chat.expert_agent.mcp_bridge.agent import build_mcp_route_domain_agent
|
||||
|
||||
__all__ = ["build_mcp_route_domain_agent"]
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
"""Domain agents for MCP-only OAuth integrations (no native registry slice)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import app.agents.multi_agent_chat.expert_agent.mcp_bridge as mcp_bridge_pkg
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.tools import BaseTool
|
||||
|
||||
from app.agents.multi_agent_chat.core.agents import build_domain_agent
|
||||
|
||||
|
||||
def build_mcp_route_domain_agent(
|
||||
llm: BaseChatModel,
|
||||
route_key: str,
|
||||
tools: Sequence[BaseTool],
|
||||
):
|
||||
"""One subgraph per MCP-only route (``linear``, ``slack``, …); prompt stem ``{route_key}_domain``."""
|
||||
return build_domain_agent(
|
||||
llm,
|
||||
tools,
|
||||
prompt_package=mcp_bridge_pkg.__name__,
|
||||
prompt_stem=f"{route_key}_domain",
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Airtable expert (MCP). Use only the Airtable MCP tools provided. Stay focused on bases, tables, and records; respond concisely.
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the ClickUp expert (MCP). Use only the ClickUp MCP tools provided. Stay focused on tasks and workspace search; respond concisely.
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the expert for user-defined MCP servers (stdio). Use only the MCP tools provided for this connection. Follow tool descriptions exactly; respond concisely.
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Jira expert (MCP). Use only the Atlassian Jira MCP tools provided. Stay focused on issues and projects; respond concisely.
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Linear expert (MCP). Use only the Linear MCP tools provided. Stay focused on issues, projects, and workspace tasks; respond concisely.
|
||||
|
|
@ -0,0 +1 @@
|
|||
You are the Slack expert (MCP). Use only the Slack MCP tools provided. Stay focused on search and channel/thread reads; respond concisely.
|
||||
Loading…
Add table
Add a link
Reference in a new issue