@leumas/research
Deep-research engine — iterative query -> web-search -> summarize -> reflect loop over @leumas/providers + the websearch/scraping adapters. Exposed as /api/research (JSON + SSE), the deep-research...
@leumas/research
The deep-research engine: an iterative query → web-search → summarize → reflect loop (ported from the legacy ollama-research tool, LangGraph dropped) that any Leumas surface can call.
- Engine —
runDeepResearch({ topic, loops, searchApi, provider, onEvent, signal, providerRegistry, adapters, connector }).
LLM calls ride the injected @leumas/providers registry; search rides the websearch adapter (DuckDuckGo/Wikipedia keyless, Tavily/Perplexity via env keys); full-page enrichment rides the scraping adapter. Runs persist to the research_runs dynamic collection when a connector is given.
- HTTP —
createResearchRouter(...)mounted at/api/research:POST /run(JSON) and
POST /run/stream (SSE: start · loop · query · sources · page · summary · reflection · final · done · error).
- Action —
deepResearchAction(...)registers thedeep-researchaction: rule-callable, and the
seeded research.deep functioncall (executor kind action) makes it a chatbot tool + MCP tool.
- Gating — logged-in +
intelligencemembership (admins bypass) + PassNodefeature:research.run.
Studio UI: the Intelligence domain's Research Lab. Smoke: pnpm smoke:research (network-free fakes).