Skip to main content

agrag.agents.subagents.make_researcher_spec

make_researcher_spec(tools:list[Any], middleware:list[Any], schema:GraphSchema) -> dict[str, Any]

Build the researcher subagent spec.

Parameters:

  • tools (list[Any]) – The tools this subagent may call.
  • middleware (list[Any]) – Middleware for this subagent's own model calls. Not inherited from the parent agent -- DeepAgents reads only this key for an isolated-mode subagent, never the top-level agent's own middleware.
  • schema (GraphSchema) – Fills the compact schema summary into RESEARCHER_SYSTEM.

Returns:

  • dict[str, Any] – A SubAgent-shaped dict for create_deep_agent's subagents= list.