mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
feat: add MCP connector backend support
This commit is contained in:
parent
8646fecc8b
commit
305a981d14
14 changed files with 1083 additions and 29 deletions
|
|
@ -20,7 +20,7 @@ from app.agents.new_chat.system_prompt import (
|
|||
build_configurable_system_prompt,
|
||||
build_surfsense_system_prompt,
|
||||
)
|
||||
from app.agents.new_chat.tools import build_tools
|
||||
from app.agents.new_chat.tools.registry import build_tools_async
|
||||
from app.services.connector_service import ConnectorService
|
||||
|
||||
# =============================================================================
|
||||
|
|
@ -28,7 +28,7 @@ from app.services.connector_service import ConnectorService
|
|||
# =============================================================================
|
||||
|
||||
|
||||
def create_surfsense_deep_agent(
|
||||
async def create_surfsense_deep_agent(
|
||||
llm: ChatLiteLLM,
|
||||
search_space_id: int,
|
||||
db_session: AsyncSession,
|
||||
|
|
@ -120,8 +120,8 @@ def create_surfsense_deep_agent(
|
|||
"firecrawl_api_key": firecrawl_api_key,
|
||||
}
|
||||
|
||||
# Build tools using the registry
|
||||
tools = build_tools(
|
||||
# Build tools using the async registry (includes MCP tools)
|
||||
tools = await build_tools_async(
|
||||
dependencies=dependencies,
|
||||
enabled_tools=enabled_tools,
|
||||
disabled_tools=disabled_tools,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue