Inspiration
In the modern enterprise, information is abundant, but synthesis is the bottleneck. Standard AI chatbots give short, surface-level answers that lack deep citations, while human analysts spend 6+ hours opening dozens of browser tabs just to write a preliminary market report. We were inspired to build an autonomous "Principal Analyst" agent. We wanted to orchestrate the raw reasoning power of NVIDIA's Nemotron models on the lightning-fast Nebius AI Cloud to fully automate the deep-dive research process—delivering enterprise-grade, fully cited reports in under 60 seconds.
What it does
DeepDive-Research Agent is a multi-stage autonomous AI researcher wrapped in a premium, glassmorphism SaaS dashboard. When a user inputs a complex research topic (e.g., "State of GPU Cloud Infrastructure in 2026"), the agent executes a 3-step pipeline:
- Query Planning: It uses Nemotron to deconstruct the prompt into distinct, highly optimized search queries.
- Web Grounding: It calls the Tavily Search API to fetch raw, ad-free text from the most recent and relevant web sources.
- Deep Synthesis: It streams a comprehensive Markdown report—complete with executive summaries, metrics, and inline citations (e.g., [1], [2])—directly to the user's dashboard.
How we built it
We split the architecture into a decoupled frontend and backend for maximum performance and zero bloat:
- Frontend: Built with Next.js (App Router), TypeScript, and Tailwind CSS. We designed a premium "Dark Mode First" frosted-glass (glassmorphism) aesthetic. We utilized Framer Motion for buttery-smooth animations, including glowing background orbs and staggered rendering of the report.
- Backend: A FastAPI (Python) server orchestrating the agent logic. It leverages Server-Sent Events (SSE) to stream the AI's token generation live to the client.
- AI & Compute: We utilized the Nebius Token Factory (OpenAI-compatible API) to access NVIDIA's state-of-the-art open-source models (specifically
Llama-3.1-Nemotron-70B-Instruct-HF). We used low-temperature prompting for strict JSON query planning, and higher temperature for fluid report synthesis.
Challenges we ran into
- Infinite Loading & Streaming Bugs: Implementing live token streaming between a Next.js client and a FastAPI backend led to CORS blocks and hanging UI states. We had to heavily engineer the
StreamingResponsein FastAPI to handle exceptions gracefully and yield explicit[DONE]tokens so the UI knew exactly when to transition states. - JSON Formatting from LLMs: Ensuring the model strictly returned parseable JSON arrays for the initial search queries required aggressive system prompting and implementing a robust fallback/cleaning function on the backend.
- UI/UX Refinement: Our initial prototype looked rigid and basic. We had to completely overhaul the DOM in the final hours to implement a modern, translucent workspace using CSS radial gradients and
backdrop-blur-xlproperties without dropping frame rates.
Accomplishments that we're proud of
- Zero Hallucinations: By restricting the context window strictly to Tavily's output, every claim made by the agent is tied to a real-world, verifiable URL.
- The "Premium" Feel: We successfully built a dashboard that doesn't just look like a hackathon weekend project, but feels like a MAANG-ready, scalable enterprise product.
- Nebius Integration: Flawlessly porting our OpenAI-standard code over to the Nebius Token Factory in minutes, and taking full advantage of their incredibly fast inference speeds for the 70B model.
What we learned
- Advanced Prompt Engineering: We learned how to successfully chain prompts across different model calls (Planner -> Synthesizer) rather than relying on a single, messy mega-prompt.
- Streaming Architecture: We mastered the
EventSourceAPI in the browser to efficiently consume real-time text streams from a Python backend. - The Value of Aesthetic: We learned that user trust in an AI agent skyrockets when the UI is highly polished, animated, and responsive to background processes.
What's next for DeepDive-Research Agent
- Multi-Modal Export: Implementing a custom PDF engine (using tools like WeasyPrint or ReportLab) to generate downloadable, branded pitch decks and executive summaries.
- Memory Graph: Adding persistent memory using a vector database (like Qdrant) so the agent remembers a user's previous research and builds compounding knowledge over time.
- Open-Source Release: Cleaning up the repository to share our multi-agent FastAPI template with the broader NVIDIA and Nebius developer communities.
Built With
- agent
- fastapi
- llm
- nebius
- nemotron
- next.js
- nvidia
- openai-api
- python
- react
- tailwind-css
- tavily
- typescript