Research Agent with Gaia
May 6, 2025 ยท View on GitHub

A sophisticated AI-powered research assistant built with Next.js and Gaia. This research agent helps you conduct thorough and structured research on any topic by leveraging Gaia's decentralized computing infrastructure.
About Gaia
Gaia is a decentralized computing infrastructure that enables everyone to create, deploy, scale, and monetize their own AI agents. This project uses Gaia's AI capabilities to provide an intelligent research agent that can analyze, synthesize, and present information in a structured manner.
Features
Core Research Capabilities
- ๐ค Automated research planning and execution
- ๐ Multi-step research process
- ๐ Intelligent search and analysis
- ๐ง Information synthesis and summarization
- ๐ฌ Deep research capabilities with "dig deeper" functionality
User Interface
- ๐จ Modern, responsive design with Tailwind CSS
- ๐ฑ Interactive tabs for different research views
- โจ Smooth animations and transitions
- ๐ Real-time progress tracking
- โฟ Accessibility features (including reduced motion support)
Research Workflow
- Planning Phase: Creates a structured research plan
- Execution Phase: Carries out the research steps
- Evaluation Phase: Analyzes and processes findings
- Synthesis Phase: Summarizes research results
- Deep Research: Explores topics further with additional steps
Research Artifacts
- ๐ Web page analysis
- ๐ Academic paper processing
- ๐ป GitHub repository analysis
- ๐ Search result processing
- ๐ Summary generation
Setting Up Your Gaia Node
To use your own Gaia node with this application, follow these steps:
Option 1: Run Your Own Node
-
Install GaiaNet Node:
curl -sSfL 'https://github.com/GaiaNet-AI/gaianet-node/releases/latest/download/install.sh' | bash -
Initialize with a Model:
# For Llama-3-Groq-8B model (recommended for this project) gaianet init --config https://raw.githubusercontent.com/GaiaNet-AI/node-configs/main/llama-3-groq-8b-tool/config.json -
Start the Node:
gaianet start -
Update Your Application:
- Modify the API endpoint to point to your local node:
const GAIA_API_ENDPOINT = 'URL'; const GAIA_MODEL = 'Llama-3-Groq-8B-Tool';
Option 2: Get an API Key
-
Create an Account:
- Go to https://gaianet.ai and click on Launch App
- Connect your MetaMask wallet
-
Generate an API Key:
- Click on your profile dropdown and select Settings
- Navigate to Gaia API Keys and click Create API Key
- Give your key a name and save it securely
-
Update Your Application:
- Add your API key to the environment variables:
GAIA_API_KEY=your_api_key_here
System Requirements
If running your own node, ensure your system meets these requirements:
| System | Minimum Requirements |
|---|---|
| OSX with Apple Silicon (M1-M4 chip) | 16GB RAM (32GB recommended) |
| Ubuntu Linux 20.04 with Nvidia CUDA 12 SDK | 8GB VRAM on GPU |
| Azure/AWS | Nvidia T4 GPU Instance |
Tech Stack
- Next.js 15.3.1
- TypeScript
- Tailwind CSS
- Framer Motion
- AI SDK Integration
Getting Started
Prerequisites
- Node.js (Latest LTS version recommended)
- pnpm (Package manager)
Installation
- Clone the repository:
git clone git@github.com:meowyx/research-agent.git
cd research-agent
- Install dependencies:
pnpm install
- Set up environment variables:
# Create a .env file in the root directory
touch .env
Add the following environment variables to your .env file:
GAIA_MODEL_BASE_URL=
GAIA_API_KEY=
BRAVE_API_KEY=your_brave_api_key
- Start the development server:
pnpm dev
- Open http://localhost:3000 in your browser.
Project Structure
RESEARCH-AGENT/
โโโ app/ # Main application directory
โ โโโ api/ # API routes
โ โ โโโ research/ # Research API endpoints
โ โ โโโ dig-deeper/ # Deep research functionality
โ โ โ โโโ route.ts
โ โ โโโ execute/ # Research execution
โ โ โ โโโ route.ts
โ โ โโโ start/ # Start research process
โ โ โ โโโ route.ts
โ โ โโโ stream-summarize/ # Streaming summarization
โ โ โโโ route.ts
โ โโโ favicon.ico # Site favicon
โ โโโ globals.css # Global CSS styles
โ โโโ layout.tsx # Root layout component
โ โโโ page.tsx # Main page component
โโโ components/ # Reusable UI components
โ โโโ ui/ # UI component library
โ โ โโโ button.tsx
โ โ โโโ card.tsx
โ โ โโโ tabs.tsx
โ โ โโโ textarea.tsx
โ โโโ ResearchAgent.tsx # Main research agent component
โโโ lib/ # Library code and utilities
โ โโโ ai/ # AI-related functionality
โ โ โโโ config.ts # AI configuration settings
โ โโโ store/ # State management
โ โ โโโ sessions.ts # Session management
โ โโโ tools/ # Research tools
โ โ โโโ ResearchPlanner.ts # Research planning tool
โ โ โโโ SummarizationTool.ts # Content summarization tool
โ โ โโโ WebSearchTool.ts # Web search functionality
โ โโโ types/ # TypeScript type definitions
โ โโโ index.ts # Main type exports
โ โโโ utils.ts # Utility types
โโโ public/ # Static assets
โ
โโโ .env.example # Environment variables example
โโโ .gitignore # Git ignore file
โโโ components.json # Components configuration
โโโ README.md # Project documentation
โโโ tailwind.config.ts # Tailwind CSS configuration
Usage
- Enter your research query in the input field
- The agent will create a research plan
- Watch as it executes the research steps
- Review the results in different tabs:
- Plan: View the research strategy
- Results: See gathered information
- Summary: Read the synthesized findings
- Use "Dig Deeper" to explore topics further
Development
Available Scripts
pnpm dev- Start development server with Turbopackpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLint
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- Built with Next.js
- Powered by Gaia
- Animations powered by Framer Motion