Consult Ralph is an autonomous deep research AI agent for consultants. It generates comprehensive due diligence reports, market analyses, competitive landscapes, and strategic insights in minutes. It can also run multiple research tasks simultaneously, like a swarm of agents completing in minutes what would normally take days or weeks or months.
Built for consultants at any top firms: EY, Deloitte, PwC, KPMG, McKinsey, BCG, Bain, investment banks etc.
This tool transforms hours of manual research into minutes of automated intelligence gathering. Input your research topic, and receive:
- 📄 Comprehensive PDF Report - Detailed analysis with executive summary, findings, and recommendations
- 📊 Data Spreadsheet (CSV) - Structured data, competitor comparisons, and key metrics
- 📝 Executive Summary (DOCX) - One-page briefing document for leadership presentations
- 🎯 PowerPoint Deck (PPTX) - Presentation-ready slides for client meetings
- 🔗 Cited Sources - All findings backed by verifiable sources
| Type | Use Case | Example Inputs |
|---|---|---|
| Company Due Diligence | M&A targets, investment analysis, competitor deep-dives | "Stripe", "Databricks", "SpaceX" |
| Market Analysis | TAM/SAM/SOM sizing, market entry decisions | "Electric Vehicle Market", "Cloud Computing" |
| Competitive Landscape | Category mapping, positioning analysis | "CRM Software", "Food Delivery Apps" |
| Industry Overview | Sector research, value chain analysis | "Fintech", "Healthcare IT", "Renewable Energy" |
| Custom Research | Any business intelligence question | Free-form queries |
- Deep AI Research - Leverages Valyu's Deep Research API to search across thousands of sources
- Real-time Progress - Visual indicators showing research stages and completion
- Professional Deliverables - Consulting-quality PDF reports, spreadsheets, presentations, and summaries
- Multiple Research Types - Company, market, competitive, industry, or custom research
- Advanced Options - Add client context, specific questions, and research focus areas
- Dark Mode by Default - Sleek dark UI with light mode toggle available
ConsultRalph supports two deployment modes controlled by the NEXT_PUBLIC_APP_MODE environment variable:
NEXT_PUBLIC_APP_MODE=self-hosted- No user authentication required — anyone with access to the app can run research
- Uses a single server-side Valyu API key (
VALYU_API_KEY) for all requests - All research costs are billed to the API key owner
- Ideal for internal team deployments, personal use, or private instances
- Only requires
VALYU_API_KEYto be set
NEXT_PUBLIC_APP_MODE=valyu- Requires user authentication via OAuth 2.0 with PKCE (Valyu as identity provider)
- Each user signs in with their Valyu account and uses their own credits
- Research costs are billed to the individual user's Valyu account
- Ideal for public-facing deployments like consultralph.com
- Requires OAuth configuration:
NEXT_PUBLIC_VALYU_CLIENT_ID,VALYU_CLIENT_SECRET,NEXT_PUBLIC_VALYU_AUTH_URL,VALYU_APP_URL, andNEXT_PUBLIC_REDIRECT_URI
| Component | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS 4 |
| AI Research | Valyu Deep Research API |
| Auth | OAuth 2.0 with PKCE (Valyu mode) |
| State | Zustand |
| Markdown | react-markdown with GFM |
| Icons | Lucide React |
- Node.js 18+
- npm, yarn, or pnpm
- Valyu API key (get one at valyu.ai)
-
Clone the repository
git clone https://github.com/unicodeveloper/consultralph.git cd consultralph -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
-
Configure your mode
For self-hosted mode (simplest setup):
NEXT_PUBLIC_APP_MODE=self-hosted VALYU_API_KEY=your_valyu_api_key_here
For Valyu mode (with user authentication):
NEXT_PUBLIC_APP_MODE=valyu NEXT_PUBLIC_VALYU_CLIENT_ID=your_client_id_here VALYU_CLIENT_SECRET=your_client_secret_here NEXT_PUBLIC_VALYU_AUTH_URL=https://auth.valyu.ai VALYU_APP_URL=https://platform.valyu.ai NEXT_PUBLIC_REDIRECT_URI=http://localhost:3000/auth/valyu/callback
-
Run the development server
npm run dev
- Select a research type (Company, Market, Competitive, Industry, or Custom)
- Enter your research subject
- Click "Start Deep Research"
- Wait 5-10 minutes for comprehensive results
- Download your deliverables (PDF, CSV, DOCX, PPTX)
Expand "Advanced Options" to add:
- Research Focus - Specify particular aspects to emphasize
- Client Context - Tailor analysis for specific use cases (e.g., "PE firm evaluating acquisition" or "Fortune 500 company exploring market entry")
- Specific Questions - List questions that must be directly answered
Company Due Diligence:
"OpenAI" with focus on "competitive positioning in enterprise AI and recent partnership strategies"
Market Analysis:
"Digital Payments Market" with context "Client is a regional bank exploring fintech partnerships"
Competitive Landscape:
"Cloud Infrastructure Providers" with questions "What are the key differentiators between AWS, Azure, and GCP for enterprise customers?"
- Click the button above
- Add your
VALYU_API_KEYenvironment variable - Set
NEXT_PUBLIC_APP_MODE=self-hosted(orvalyuwith OAuth config) - Deploy
npm i -g vercel
vercelAdd environment variables in the Vercel dashboard.
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
CMD ["npm", "start"]consultralph/
├── app/
│ ├── api/
│ │ └── consulting-research/
│ │ ├── route.ts # Create research task
│ │ ├── status/route.ts # Get task status
│ │ ├── public-status/route.ts # Public report access
│ │ └── cancel/route.ts # Cancel task
│ ├── components/
│ │ ├── ConsultingResearchForm.tsx # Main research form
│ │ ├── ResearchResults.tsx # Results display
│ │ ├── ResearchActivityFeed.tsx # Live activity feed
│ │ ├── Sidebar.tsx # Navigation sidebar
│ │ ├── ExampleReports.tsx # Example report cards
│ │ ├── GitHubCorner.tsx # GitHub link
│ │ └── auth/ # OAuth components
│ │ ├── sign-in-modal.tsx
│ │ ├── sign-in-panel.tsx
│ │ └── auth-initializer.tsx
│ ├── lib/
│ │ ├── app-mode.ts # Self-hosted vs Valyu mode helpers
│ │ └── researchHistory.ts # Local research history
│ ├── stores/
│ │ ├── auth-store.ts # Auth state (Zustand)
│ │ └── theme-store.ts # Theme state (Zustand)
│ ├── globals.css # Global styles & theme variables
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main page
├── public/ # Static assets
├── .env.example # Environment template
├── package.json
├── tsconfig.json
└── README.md
Create a new research task.
Request Body:
{
"researchType": "company",
"researchSubject": "Stripe",
"researchFocus": "Focus on payment infrastructure and developer experience",
"clientContext": "PE firm evaluating fintech investments",
"specificQuestions": "What is Stripe's market share?\nWho are the main competitors?"
}Response:
{
"deepresearch_id": "dr_abc123",
"status": "queued"
}Get research task status.
Query Parameters:
taskId- The research task ID
Response:
{
"status": "completed",
"task_id": "dr_abc123",
"output": "# Research Report\n...",
"sources": [...],
"deliverables": [...],
"pdf_url": "https://...",
"usage": {
"search_units": 50,
"ai_units": 100,
"compute_units": 25,
"total_cost": 1.50
}
}Cancel a running research task.
Request Body:
{
"taskId": "dr_abc123"
}Contributions are welcome! Please read our contributing guidelines before submitting a PR.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
- Valyu - Deep Research API
- Next.js - React Framework
- Tailwind CSS - Styling
- Lucide - Icons
Built with ❤️ for consultants who value their time.
Join our Discord for updates and support.
