diff --git a/surfsense_backend/app/agents/new_chat/tools/__init__.py b/surfsense_backend/app/agents/new_chat/tools/__init__.py index b89988327..b531d9b4d 100644 --- a/surfsense_backend/app/agents/new_chat/tools/__init__.py +++ b/surfsense_backend/app/agents/new_chat/tools/__init__.py @@ -6,6 +6,7 @@ To add a new tool, see the documentation in registry.py. Available tools: - search_knowledge_base: Search the user's personal knowledge base +- search_surfsense_docs: Search Surfsense documentation for usage help - generate_podcast: Generate audio podcasts from content - link_preview: Fetch rich previews for URLs - display_image: Display images in chat @@ -31,6 +32,7 @@ from .registry import ( get_tool_by_name, ) from .scrape_webpage import create_scrape_webpage_tool +from .search_surfsense_docs import create_search_surfsense_docs_tool __all__ = [ # Registry @@ -43,6 +45,7 @@ __all__ = [ "create_link_preview_tool", "create_scrape_webpage_tool", "create_search_knowledge_base_tool", + "create_search_surfsense_docs_tool", # Knowledge base utilities "format_documents_for_context", "get_all_tool_names", diff --git a/surfsense_backend/app/agents/new_chat/tools/registry.py b/surfsense_backend/app/agents/new_chat/tools/registry.py index bc305aecc..c7439bf8f 100644 --- a/surfsense_backend/app/agents/new_chat/tools/registry.py +++ b/surfsense_backend/app/agents/new_chat/tools/registry.py @@ -48,6 +48,7 @@ from .knowledge_base import create_search_knowledge_base_tool from .link_preview import create_link_preview_tool from .podcast import create_generate_podcast_tool from .scrape_webpage import create_scrape_webpage_tool +from .search_surfsense_docs import create_search_surfsense_docs_tool # ============================================================================= # Tool Definition @@ -126,6 +127,15 @@ BUILTIN_TOOLS: list[ToolDefinition] = [ requires=[], # firecrawl_api_key is optional ), # Note: write_todos is now provided by TodoListMiddleware from deepagents + # Surfsense documentation search tool + ToolDefinition( + name="search_surfsense_docs", + description="Search Surfsense documentation for help with using the application", + factory=lambda deps: create_search_surfsense_docs_tool( + db_session=deps["db_session"], + ), + requires=["db_session"], + ), # ========================================================================= # ADD YOUR CUSTOM TOOLS BELOW # =========================================================================