AltmanGPT is an immersive AI "Digital Twin" of Sam Altman, designed to simulate conversation with the OpenAI CEO. It goes beyond simple mimicry by using RAG (Retrieval-Augmented Generation) to ground every answer in Sam's actual blog posts, essays, and public writings.
Featuring a "YC Partner Roast Mode", Voice Input, and a premium dark-mode aesthetic, this project demonstrates how to build high-quality, persona-driven AI applications using Google's Gemini 2.5 Flash model.
- 🧠 Authentic RAG Intelligence: Answers are retrieved from a vector database (Pinecone) containing Sam Altman's real writings, ensuring the advice is grounded in his philosophy.
- 🔥 "Roast My Startup" Mode: A toggleable mode where the AI switches personas from "Calm CEO" to "Ruthless YC Partner," specifically designed to stress-test startup pitches.
- 🎙️ Voice-First Interface: Real-time Speech-to-Text integration allows users to speak directly to the AI, creating a more natural conversational flow.
- 🔐 User Authentication: Secure Google Sign-In integration via Firebase Authentication.
- 🎨 Premium Aesthetic: A bespoke "Crimson/Dark" UI with glassmorphism, smooth animations, and the Inter typography system.
- Framework: React.js (Vite)
- Styling: Tailwind CSS + Custom CSS Variables
- Auth: Firebase Authentication (Google Provider)
- State: React Hooks (useState, useEffect, useRef)
- Icons: Lucide React
- Runtime: Node.js & Express
- AI Model: Google Gemini 2.5 Flash (via
@google/genaiSDK) - Vector DB: Pinecone (for RAG context retrieval)
- Embedding: Text embedding model for semantic search
- Node.js (v18+)
- A Google Gemini API Key
- A Pinecone API Key (and an index named
samagpt) - A Firebase Project
git clone https://github.com/creation22/samagpt.git
cd samagptNavigate to the backend folder and install dependencies:
cd backend
npm installCreate a .env file in the backend directory:
API_KEY=your_google_gemini_api_key
PINECONE_API_KEY=your_pinecone_api_keyStart the backend server:
node server.jsServer runs on http://localhost:5000
Navigate to the frontend folder and install dependencies:
cd ../frontend
npm installConfigure Firebase:
Open src/firebase.js and replace the placeholder config with your Firebase credentials:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT.firebaseapp.com",
// ... other keys
};Start the development server:
npm run devFrontend runs on http://localhost:5173
- Input: User types or speaks a question (e.g., "How do I find product-market fit?").
- Context: The backend queries Pinecone for the most relevant paragraphs from Sam's blog.
- Prompting: The system constructs a prompt combining:
- The User's Question
- The Retrieved Context
- The Selected Persona (Standard vs. Roast)
- Generation: Google Gemini 2.5 Flash generates a response in Sam's style.
- Delivery: The response is streamed/sent back to the React UI.
This project is open-source and available under the MIT License.
Built with ❤️ for the Hackathon.
