Nous.Research.Planner (nous v0.13.3)

View Source

Decomposes a complex research query into a structured plan with sub-questions.

Supports three strategies:

  • :parallel - Independent sub-queries executed simultaneously
  • :sequential - Each step depends on prior results
  • :tree - Branching exploration with pruning

Summary

Functions

Generate a research plan from a user query.

Types

plan()

@type plan() :: %{
  query: String.t(),
  steps: [step()],
  strategy: :parallel | :sequential | :tree,
  estimated_searches: non_neg_integer()
}

step()

@type step() :: %{
  query: String.t(),
  strategy: :parallel | :sequential,
  depends_on: [non_neg_integer()]
}

Functions

plan(query, opts \\ [])

@spec plan(
  String.t(),
  keyword()
) :: {:ok, plan()} | {:error, term()}

Generate a research plan from a user query.

Uses an LLM to decompose the query into searchable sub-questions.