{"id":28923525,"url":"https://github.com/supreme-gg-gg/multiflex","last_synced_at":"2026-04-22T21:39:00.547Z","repository":{"id":299760217,"uuid":"1002718187","full_name":"supreme-gg-gg/multiflex","owner":"supreme-gg-gg","description":"Like Google search, but powered by multi-agentic retrieval and generative UI","archived":false,"fork":false,"pushed_at":"2025-11-19T06:05:29.000Z","size":2171,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T05:29:14.011Z","etag":null,"topics":["agentic-ai","chromadb","gemini","google-cloud","langgraph","nextjs","search"],"latest_commit_sha":null,"homepage":"https://multiflex-75bba-1cadf.web.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supreme-gg-gg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T03:13:50.000Z","updated_at":"2025-11-19T06:05:38.000Z","dependencies_parsed_at":"2025-08-12T16:13:41.394Z","dependency_job_id":"f198f738-bb96-4e0f-8f00-2658e8af0c50","html_url":"https://github.com/supreme-gg-gg/multiflex","commit_stats":null,"previous_names":["supreme-gg-gg/multiflex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/supreme-gg-gg/multiflex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supreme-gg-gg%2Fmultiflex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supreme-gg-gg%2Fmultiflex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supreme-gg-gg%2Fmultiflex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supreme-gg-gg%2Fmultiflex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supreme-gg-gg","download_url":"https://codeload.github.com/supreme-gg-gg/multiflex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supreme-gg-gg%2Fmultiflex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32156606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","chromadb","gemini","google-cloud","langgraph","nextjs","search"],"created_at":"2025-06-22T09:05:22.184Z","updated_at":"2026-04-22T21:39:00.536Z","avatar_url":"https://github.com/supreme-gg-gg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultiFlex\n\nWe want to challenge how search and information is traditionally presented in AI systems. That's why we built AI agents that **go beyond chat interface — our platform lets AI generate dynamic, visual interfaces tailored** to your question.\n\nThe vision was to build agents that replace traditional search, with a focus on investigating how agents can dynamically create user-interfaces for different purposes such as presenting information, running simulations, handling user interactions, etc by writing and updating code in real time. Instead of restricting agents to chat interfaces, we let them unleash their creativity and context-awareness. We weren't able to find good enough models at the time (that balances robustness and latency) and ran out of time at the hackathon, **but the same vision was later built by the team behind Google Search, [in their Gemini 3.0 release video](https://youtu.be/uYQGrK55gxQ?si=HcjwyVGd7VeifxYJ)**. DeepMind released a [research demo on Gemini 2.5 called \"just-in-time generative UI\"](https://developers.googleblog.com/en/simulating-a-neural-operating-system-with-gemini-2-5-flash-lite/) with the exact same vision as well one week after our hackathon.\n\n\u003e [!WARNING]\n\u003e **This project is no longer maintained!** This is a proof-of-concept prototype that may not work in production.\n\n\u003e View us on [Devpost (NUS Hacks)](https://devpost.com/software/multiflex?ref_content=my-projects-tab\u0026ref_feature=my_projects) and our [demo video](https://youtu.be/Nu0qq5zvanM)\n\n**Key Features:**\n\n- Instead of just text, the AI can present answers as cards, tables, galleries, or custom layouts, choosing the best format for each context.\n- With advanced multimodal capabilities, RAG, searches, and real-time image generation, the system delivers responses enriched with images, structured data, and interactive elements—making complex topics clearer and learning more engaging.\n\n## Architecture\n\nOur full stack multi-agent application leverages cloud technologies for scalability and performance and cutting edge AI models like Gemini and Imagen for advanced language and multimodal capabilities.\n\n![Architecture](resources/design.png)\n\n## Multi-Agent System\n\nOur multi-agent architecture is orchestrated using LangGraph:\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"resources/graph_workflow.png\" alt=\"Agents\" width=\"40%\"\u003e\n\u003c/p\u003e\n\n### Research Agent\n\n- **Purpose**: Gathers comprehensive information from multiple sources\n- **Tools**: RAG search, web search, image search\n- **LLM**: Gemini 2.0 Flash for research planning and synthesis\n- **Output**: Consolidated knowledge base with documents, search results, and images\n\n### UI Designer Agent\n\n- **Purpose**: Creates interactive UI specifications based on research findings\n- **Tools**: UI image search, Imagen generation for custom visuals\n- **LLM**: Gemini 2.0 Flash (high creativity) for UI design\n- **Output**: Dynamic UI components with embedded content and generated images\n\n### LangGraph Orchestrator\n\n- **Purpose**: Coordinates agent workflow and state management\n- **Features**: Tool condition routing, state persistence, iteration control\n- **Flow**: Research → UI Design → Response Generation\n\n## Demo Photos\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"resources/home.png\" alt=\"Demo 1\" width=\"90%\"\u003e\n   \u003cimg src=\"resources/ui.png\" alt=\"Demo 2\" width=\"90%\"\u003e\n\u003c/p\u003e\n\n## Technology Stack\n\n### Backend\n\n- **Framework**: FastAPI with Uvicorn\n- **AI/ML**: LangChain, LangGraph, Google Gemini 2.0 Flash\n- **Vector Database**: ChromaDB with Google Embeddings\n- **Search**: DuckDuckGo Search API\n- **Image Generation**: Google Imagen\n- **Document Processing**: Unstructured, PyPDF, python-docx\n\n### Frontend\n\n- **Framework**: Next.js 14 with TypeScript\n- **Styling**: Tailwind CSS\n- **Components**: Custom dynamic UI renderers\n- **Build**: Static export for Firebase Hosting\n\n### Infrastructure\n\n- **Backend Hosting**: Google Cloud Run (serverless)\n- **Frontend Hosting**: Firebase Hosting\n- **CI/CD**: Google Cloud Build\n- **Storage**: Google Cloud Storage (optional)\n\n## For Developers\n\n### Project Structure\n\n```\nnus-hacks/\n├── backend/                     # Python FastAPI backend\n│   ├── src/\n│   │   ├── main.py             # FastAPI application\n│   │   ├── agent.py            # LangGraph multi-agent workflow\n│   │   ├── tools.py            # Research and UI generation tools\n│   │   ├── rag_manager.py      # ChromaDB RAG implementation\n│   │   └── upload.py           # Document upload handling\n│   ├── vectorstore_data/       # ChromaDB persistence\n│   ├── requirements.txt        # Python dependencies\n│   ├── Dockerfile             # Container configuration\n│   └── .env.example           # Environment template\n│\n├── frontend/                   # Next.js TypeScript frontend\n│   ├── src/\n│   │   ├── app/               # Next.js App Router\n│   │   │   ├── page.tsx       # Main chat interface\n│   │   │   ├── result/        # Response display page\n│   │   │   ├── upload/        # Document upload page\n│   │   │   └── manage/        # Document management\n│   │   └── components/        # Dynamic UI components\n│   │       ├── Card.tsx       # Content cards\n│   │       ├── Gallery.tsx    # Image galleries\n│   │       ├── Hero.tsx       # Hero sections\n│   │       ├── List.tsx       # Interactive lists\n│   │       ├── Stats.tsx      # Data displays\n│   │       └── Testimonial.tsx # Quote blocks\n│   ├── package.json           # Node.js dependencies\n│   └── firebase.json          # Firebase configuration\n│\n├── cloudbuild.yaml            # Google Cloud Build configuration\n└── README.md                  # This file\n```\n\n### Local Setup\n\n#### Backend Setup\n\n1. **Navigate to backend directory**:\n\n   ```bash\n   cd backend\n   ```\n\n2. **Create and activate virtual environment**:\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n\n3. **Install dependencies**:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Configure environment**:\n\n   ```bash\n   cp .env.example .env\n   ```\n\n   Edit `.env` with your credentials:\n\n   ```env\n   GOOGLE_API_KEY=your_google_api_key_here\n   CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000\n   ```\n\n5. **Run the backend server**:\n\n   ```bash\n   # From the backend directory\n   python -m src.main\n\n   # Or using uvicorn directly (recommended)\n   uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload\n   ```\n\n   Backend will be available at `http://localhost:8000`\n\n#### Frontend Setup\n\n1. **Navigate to frontend directory**:\n\n   ```bash\n   cd frontend\n   ```\n\n2. **Install dependencies**:\n\n   ```bash\n   npm install\n   ```\n\n3. **Configure environment** (create `.env.local`):\n\n   ```env\n   NEXT_PUBLIC_API_URL=http://localhost:8000\n   ```\n\n4. **Run development server**:\n\n   ```bash\n   npm run dev\n   ```\n\n   Frontend will be available at `http://localhost:3000`\n\n#### API Testing\n\nTest the backend directly:\n\n```bash\ncurl -X POST \"http://localhost:8000/api/agent\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"Explain quantum physics\", \"user_id\": \"test-user\"}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupreme-gg-gg%2Fmultiflex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupreme-gg-gg%2Fmultiflex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupreme-gg-gg%2Fmultiflex/lists"}