mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
feat: register search_surfsense_docs tool in agent toolkit
This commit is contained in:
parent
1be9de9c24
commit
c4d214baa4
2 changed files with 13 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ To add a new tool, see the documentation in registry.py.
|
||||||
|
|
||||||
Available tools:
|
Available tools:
|
||||||
- search_knowledge_base: Search the user's personal knowledge base
|
- 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
|
- generate_podcast: Generate audio podcasts from content
|
||||||
- link_preview: Fetch rich previews for URLs
|
- link_preview: Fetch rich previews for URLs
|
||||||
- display_image: Display images in chat
|
- display_image: Display images in chat
|
||||||
|
|
@ -31,6 +32,7 @@ from .registry import (
|
||||||
get_tool_by_name,
|
get_tool_by_name,
|
||||||
)
|
)
|
||||||
from .scrape_webpage import create_scrape_webpage_tool
|
from .scrape_webpage import create_scrape_webpage_tool
|
||||||
|
from .search_surfsense_docs import create_search_surfsense_docs_tool
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
# Registry
|
# Registry
|
||||||
|
|
@ -43,6 +45,7 @@ __all__ = [
|
||||||
"create_link_preview_tool",
|
"create_link_preview_tool",
|
||||||
"create_scrape_webpage_tool",
|
"create_scrape_webpage_tool",
|
||||||
"create_search_knowledge_base_tool",
|
"create_search_knowledge_base_tool",
|
||||||
|
"create_search_surfsense_docs_tool",
|
||||||
# Knowledge base utilities
|
# Knowledge base utilities
|
||||||
"format_documents_for_context",
|
"format_documents_for_context",
|
||||||
"get_all_tool_names",
|
"get_all_tool_names",
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ from .knowledge_base import create_search_knowledge_base_tool
|
||||||
from .link_preview import create_link_preview_tool
|
from .link_preview import create_link_preview_tool
|
||||||
from .podcast import create_generate_podcast_tool
|
from .podcast import create_generate_podcast_tool
|
||||||
from .scrape_webpage import create_scrape_webpage_tool
|
from .scrape_webpage import create_scrape_webpage_tool
|
||||||
|
from .search_surfsense_docs import create_search_surfsense_docs_tool
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Tool Definition
|
# Tool Definition
|
||||||
|
|
@ -126,6 +127,15 @@ BUILTIN_TOOLS: list[ToolDefinition] = [
|
||||||
requires=[], # firecrawl_api_key is optional
|
requires=[], # firecrawl_api_key is optional
|
||||||
),
|
),
|
||||||
# Note: write_todos is now provided by TodoListMiddleware from deepagents
|
# 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
|
# ADD YOUR CUSTOM TOOLS BELOW
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue