Agents

Deep Research

Deep research is an autonomous multi-day research capability where a root agent decomposes a complex research question, spawns a swarm of specialized sub-agents to investigate each angle, and synthesizes findings into a structured report.

What deep research does

Unlike a single-turn research query, deep research operates over an extended period and can span multiple sessions:

  • The root agent receives a research goal and decomposes it into 3–10 research threads
  • Each thread is assigned to a sub-agent with appropriate web search, document analysis, and data synthesis tools
  • Sub-agents work concurrently, writing intermediate findings to the blackboard and memory
  • The root agent periodically synthesizes partial results and identifies gaps that need further investigation
  • When the research goal is satisfied (or a configured time/turn limit is reached), a structured final report is produced

Triggering deep research

Deep research is triggered by calling the deep_research tool or via the REST API:

bash
# Via REST API
curl -X POST http://localhost:3000/agents/research-agent/research \\
  -H "Authorization: Bearer ${JWT_TOKEN}" \\
  -H "Content-Type: application/json" \\
  -d '{
    "goal": "Analyze the current state of vector database technology and recommend the best option for our use case (RAG with ~10M documents, 1K QPS, hybrid BM25+vector)",
    "maxDays": 3,
    "maxTurns": 50,
    "outputFormat": "report"
  }'

Output format

Deep research produces a structured report with the following sections:

  • Executive summary — 2–3 sentence overview of key findings
  • Research threads — Summary of each sub-agent's investigation
  • Key findings — Numbered list of the most important discoveries
  • Recommendations — Actionable recommendations based on the findings
  • Sources — Citations with URLs for all referenced materials
  • Confidence assessment — Where the research is confident vs. uncertain

Configuration

yaml
research:
  enabled: true
  maxDays: 3              # Maximum days a research session can run
  maxTurnsPerSession: 50  # Maximum agent turns across all sub-agents
  maxSubAgents: 8         # Maximum concurrent research sub-agents
  outputFormat: report    # report | json | markdown
  saveToMemory: true      # Save findings to workspace memory after completion

Progress tracking

Deep research progress can be tracked via the event stream or REST API:

bash
# Get research session status
GET /research/:sessionId

# Subscribe to progress events (SSE)
GET /research/:sessionId/stream
Deep research sessions can be paused and resumed across gateway restarts. In-progress findings are persisted to memory and the blackboard state is checkpointed to PostgreSQL.