AgenticPacks
Product

Research agent

Learn how a research run is queued, streamed, and saved.

The research agent is part of AgenticPacks Pro. A user submits a question, leaves the page, and comes back to a written report. OSS has no equivalent. Chat in OSS is a single streamed reply in the request.

This page covers the three roles in the graph, where the job runs, and how the browser hears about progress.

The graph

The job is a LangGraph graph with three roles.

  • The supervisor receives the question and decides the next step
  • The researcher calls Tavily for web results
  • The summarizer writes the report from those results

The graph does not run inside the Next.js request. POST enqueues a BullMQ job. packages/agent-worker consumes it. In the dev Compose file the worker is already started. If you run Next on the host, start npm run worker in a second terminal, or the job stays queued.

In the production image the worker is the same build, started as node dist/worker.mjs.

Status

The agent page opens GET /api/agent/status/[id]/stream and closes it when you leave, or when the job reaches a terminal status. GET /api/agent/status/[id] remains a single read if you only need the current row.

A job that was just enqueued may take a moment to appear. A job owned by someone else is returned as not found immediately, with no waiting period.

The finished report can be downloaded as Markdown or PDF.

Keys

TAVILY_API_KEY is what the researcher calls. Without it, that step has no web results. OPENAI_API_KEY is still required when the run also searches the user's documents. Without the OpenAI key, document search is skipped and the run can continue on web results alone, which is the behavior described in Knowledge.

Where to go next

Putting this process on a VPS is covered in Deploy.