Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

Generative Interfaces ·Advanced

AI Deep Research Agent

About this app

A deep research assistant that plans, searches the web, writes to a virtual filesystem, and renders each tool call as a live card in a workspace pane. Built with CopilotKit Deep Agents( AG-UI and Tavily( on top of Next.js + LangGraph (Python).

  • Complete open-source code
  • Step-by-step tutorial

Technical sheet

Category
Generative Interfaces
Difficulty
Advanced
Models
OpenAI
Frameworks
LangChain
Runs locally?
Needs cloud APIs
Required keys
OPENAI_API_KEYTAVILY_API_KEY

License Apache-2.0 · content curated and maintained by Doutor AI.

Full tutorial

A deep research assistant that plans, searches the web, writes to a virtual filesystem, and renders each tool call as a live card in a workspace pane. Built with CopilotKit, Deep Agents, AG-UI, and Tavily on top of Next.js + LangGraph (Python).

https://github.com/user-attachments/assets/68d5729f-91f9-4fd9-a579-cd1a8f4aad8d

Gen UI concept - tool-rendered components with a sidecar workspace. The Deep Agent emits four tools - write_todos, write_file, read_file, and research - and each one renders inline as a status card in the chat while updating a parallel workspace pane (plan, files, expandable tool results). Local React state mirrors the agent's filesystem via useDefaultTool rather than useCoAgent, sidestepping a Python Dict ↔ TypeScript Array type mismatch.

Prerequisites

Getting Started

  1. Install Node dependencies:
npm install
  1. Install Python dependencies for the agent:
cd agent
uv venv && source .venv/bin/activate
uv pip install -e .
cd ..

Or with pip:

cd agent
python -m venv .venv && source .venv/bin/activate
pip install -e .
cd ..
  1. Copy .env.example to .env in both the root and agent/ directories, then fill in OPENAI_API_KEY and TAVILY_API_KEY.
  1. Start the agent (terminal 1):
cd agent
uv run python main.py
  1. Start the frontend (terminal 2):
npm run dev

Open http://localhost:3000 and ask the assistant to research any topic.

Architecture

[User asks research question]
        ↓
Next.js Frontend (CopilotChat + Workspace)
        ↓
CopilotKit Runtime → LangGraphHttpAgent
        ↓
Python Backend (FastAPI + AG-UI)
        ↓
Deep Agent (research_assistant)
    ├── write_todos        (planning, built-in)
    ├── write_file         (filesystem, built-in)
    ├── read_file          (filesystem, built-in)
    └── research(query)
            └── internal Deep Agent [thread-isolated]
                    └── internet_search (Tavily)

Environment Variables

VariableRequiredDefaultDescription
OPENAI_API_KEYYes-Get API key
TAVILY_API_KEYYes-Get API key
OPENAI_MODELNogpt-5.5Model to use (gpt-5.5)
LANGGRAPH_DEPLOYMENT_URLNohttp://localhost:8123Backend URL
SERVER_HOSTNo0.0.0.0Backend host
SERVER_PORTNo8123Backend port

Learn more

License

Upstream license applies - see CopilotKit/CopilotKit.

From the same category

Generative InterfacesAdvanced

AI Dashboard Canvas Agent

An agent that populates live charts, metrics, and real-time data into a Canvas dashboard instead of just streaming text. Built with CopilotKit, AG-UI,…

  • OpenAI
  • Gemini
Generative InterfacesAdvanced

AI Financial Coach Agent

A multi-agent financial coach that analyzes your budget, plans your savings, and builds debt-payoff strategies - rendered as interactive UI cards in a…

  • Gemini
Generative InterfacesAdvanced

AI Knowledge Explorer

Drop files - documents or source code - into a chatbot. The agent extracts entities, concepts, and relationships (or modules, classes, functions, and …

  • OpenAI
  • Claude
  • Gemini

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans