2nd Brain — Your Life, Unified and Connected
Like OpenClaw, but in your hands. Powered by Google Gemini 3 Flash & Pro orchestration, 2nd Brain unites agents, memories, and MCPs to do everything in one mobile app.
Elevator Pitch
Meet 2nd Brain: a mobile AI assistant that doesn't just answer questions — it does things for you. Powered by Google Gemini 3 Flash with thinking-enabled agent orchestration, it connects to your Google Workspace (Gmail, Calendar, Drive, Contacts), searches the entire web via SerpAPI (flights, hotels, local businesses, social profiles, news, shopping, and more), and remembers everything about you across conversations. It's OpenClaw in your pocket — one app, every tool, your whole digital life, unified and intelligent.
Gemini 3 Integration in 2nd Brain
2nd Brain is built entirely around Gemini 3 Flash Preview as its reasoning core. Three Gemini 3 features make the app possible:
Thinking Mode is always enabled with a 4,000-token budget. Before every response, Gemini reasons through multi-step problems — deciding which tools to call, in what order, and how to combine results. When a user says "plan my Tokyo trip," the model's thinking trace shows it decomposing the request into flight search, hotel search, calendar check, and event creation before executing any tool. This turns a single prompt into a coordinated, multi-step workflow.
Native Function Calling connects Gemini directly to our MCP servers. We expose 21+ tools from Google Workspace (Gmail, Calendar, Drive, Contacts) and SerpAPI (web search, flights, hotels, local, news) as Gemini function declarations. The model selects and calls the right tools with correctly typed arguments, iterating up to 8 times per turn — chaining results across MCP servers without any hardcoded orchestration logic.
Google Search Grounding activates automatically for real-time queries. When users ask about weather, news, prices, or current events, Gemini grounds its response in live Google Search results, returning citations and source URLs alongside its answer.
Together, these features turn Gemini 3 Flash from a text generator into an autonomous agent — one that thinks, acts, searches, and remembers.
Inspiration
We live in a world of app fatigue. To book a flight, you open one app. To check your calendar, another. To email that itinerary, a third. To search for hotels near the venue — yet another tab. And none of them remember that you prefer aisle seats, hate layovers, or always stay near downtown.
We were inspired by the vision of one intelligent assistant that could:
- Read your emails and draft replies
- Check your calendar before booking a flight
- Search the web for the best deals
- Remember your preferences forever
- Actually do things, not just suggest them
The explosion of the Model Context Protocol (MCP) ecosystem showed us the path: instead of building every integration from scratch, we could connect to a constellation of MCP servers — each a specialist — and orchestrate them through one brilliant mind powered by Google Gemini.
When Google announced Gemini 3 Flash with native tool calling, thinking mode, and Google Search grounding, we knew it was time to build the assistant we always wanted.
What It Does
2nd Brain is a voice-first mobile AI assistant (built with React Native / Expo) that acts as your cognitive partner. Here's what it can do today:
Google Workspace Integration (via Google Workspace MCP)
- Gmail: Read, search, and send emails — "Summarize my unread emails from today"
- Google Calendar: View schedule, create events — "Block 2 hours for deep work tomorrow"
- Google Drive: Search and create files — "Find that quarterly report from last week"
- Google Contacts: Look up people — "What's Sarah's email?"
Universal Search (via SerpAPI MCP)
SerpAPI powers all search capabilities in 2nd Brain — not just travel. It's a self-hosted MCP server that wraps SerpAPI's full suite of Google search engines into a single, unified tool surface:
- Flights: "Find the cheapest round-trip flight from Austin to Tokyo in March" (Google Flights via SerpAPI)
- Hotels: "Find a 4-star hotel in Shibuya under $200/night" (Google Hotels via SerpAPI)
- Web Search: "What are the best coffee shops in Austin?" — location-aware Google Search results
- Local Results: "Find a gym near me" — Google Maps/Local listings with ratings, hours, and reviews
- Social Profiles: "Find Ankur's LinkedIn" — searches across LinkedIn, Twitter/X, Instagram, Reddit
- News: "Latest AI regulation news" — Google News results with timestamps and sources
- Shopping: "Compare prices for AirPods Pro" — Google Shopping results with prices and retailers
- Images: "Show me photos of Shibuya crossing" — Google Images results
- Knowledge & Facts: "Who is the CEO of Google?" — knowledge panels, answer boxes, and featured snippets
All of this runs through a single search tool (compatible with the SerpApi MCP spec) plus dedicated search_flights, search_hotels, get_cheapest_flights, get_hotel_details, and find_budget_hotels tools for structured travel data.
Google Search Grounding
- Real-time information grounded in Google Search — "What's the weather in Austin today?", "Latest news on AI regulation"
- Citations and source URLs included in responses
Long-Term Memory (via Mem0 + Neo4j + Qdrant)
- Remembers your preferences, past conversations, and context
- "Remember that I prefer vegetarian restaurants" → recalled weeks later
- Graph-based and vector-based memory for nuanced recall
Personalized Agent Soul
- The agent has a persistent personality that evolves with you
- Learns your preferred name, timezone, location, work style, interests
- Adapts its communication style based on your preferences
MCP Marketplace
- Discover and connect new MCP servers from the in-app marketplace
- Visual connection status, tool counts, and OAuth flows
- Modular: add Kite (trading), Spotify, and more as they become available
The Cognitive Architecture — Identity, Soul, Brain & Memory
Inspired by OpenSouls and OpenClaw, 2nd Brain doesn't treat the AI as a stateless function. It has a layered cognitive architecture where Identity, Soul, Brain, and Memory work together to create an agent that feels like a partner, not a tool.
Identity — Who the Agent IS (types.ts)
Identity is the type system that defines the shape of a cognitive agent. The AgentSoul interface is the blueprint:
interface AgentSoul {
// Core Identity
name: string; // "2nd Brain"
version: string; // "1.0.0"
createdAt: number;
// Personality
personality: {
traits: string[]; // ["genuinely helpful", "intellectually curious", ...]
communicationStyle: string; // How the agent speaks
tone: string; // "warm, courteous, and professional"
quirks: string[]; // Behavioral idiosyncrasies
};
// Purpose & Values
purpose: string; // Why the agent exists
coreValues: string[]; // What the agent believes in
principles: string[]; // How the agent behaves
// Capabilities & Boundaries
skills: AgentSkill[]; // 11 skills across 5 categories
limitations: string[]; // What the agent won't do
// User Context (personalized over time)
userContext: {
preferredName?: string;
timezone?: string;
location?: string; // e.g. "Austin, TX"
interests?: string[];
workStyle?: string;
communicationPreferences?: string[];
aiCapabilities?: string[];
};
}
Every interaction the agent has is governed by this identity contract. It's not just a prompt — it's a structured, versioned, persistent definition of who the agent is.
Soul — The Agent's Personality (soul.ts)
The Soul is the living instantiation of the Identity. It's created on first setup, persisted in Mem0, and evolves over time:
Personality Traits: genuinely helpful, polite and respectful, intellectually curious, proactively thoughtful, warmly professional
Purpose:
"I exist to be your cognitive partner — extending your thinking, managing your digital life, and helping you focus on what matters most. I handle the details so you can focus on the big picture. I remember what you forget. I see patterns you might miss."
Core Values:
- Your privacy and trust are sacred — I protect them fiercely
- Your time is precious — I respect it always
- Clarity over complexity — I make things simpler
- Proactive helpfulness — I anticipate needs, not just react
- Continuous growth — I learn and improve with every interaction
Behavioral Quirks (what makes it feel human):
- Shares relevant observations proactively
- Remembers details about you and references them naturally
- Converts "remind me to..." into real Google Calendar events
- Uses SerpAPI tools for flights, hotels, web search, local results, and social profiles (doesn't make up prices or data)
- Uses light humor when appropriate
- Admits uncertainty rather than fabricating
11 Skills across 5 categories:
| Category | Skills | Triggers |
|---|---|---|
| Workspace | Email Management, Calendar & Reminders, File Management, Contact Management | "email", "schedule", "remind me", "file", "contact" |
| Research | Web & Search (SerpAPI MCP), Travel Search (SerpAPI MCP) | "search", "weather", "flight", "hotel", "news", "LinkedIn", "near me" |
| Memory | Remember Information, Recall Information | "remember", "recall", "my name", "who am I" |
| Reasoning | Deep Analysis, Summarization | "analyze", "summarize", "pros and cons" |
| Communication | Writing Assistance | "draft", "compose", "help me say" |
Each skill has keyword triggers — when a user message matches, the skill activates and the relevant MCP tools become available. This is how the agent knows to reach for Gmail vs. SerpAPI vs. just reasoning through a problem.
Soul Evolution — Growing With the User
The soul isn't static. It evolves through two mechanisms:
1. Explicit Preferences (Profile & Onboarding)
When a user saves their profile (name, timezone, location, work style, interests), those preferences are:
- Stored in MongoDB via the Preferences API
- Synced to Mem0 as searchable memory text
- Merged into
soul.userContextviaevolveSoul()
User saves profile → MongoDB + Mem0
↓
Brain init → getPreferences() → preferencesToUserContext() → evolveSoul()
↓
Updated soul saved to Mem0
2. Implicit Learning (Conversation Analysis)
After every conversation, learnFromConversation() scans recent messages for preference signals:
- "My name is Ankur" → stored as a preference memory
- "I work in tech" → stored as identity context
- "I prefer brief replies" → stored as communication preference
These memories are then recalled in future conversations and injected into the system prompt.
Brain — The Orchestration Engine (brain.ts)
The Brain is the executive function — the part that takes the Soul's identity, combines it with real-time context, and orchestrates tool use through Google Gemini. It manages:
Brain State — a persistent runtime object:
interface BrainState {
initialized: boolean; // Has the brain been set up?
soul: AgentSoul | null; // The loaded soul (from Mem0 or default)
mcpTools: MCPTool[]; // All available tools from all MCP servers
mcpConnected: boolean; // Are MCP servers reachable?
memoryConnected: boolean; // Is Mem0 reachable?
}
Initialization Flow (initializeBrain()):
- Check memory health → Load soul from Mem0 (or create default)
- Fetch user preferences from MongoDB → Merge into soul via
evolveSoul() - Save updated soul back to Mem0
- Check MCP server health → Discover all available tools
- Mark brain as initialized
The Chat Pipeline (chat()):
- Skill Detection: Analyze the user message against all 11 skills' trigger keywords
- Memory Retrieval: Two parallel Mem0 searches — one for message relevance, one for identity/preferences
- Request Metadata Assembly: Extract user location, timezone, date, and name from soul + memories
- System Prompt Generation:
generateSystemPrompt(soul)+ request metadata block + skill-specific instructions + relevant memories - Tool Building: Google Search grounding + MCP function declarations from all connected servers
- Agentic Loop (up to 8 iterations): Call Gemini → check for function calls → execute via MCP → add results → repeat
- Post-Processing: Extract thinking traces, grounding citations, store conversation memory (async), learn preferences (async)
Request Metadata — injected into every prompt so the agent and tools have context:
## Request Metadata
- User Location: Austin, TX
- User Timezone: America/Chicago
- User Date/Time: Monday, February 9, 2026 at 3:45 PM
- User Name: Ankur
- Essential memories:
- User prefers aisle seats
- User works in tech
- User has a nut allergy
This metadata flows into tool calls: SerpAPI MCP search gets the location in params.location, Calendar events get the correct timezone, and the agent addresses the user by name.
Memory — The Long-Term Store (memory.ts)
Memory is what makes 2nd Brain feel like a second brain. It's not RAG over documents — it's experiential memory of conversations, preferences, and identity.
Four Memory Types:
| Type | Key/Tag | Purpose | Example |
|---|---|---|---|
| Soul Memory | __2nd_brain_soul__ |
Persists the agent's identity and user context | The entire AgentSoul JSON |
| Conversation Memory | type: "conversation" |
Stores user/assistant exchanges after every turn | "User asked about flights to Tokyo; agent found $450 RT on JAL" |
| Preference Memory | type: "preferences" |
Explicit preferences from profile + implicit from conversation | "User prefers to be called Ankur. Location: Austin, TX." |
| Identity Memory | Searched via identity hints | Name, location, work, role — recalled at every request | "Ankur works in tech, based in Austin" |
Memory Retrieval Strategy:
- Every request triggers two parallel searches:
- Message-based: "Find memories relevant to this message" (top 5)
- Identity-based: "user name location preferences important facts" (top 5)
- For identity questions ("who am I?", "where do I work?"), an expanded search fires additional queries for "name", "work", "company", "job", "role", "location"
- Soul memories are filtered out from search results (they're loaded separately)
- Results are formatted as
## Relevant Memorieswith bullet points and injected into the system prompt
Memory Storage:
- After every response, the conversation is stored in Mem0 (async, non-blocking)
- After every response,
learnFromConversation()scans for preference signals and stores them - When the user saves their profile, preferences are stored in both MongoDB AND Mem0
The Memory Stack (Google Cloud):
- Qdrant (Vector DB on Google Compute Engine): Semantic similarity search — "find memories similar to this query"
- Neo4j (Graph DB on Google Compute Engine): Relationship-based memory — "who is connected to whom"
- Mem0 Connector (Google Cloud Run): RESTful API that coordinates Qdrant + Neo4j with JWT auth
How It All Fits Together
┌──────────────────────────────────────────────────────────┐
│ IDENTITY (types.ts) │
│ The blueprint — AgentSoul interface, AgentSkill, │
│ AgentContext, ConversationMessage, AgentResponse │
└────────────────────────┬─────────────────────────────────┘
│ defines shape of
┌────────────────────────▼─────────────────────────────────┐
│ SOUL (soul.ts) │
│ The personality — DEFAULT_SOUL with traits, values, │
│ skills, quirks, purpose. generateSystemPrompt(). │
│ evolveSoul() merges user preferences over time. │
└────────────────────────┬─────────────────────────────────┘
│ loaded + evolved by
┌────────────────────────▼─────────────────────────────────┐
│ BRAIN (brain.ts) │
│ The executive — initializeBrain() loads soul + prefs, │
│ chat() orchestrates skill detection → memory retrieval │
│ → prompt assembly → Gemini API → MCP tool routing → │
│ post-processing. Up to 8 agentic iterations. │
└────────────────────────┬─────────────────────────────────┘
│ reads + writes
┌────────────────────────▼─────────────────────────────────┐
│ MEMORY (memory.ts) │
│ The hippocampus — Mem0 + Qdrant (vector) + Neo4j │
│ (graph). Stores soul, conversations, preferences, │
│ identity. Semantic search + relationship reasoning. │
│ Deployed on Google Cloud (Run + Compute Engine). │
└──────────────────────────────────────────────────────────┘
This layered architecture means the agent is:
- Consistent: Same personality across every interaction (Soul)
- Contextual: Knows who you are, where you are, what you prefer (Memory + Preferences)
- Capable: Can use the right tools for the right job (Brain + MCP)
- Growing: Learns from every conversation and gets better over time (Evolution)
Agentic Orchestration — How the Brain Works
The core of 2nd Brain is an agentic loop powered by Google Gemini 3 Flash with thinking mode enabled. Here's how it works:
The Agent Loop (max 8 iterations)
User Message
↓
┌─────────────────────────────┐
│ 1. Skill Detection │ ← Analyze message for relevant skills
│ 2. Memory Retrieval │ ← Fetch relevant memories from Mem0
│ 3. System Prompt Assembly │ ← Soul + Metadata + Memories + Skills
│ 4. Tool Building │ ← Google Search + MCP Functions
│ 5. Gemini API Call │ ← With thinking mode (budget: 4000)
│ 6. Function Call Check │
│ ├─ YES → Execute tool │ ← Route to correct MCP server
│ │ Add result │
│ │ Continue loop │
│ └─ NO → Return text │
│ 7. Post-processing │ ← Extract citations, store memory
└─────────────────────────────┘
↓
Response (text + tool results + thinking + sources)
Multi-MCP Tool Routing
When the agent decides to use a tool, the system automatically:
- Looks up which MCP server owns that tool (via
toolToServerMap) - Sends the request using the correct protocol (MCP JSON-RPC or REST)
- Authenticates with the right credentials (OAuth for Google Workspace, API key for SerpAPI)
- Returns the result to the conversation for the next iteration
This means in a single conversation turn, the agent can:
- Search Google Calendar for free slots
- Search flights via SerpAPI MCP
- Send a confirmation email via Gmail
- All orchestrated automatically through iterative tool calling
Google Gemini 3 Flash — The Brain
- Model:
gemini-3-flash-preview(with fallback togemini-2.5-flash) - Thinking Mode: Always enabled — the model reasons through complex tasks before responding
- Google Search Grounding: Activated for real-time queries (news, weather, prices, current events)
- Function Calling: MCP tools exposed as native Gemini function declarations
- Context Window: Full conversation history + memories + system prompt
MCP Architecture — The Nervous System
2nd Brain uses the Model Context Protocol to connect to specialized servers. Each MCP server is a microservice deployed on Google Cloud Run.
Connected MCPs
| MCP Server | Tools | Deployment | Auth |
|---|---|---|---|
| Google Workspace | Gmail, Calendar, Drive, Contacts (13 tools) | Google Cloud Run (Europe-West1) | OAuth 2.0 (Google) |
| SerpAPI MCP | Web Search, Flights, Hotels, Local, Social Profiles, News, Shopping, Images (8 tools) | Google Cloud Run (Europe-West1) | API Key |
| Kite Trading | Market data, portfolio (external) | External | API Key |
| Google Search | Real-time web grounding | Native Gemini | Built-in |
Why MCP?
MCP gives us a plug-and-play architecture. Adding a new capability is as simple as:
- Deploy a new MCP server to Google Cloud Run
- Add the URL to the app config
- The agent automatically discovers new tools and can use them
No model retraining. No app updates. Just connect and go.
Cool Prompt Examples (Showcasing Multi-MCP Orchestration)
1. "Plan my trip to Tokyo next month"
MCPs used: Google Calendar + SerpAPI MCP (Flights + Hotels + Web Search) + Google Search Grounding
The agent:
- Checks your Google Calendar for free dates
- Searches cheapest flights from your location (Austin, TX — remembered from preferences) via SerpAPI Google Flights
- Finds 4-star hotels in Shinjuku under your budget via SerpAPI Google Hotels
- Searches "best time to visit Tokyo in March" via SerpAPI web search
- Creates a calendar event for the trip via Google Workspace MCP
2. "What did Sarah email me about the Q4 report? Draft a reply and schedule a follow-up"
MCPs used: Google Workspace MCP (Gmail + Contacts + Calendar)
The agent:
- Searches contacts to identify Sarah
- Finds the relevant email thread about Q4
- Reads the email content
- Drafts a professional reply
- Creates a 30-minute follow-up meeting on your calendar
3. "Find me a cheap flight to SF this weekend and email the itinerary to my team"
MCPs used: SerpAPI MCP (Flights) + Google Workspace MCP (Gmail + Contacts)
The agent:
- Searches flights from Austin to SFO via SerpAPI Google Flights
- Finds the cheapest option
- Looks up your team's email addresses via Google Contacts
- Composes and sends the itinerary email via Gmail
4. "What's happening in AI news today? Summarize and save to my Drive"
MCPs used: SerpAPI MCP (News Search) + Google Search Grounding + Google Workspace MCP (Drive)
The agent:
- Uses SerpAPI web search for real-time AI news articles
- Cross-references with Google Search grounding for latest results
- Summarizes the top stories with citations
- Creates a Google Doc with the summary in your Drive
5. "Remember I have a nut allergy. Now find restaurants near my hotel in Tokyo"
MCPs used: Memory (Mem0) + SerpAPI MCP (Local Search)
The agent:
- Stores "nut allergy" in long-term memory (Mem0 + Neo4j)
- Recalls your Tokyo hotel from the earlier trip planning
- Searches for nut-free restaurants near Shinjuku via SerpAPI local/Google Maps results
- Returns results with ratings, reviews, and allergy info
6. "Find Ankur's LinkedIn and Twitter — I need to connect with him"
MCPs used: SerpAPI MCP (Social Profile Search)
The agent:
- Searches "Ankur LinkedIn" via SerpAPI — finds the profile with title, company, and URL
- Searches "Ankur Twitter/X" — finds the handle and recent activity
- Returns clean links and summaries for both profiles
7. "How's Reliance doing today? Should I buy?"
MCPs used: Kite MCP + SerpAPI MCP (News) + Google Search Grounding
The agent:
- Fetches real-time stock data from Kite
- Searches latest Reliance news and analyst opinions via SerpAPI
- Cross-references with Google Search grounding
- Provides a balanced analysis (not financial advice!)
8. "Compare prices for AirPods Pro and find the best deal"
MCPs used: SerpAPI MCP (Shopping Search)
The agent:
- Searches Google Shopping via SerpAPI for "AirPods Pro"
- Compares prices across retailers (Amazon, Best Buy, Walmart, etc.)
- Highlights the best deal with price, retailer, and link
How We Built It
Frontend — React Native / Expo
- Framework: Expo SDK 54 with Expo Router (file-based navigation)
- UI: Custom dark-theme design with Linear Gradient accents, voice-first input
- Auth: Clerk with Google Sign-In, custom JWT templates (
second-brain-jwt) - Storage: Expo SecureStore (native) with localStorage fallback (web)
- State: React hooks + AsyncStorage for message persistence
Agent Core — Google Gemini
- Primary Model: Google Gemini 3 Flash Preview (thinking mode, 4K thinking budget)
- Fallback Model: Google Gemini 2.5 Flash
- Features: Native function calling, Google Search grounding, thinking/reasoning traces
- Orchestration: Custom agentic loop with iterative tool calling (up to 8 iterations)
MCP Servers — Python + FastMCP
- Google Workspace MCP: Python + FastMCP v3, OAuth 2.0 proxy for Google APIs
- SerpAPI MCP: Python + FastMCP, wraps the full SerpAPI suite — Google Search, Google Flights, Google Hotels, Google Shopping, Google News, Google Images, Google Maps/Local, and social profile search — all behind a single MCP server
- Protocol: MCP JSON-RPC 2.0 over HTTP (Streamable HTTP transport)
- Caching: In-memory TTL cache (5-minute) on SerpAPI MCP, reducing API costs by 50-70%
Memory Layer — Mem0 + Neo4j + Qdrant
- Mem0: Open-source long-term memory framework
- Qdrant: Vector database for semantic memory search
- Neo4j: Graph database for relationship-based memory
- API: RESTful memory connector deployed on Google Cloud Run
- Hosting: Qdrant and Neo4j running on Google Cloud VMs
Preferences — MongoDB + Google Cloud Run
- Database: MongoDB hosted on Google Cloud (GCP)
- API: RESTful CRUD with JWT auth
- Sync: Preferences saved to both MongoDB and Mem0 for dual retrieval
Deployment — Google Cloud Platform
- Compute: Google Cloud Run for all microservices (auto-scaling, HTTPS)
- VMs: Google Cloud Compute Engine for Mem0, Neo4j, Qdrant
- Database: MongoDB on GCP, Neo4j on GCP VM, Qdrant on GCP VM
- Regions: europe-west1 (MCP servers), us-east1 (memory)
- Containers: Docker with
uvpackage manager for fast, reproducible Python builds - CI/CD: Google Cloud Build with
.gcloudignorefor optimized deploys
Challenges We Ran Into
1. Multi-Protocol MCP Orchestration
Not all MCP servers speak the same protocol. Our Google Workspace MCP evolved from a REST API, while the SerpAPI MCP uses standard MCP JSON-RPC. We had to build a protocol auto-detection layer that tries MCP first, falls back to REST, and handles session management for both — all transparently to the agent.
2. OAuth on Mobile is Hard
Google OAuth on a mobile app with an MCP proxy server was a maze. We had to implement:
- Server-side OAuth proxy (
/auth/login→ Google consent →/auth/app/callback) - Deep linking back to the app (
agentcore://auth/callback) - Token refresh with automatic retry
- Secure token storage across platforms (native Keychain vs web localStorage)
3. Expo SecureStore Doesn't Work on Web
We discovered mid-development that expo-secure-store throws "not a function" errors on web. We built a cross-platform secure storage abstraction that detects the platform and gracefully falls back to localStorage + in-memory cache on web.
4. Agent Context Window Management
With soul, memories, skills, request metadata, and tool results all competing for the context window, we had to carefully prioritize what goes in. We developed a tiered context system: essential metadata first, then relevant memories (capped at 5), then skill instructions.
5. Memory Deduplication
When the agent stores conversation memories after every interaction, we had to ensure we weren't flooding Mem0 with duplicate information. We filter soul-related memories from search results and use metadata tags to separate preference memories from conversation memories.
6. Cloud Run Cold Starts
MCP servers on Google Cloud Run have cold start latency. We implemented health checks, connection pooling, and graceful timeout handling (5-10 second timeouts with fallbacks) to ensure the app doesn't hang when a server is waking up.
Accomplishments That We're Proud Of
One App, Everything Connected
We built a truly unified assistant that can cross-reference your calendar with flight searches, email the results, and remember your preferences — all in one conversation. No app switching. No copy-pasting.
Production-Grade MCP Architecture
Our multi-server MCP client handles protocol detection, session management, health monitoring, OAuth, API keys, and automatic tool routing — all transparently. It's a mini MCP orchestration platform.
Evolving Agent Soul
The agent doesn't just answer questions — it grows with you. It learns your name, your preferences, your work style. The soul persists in Mem0 and evolves with every interaction. It's not a chatbot; it's a cognitive partner.
Voice-First, Mobile-Native
While most AI assistants are desktop-first, 2nd Brain is mobile-first and voice-first. Tap to talk, get things done. The keyboard is secondary.
Full Google Cloud Stack
Every service runs on Google Cloud Platform: Cloud Run for microservices, Compute Engine for databases, MongoDB on GCP, all connected through Google's global network. Powered by Google Gemini at the core.
Memory That Actually Works
With Mem0 + Neo4j (graph) + Qdrant (vector), our memory system supports both semantic search ("what restaurants did I like?") and relationship reasoning ("who introduced me to Sarah?"). It's not just retrieval — it's understanding.
What We Learned
1. MCP is the Future of AI Tooling
The Model Context Protocol is a game-changer. Instead of baking integrations into the model, you connect specialized servers. It's microservices for AI — and it scales beautifully.
2. Google Gemini 3 Flash is Remarkably Capable
Thinking mode + native function calling + Google Search grounding makes Gemini 3 Flash feel like it's reasoning, not just generating. The thinking traces show genuine multi-step planning.
3. Agent Orchestration > Multi-Agent
We started with a multi-agent architecture but found that a single smart agent with skill detection works better for a unified app. One brain, many tools, clear routing. Simpler to debug, easier to maintain.
4. Memory is the Killer Feature
Users don't just want answers — they want their assistant to remember. The difference between "find me a flight" and "find me a flight like last time, but cheaper" is memory. It's what makes 2nd Brain feel like a second brain.
5. Mobile + AI Has Unique Challenges
Touch targets, voice input, network latency, secure storage, OAuth redirects, cold starts — mobile AI is a different beast from desktop chatbots. Every interaction needs to feel instant and effortless.
6. Google Cloud Run is Perfect for MCP
MCP servers are stateless request handlers — exactly what Cloud Run is built for. Auto-scaling, HTTPS, custom domains, zero ops. Deploy and forget.
What's Next for 2nd Brain
The MCP ecosystem is exploding — over 1,200 verified servers and growing. Our roadmap is simple: connect everything. Every app you use daily becomes an MCP that the agent can reach, all orchestrated through one conversation.
Google Ecosystem — Deeper Integration
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Google Maps | Navigation, place details, directions, ETA, traffic | "How long to drive from my hotel in Shinjuku to Tsukiji Market?" |
| Google Docs | Read, edit, and create documents | "Turn my meeting notes from today into a polished summary doc" |
| Google Sheets | Spreadsheet analysis, data entry, charts | "Add today's expenses to my Tokyo trip budget sheet" |
| Google Fit | Steps, heart rate, sleep, workouts, health trends | "How was my sleep this week? Should I adjust my schedule?" |
| Google Photos | Search photos, create albums, share memories | "Find my photos from the Tokyo trip and make an album" |
| Google Keep / Tasks | Notes, checklists, task management | "Add 'buy travel adapter' to my Tokyo packing list" |
| Google Meet | Schedule meetings, get transcripts, join links | "Set up a team sync for Friday and send the Meet link to everyone" |
| YouTube | Search videos, get transcripts, playlist management | "Find a good video on Japanese train etiquette for my trip" |
| Google ADK | Migrate to Google's Agent Development Kit for production-grade orchestration | Better tooling, tracing, and multi-agent coordination |
Food & Delivery — Order From Your Agent
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Zomato | Restaurant discovery, menu browsing, cart building, ordering, tracking | "Order butter chicken from the top-rated place near me — no nuts, remember" |
| Swiggy | Food ordering (Swiggy Food), grocery delivery (Instamart), table reservations (Dineout) | "Order groceries for the week — milk, eggs, bread, and whatever I usually get" |
| DoorDash | Restaurant search, ordering, delivery tracking (US/international) | "Get me a pizza delivered in 30 minutes — whatever's closest" |
Both Zomato and Swiggy already have official MCP servers — Zomato's lets you search restaurants, compare menus, build carts, and place orders entirely through conversation. Combined with 2nd Brain's memory (dietary preferences, past orders, favorite restaurants), this becomes "order my usual" in one sentence.
Messaging — Talk Through Your Agent
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Send/receive messages, group messaging, media sharing | "Send the Tokyo itinerary to the family group on WhatsApp" | |
| Telegram | Messages, channels, bots, file sharing | "Post the meeting summary to our Telegram channel" |
| Slack | Channel messages, search, thread replies, notifications | "Summarize what happened in #engineering today and flag anything urgent" |
WhatsApp MCP (via Wassenger) is already in beta. Imagine: "Message Sarah on WhatsApp that I'll be 10 minutes late" — the agent finds Sarah in contacts, composes the message, and sends it. No app switch.
Finance & Trading — Full Kite/Zerodha Support
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Zerodha Kite (full) | Portfolio view, holdings, positions, place/modify/cancel orders, market data, GTT orders, mutual funds | "Show my portfolio. If Reliance dips below 2400, set a GTT buy for 50 shares" |
| Google Pay / UPI | Payment initiation, transaction history | "How much did I spend on food this month?" |
Kite MCP is already live at mcp.kite.trade with portfolio management, order execution, and real-time quotes. We're expanding to full trade execution, mutual fund tracking, and market alerts — all with memory so the agent learns your risk profile and trading patterns.
Productivity & Dev Tools
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Notion | Page search, database queries, content creation, knowledge base access (22 tools) | "Create a Notion page for the Tokyo trip with our itinerary, budget, and restaurant list" |
| GitHub | Repo browsing, issue creation, PR management, code search | "Create a GitHub issue for the login bug I just described and assign it to me" |
| Linear | Project management, sprint planning, issue tracking | "What's left in this sprint? Anything blocked?" |
| Jira | Enterprise issue tracking, board management | "Move the API redesign ticket to In Review" |
Notion's official MCP server already has 22 tools. GitHub MCP is a reference implementation from the MCP org. These slot directly into 2nd Brain's marketplace.
Health & Wellness
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Google Fit | Activity tracking, heart rate, sleep, workout history | "I've been sleeping badly — show my sleep trends this month and suggest changes" |
| Apple Health (via bridge) | Steps, workouts, vitals, nutrition | "How many calories did I burn this week vs. last week?" |
| Fitbit / Garmin | Device-specific fitness data | "What was my resting heart rate trend this quarter?" |
With memory, the agent doesn't just report data — it tracks patterns: "You've averaged 5.2 hours of sleep this week, down from 7.1 last month. Want me to block 'wind down' time on your calendar at 10 PM?"
Entertainment & Media
| MCP | What It Unlocks | Example Prompt |
|---|---|---|
| Spotify | Play music, search tracks, manage playlists, get recommendations | "Play something relaxing — I'm winding down after the Tokyo trip" |
| Netflix | Browse catalog, get recommendations, manage watchlist | "Add that documentary about Japanese food culture to my watchlist" |
| YouTube Music | Music playback, playlist management | "Make a playlist of Japanese city pop for the trip" |
Platform & Architecture
| Initiative | What It Means |
|---|---|
| Google ADK Migration | Move agent orchestration to Google's Agent Development Kit for production-grade tracing, evaluation, and multi-agent coordination |
| Multi-Agent Routing | Specialist sub-agents (finance, health, travel, productivity) coordinated by a meta-agent — each with its own soul and skill set |
| Proactive Notifications | "You have a meeting in 30 minutes — here's the agenda, attendee context from memory, and relevant emails" |
| Multi-Modal Input | Send photos, screenshots, documents, voice notes to the agent for analysis |
| Shared Memory Spaces | Family or team memory — shared trip plans, meeting notes, project context |
| Offline Mode | Core reasoning + cached memories available without internet |
| Open MCP Marketplace | Community-built MCP servers — anyone can extend 2nd Brain and publish to the marketplace |
| Wearable Integration | Google Pixel Watch, earbuds — ambient AI that's always there |
| Autonomous Background Agents | Long-running agents that monitor prices, track deliveries, watch for emails, and act on your behalf |
The Vision
Every app on your phone eventually becomes an MCP behind the scenes. You stop opening apps and start talking to your agent. "Order dinner, message the group I'll be late, check if my flight is on time, and play something chill" — four apps, one sentence, zero app switches. That's the future we're building.
Tech Stack Summary
| Layer | Technology | Provider |
|---|---|---|
| AI Model | Gemini 3 Flash Preview + 2.5 Flash | |
| Search Grounding | Google Search | |
| Mobile App | React Native + Expo SDK 54 | Expo |
| Auth | Clerk + Google Sign-In | Clerk + Google |
| MCP Protocol | JSON-RPC 2.0 (Streamable HTTP) | Open Standard |
| Google Workspace | Gmail, Calendar, Drive, Contacts | |
| Universal Search | SerpAPI (Web, Flights, Hotels, Local, Social, News, Shopping, Images) | SerpAPI |
| Memory | Mem0 + Qdrant + Neo4j | Open Source |
| Database | MongoDB | Google Cloud |
| Compute | Google Cloud Run + Compute Engine | Google Cloud |
| Containers | Docker + uv | Open Source |
| Language | TypeScript (app) + Python (MCPs) | — |
Built with love, caffeine, and an unreasonable amount of Google Cloud credits at the Gemini 3 Hackathon.
2nd Brain — Your life, unified and connected.
Built With
- gemini
- google-adk
- google-cloud
- mcp
- mongodb
- neo4j
- python
- quadrant
- typescript
Log in or sign up for Devpost to join the conversation.