Meesho Memory: Building an Enterprise Document Intelligence Platform with Google Workspace, Gemini Enterprise & ADK
Project Overview
Meesho partnered with Wohlig Transformations to build an end-to-end Document Intelligence platform spanning three key pillars: Google Workspace for document authoring and governance, Gemini Enterprise for conversational access and retrieval, and a custom ADK agent running on Vertex AI Agent Engine to provide depth-aware, fully cited enterprise search.
Meesho operates using a BHAG (Big Hairy Audacious Goals) framework across functions such as Pricing, Monetisation, CPDO, Ranking, and Growth. These teams continuously generate strategic documents including R2R reviews, PFS sessions, working sessions, and KR documents. As the organization scaled, these artifacts became fragmented across individual Google Drive accounts, creating challenges around governance, discoverability, and organizational alignment.
To address this, Wohlig delivered a two-phase platform on Google Cloud.
Phase 1 focused on document governance and ingestion across Google Workspace.
Phase 2 introduced an AI-powered ADK agent integrated into Gemini Enterprise, enabling employees to query organizational knowledge through natural language while preserving document-level access controls.
The Challenge
Inconsistent Document Quality
There was no standardized process to enforce document quality before storage. Teams used different templates, resulting in incomplete and inconsistent documentation.
No Central Repository
BHAG documents were distributed across individual Google Drive accounts, making enterprise-wide knowledge sharing difficult.
Zero AI Discoverability
Employees had no way to search organizational knowledge using natural language.
Incomplete Retrieval Results
The Gemini Enterprise Drive connector returned document snippets rather than complete content, often exposing only a fraction of the available information.
Retrieval API Limitations
The Discovery Engine :answer endpoint permanently rejected custom GCP OAuth implementations, preventing adoption of the intended retrieval architecture.
Service Account Restrictions
Workspace datastore retrieval returned HTTP 403 errors when accessed through service account credentials, requiring an alternative authentication approach.
Key Objectives
Enforce document quality before documents enter the repository.
Create a centralized and permission-safe knowledge repository.
Improve compliance through proactive governance and automated reminders.
Provide deterministic retrieval depth independent of LLM behavior.
Ensure complete citation coverage for every answer.
Eliminate incremental AI inference costs by leveraging existing Gemini Enterprise licenses.
The Solution: Two-Phase Document Intelligence Platform
Phase 1: Document Governance & Ingestion System
Phase 1 introduced ten integrated components governing the entire document lifecycle within Google Workspace.
Custom Template Governance
A Custom Google Template Gallery combined with a Chrome Extension ensured that employees could only access Meesho-approved document templates while hiding Google’s default templates.
8-Rule Audit Engine
An Apps Script Add-on embedded directly into Google Docs validated documents against predefined compliance rules stored in Google Sheets.
The engine:
Scored each document section from 0–100%
Evaluated compliance automatically
Prevented submission until all required sections passed validation
Submit-to-Meesho-Memory Workflow
Documents that passed compliance checks were automatically submitted into the central repository.
The workflow:
Used the author’s Google Drive token
Applied repository labels
Sent confirmation notifications
Preserved ownership and permissions
Governance & Adoption Automation
Several automated governance mechanisms were introduced:
In-document nudge notifications
Meeting invite monitoring
Daily compliance reminders
Escalation workflows to managers
Organization-wide document audits
The backend architecture was later migrated from Apps Script to Cloud Run, with Cloud Scheduler replacing all scheduled triggers.
Keyless Domain-Wide Delegation
JWT signing was performed through the IAM Credentials API, eliminating the need for service account JSON keys.
Phase 2: ADK Agent Inside Gemini Enterprise
The second phase introduced a custom ADK agent registered within Gemini Enterprise Agent Space.
Employees could access organizational knowledge directly from the Gemini Enterprise chat interface they already used daily.
The solution evolved through six architectural versions:
v1: SequentialAgent baseline
v2: Parallel per-document extraction
v3: Wiki-based retrieval
v4: StreamAssist proof of concept
v5: Batched parallel StreamAssist architecture
v6: Production Zero-Vertex Pipeline
Depth-Aware Retrieval Architecture
The production architecture routes queries based on requested depth.
Small Queries
Handled through a single StreamAssist request with suggested follow-up questions.
Medium, Detailed & Exhaustive Queries
A three-stage pipeline executes:
Identify
Selects the most relevant documents from a candidate pool of up to 91 documents.
Generates focused extraction prompts.
Batched Parallel StreamAssist
Retrieves information from multiple documents simultaneously.
Executes 5–10 concurrent retrieval operations for exhaustive searches.
Merge
Synthesizes results into a single answer.
Produces 3–15 citations.
Generates follow-up recommendations.
OPT-5 Speculative Prefetch
Candidate retrieval begins in parallel with intent classification, eliminating a complete retrieval round-trip and improving response latency.
Wiki Builder
A Claude-powered wiki generation process consolidates information across multiple documents while preserving inline citations.
Technology Stack
Phase 1
Cloud Run
Google Apps Script Add-on
Chrome Extension (Manifest V3)
Cloud Scheduler
Google Drive API
Google Sheets API
Drive Labels API
IAM Credentials API
Gmail SMTP (Nodemailer)
Phase 2
Gemini Enterprise
Gemini Enterprise Agent Space
StreamAssist API
Google ADK 1.30.0
Vertex AI Agent Engine
Discovery Engine API
Gemini 3.1 Pro Preview
Gemini 3 Flash Preview
Security & Access Control
The solution preserves Google Workspace permissions by injecting the end user’s Gemini Enterprise Drive OAuth bearer token into every retrieval request.
This ensures:
Workspace ACL compliance
User-level permission enforcement
No unauthorized document exposure
Keyless Domain-Wide Delegation uses IAM Credentials API signing, eliminating service account key storage entirely.
Key Benefits & Results
Standardized Documentation
Previous: No document template standards.
Solution: Custom Template Gallery and Chrome Extension.
Result: Only approved templates available organization-wide.
Centralized Knowledge Repository
Previous: Documents scattered across personal drives.
Solution: Audit engine and submission workflow.
Result: Centralized repository with compliance enforcement.
Governance Visibility
Previous: Limited awareness of document compliance.
Solution: Automated scans, nudges, and escalation workflows.
Result: Organization-wide compliance monitoring.
Improved Retrieval Quality
Previous: Snippet-only search results.
Solution: StreamAssist retrieval using dataStoreSpecs.
Result: Complete document access with ACL enforcement.
Deterministic Search Depth
Previous: LLM-driven retrieval limitations.
Solution: Python-based parallel retrieval orchestration.
Result: Search depth enforced through code rather than model behavior.
Retrieval API Workaround
Previous: Discovery Engine answer endpoint restrictions.
Solution: StreamAssist API adoption.
Result: Fully functional enterprise retrieval.
Authentication Reliability
Previous: Service account authentication failures.
Solution: Per-user OAuth bearer token injection.
Result: Zero authorization failures.
Full Citation Coverage
Previous: Flash model responses without citations.
Solution: Gemini Pro retrieval with text grounding metadata.
Result: 3–15 citations per answer.
Zero Incremental AI Cost
Previous: Per-token Vertex AI inference costs.
Solution: All retrieval and synthesis workloads executed through Gemini Enterprise licensing.
Result: ₹0 incremental AI cost per query regardless of usage volume.
Technical Innovation
Two-Layer Document Intelligence Architecture
Phase 1 ensures document quality and governance.
Phase 2 makes organizational knowledge discoverable through conversational AI.
AppScript-to-Cloud-Run Migration
The backend was re-platformed during development without service interruption while improving scalability and operational control.
Keyless Domain-Wide Delegation
JWT signing through Google’s IAM Credentials API eliminated the need for service account JSON keys.
StreamAssist-First Retrieval
StreamAssist replaced Discovery Engine’s blocked answer endpoint and became the primary retrieval mechanism.
OPT-5 Speculative Prefetch
Parallel candidate retrieval and intent classification reduced overall query latency.
Zero-Vertex Pipeline
All retrieval, classification, evaluation, and synthesis workloads execute through Gemini Enterprise rather than Vertex LLM agents.
Pro and Flash Model Strategy
Gemini Pro handles retrieval and citation generation.
Gemini Flash handles intent classification for lower latency and cost.
Wohlig’s Approach
Defined requirements and designed the governance platform architecture.
Built the governance ecosystem, including templates, audit workflows, Chrome extensions, and submission processes.
Migrated the backend from Apps Script to Cloud Run.
Implemented adoption and governance automation, including nudges, meeting monitoring, escalation workflows, and domain-wide delegation.
Completed user acceptance testing and production rollout for Phase 1.
Diagnosed limitations of no-code Gemini Enterprise agents, including Discovery Engine restrictions and citation limitations.
Iteratively evolved the ADK architecture through six versions before arriving at the production-ready Zero-Vertex Pipeline.
Deployed the solution on Vertex AI Agent Engine, registered the ADK agent in Gemini Enterprise Agent Space, and completed organization-wide rollout.
About Meesho
Meesho is India’s leading social commerce platform, enabling millions of small businesses to sell online. Its BHAG-driven operating model generates a large volume of strategic planning documents, making enterprise knowledge discovery and governance critical to operational effectiveness.
About Wohlig Transformations Pvt. Ltd.
Founded in 2015, Wohlig Transformations specializes in GenAI and DevOps solutions, with more than 160 professionals serving clients across India and the United Kingdom.


