Back

Summer Contributions - Your Own Deep Research Agents

June 5, 2025 by Jeff Haynie

Agentuity Chat Interface

Community member Nick Nance used Agentuity to show that anyone can have their own deep research agents, with full code control. Get it here: deep-research-js.

What It Does

It's a sophisticated multi-agent system that conducts research on any topic and generates detailed reports. The system uses multiple specialized AI agents working together to search the web, analyze information, and produce high-quality research reports.

How It Works

Nick's deep research setup is a multi-agent architecture with four specialized agents:

  • 🎯 Orchestrator Agent: Coordinates the entire workflow and manages agent communication
  • 🔬 Researcher Agent: Conducts deep, iterative research with configurable depth and breadth
  • 🌐 Web Search Agent: Performs intelligent web searches with relevance evaluation using the Exa API
  • ✍️ Author Agent: Synthesizes research findings into comprehensive, well-structured reports

The flow goes something like this:

  1. Research Request: Submit a query with optional depth and breadth parameters
  2. Query Generation: The researcher generates multiple search queries related to the topic
  3. Web Search: Each query is processed by the web search agent using Exa API
  4. Relevance Evaluation: Claude evaluates search results for relevance and quality
  5. Iterative Research: The system conducts multiple rounds of research, building on previous findings
  6. Report Generation: The author agent synthesizes all findings into a comprehensive report
  7. Delivery: The final report is returned in Markdown format

Some Notable Things

In Agentuity, an "agent" is a first class citizen, meaning it gets it's own infrastructure, routing, security, and more. This is regardless if you're using a framework that has "agents" as well. e.g. you can have 10 Crew agents inside one Agentuity agent or if you want them to have separate infrastructure, scale separately, have their own individual security keys, etc. you can do that too.

You'll notice Nick has separated each of this main agents as their own Agentuity agents. That means each of them can scale independently, can be called separately, and more.

const researcher = await ctx.getAgent({ name: "researcher" });
const researchResults = await researcher.run({
	data: {
		query: input,
		depth,
		breadth,
		maxResults,
	},
});

If you'd like to learn more on how that works and other agent to agent communication approaches, check out the Agentuity guide.

Another thing I thought was interesting is how Nick uses a reflection prompt to evaluate the quality of the research (this is inside ther researcher agent):

const REFLECTION_PROMPT = (
	prompt: string,
	queries: string,
	learnings: { followUpQuestions: string[]; learning: string }
) => `Overall research goal: ${prompt}\n\n
          Previous search queries: ${queries}\n\n
          Follow-up questions: ${learnings.followUpQuestions.join(", ")}
          `;

// Later...
for (const searchResult of searchResults) {
	const learnings = await generateLearnings(query, searchResult);
	accumulatedResearch.learnings.push(learnings);
	accumulatedResearch.completedQueries.push(query);

	const queries = accumulatedResearch.completedQueries.join(", ");
	const newQuery = REFLECTION_PROMPT(prompt, queries, learnings);
	await deepResearch(
		newQuery,
		researcher,
		accumulatedResearch,
		depth - 1,
		Math.ceil(breadth / 2)
	);
}

How to Use It

Check the README for details on env vars and the like you'll need. To make it your own on Agentuity, it's as simple as:

  1. Clone the repo`

  2. agentuity project import

  3. agentuity deploy

Community Spotlight

GitHub Profile Summary

Want to contribute to our summer series? Share your Agentuity projects with us on Discord or tag us on social media.