""" Hermes Plugin: research-agent Добавляет 3 инструмента веб-исследования: - deep_research — многошаговое глубокое исследование (Perplexity Deep Research) - perplexity_search — быстрый одношаговый поиск с синтезом (Perplexity) - youtube_analyze — анализ YouTube-видео с таймкодами Все инструменты используют SearXNG для поиска и локальный LLM для синтеза. Скрипты в scripts/ самодостаточны — плагин не требует внешних файлов. Установка: hermes plugins install n1kt4r/hermes-research-plugin """ from .schemas import DEEP_RESEARCH_SCHEMA, PERPLEXITY_SEARCH_SCHEMA, YOUTUBE_ANALYZE_SCHEMA from .tools import handle_deep_research, handle_perplexity_search, handle_youtube_analyze def register(ctx): """Регистрация инструментов в Hermes. Вызывается PluginManager при старте.""" # ─── deep_research ──────────────────────────────────────────────────── ctx.register_tool( name="deep_research", toolset="research_agent", schema=DEEP_RESEARCH_SCHEMA, handler=handle_deep_research, description=( "Deep multi-step web research with 2 search rounds, gap analysis, " "and structured report with inline citations [N] and source URLs. " "Use for in-depth analytical reports. Takes 2-5 min." ), ) # ─── perplexity_search ──────────────────────────────────────────────── ctx.register_tool( name="perplexity_search", toolset="research_agent", schema=PERPLEXITY_SEARCH_SCHEMA, handler=handle_perplexity_search, description=( "Quick one-shot Perplexity-style search — reads top articles " "and synthesizes a structured report with citations [N]. " "Use for factual lookups and quick overviews. Takes 30-90 sec." ), ) # ─── youtube_analyze ────────────────────────────────────────────────── ctx.register_tool( name="youtube_analyze", toolset="research_agent", schema=YOUTUBE_ANALYZE_SCHEMA, handler=handle_youtube_analyze, description=( "Analyze YouTube videos — extract key points, timestamps [MM:SS], " "and quotes. By URL or search query. Takes 1-3 min." ), )