Inspiration
AI coding agents are brilliant — but they have amnesia. When Agent A finishes a coding session, all the context — the rejected approaches, the architectural decisions, the "why we did it this way" — dies with the session. When Agent B picks up the codebase later, it starts from a blank slate, re-reads the code, and guesses the intent.
We realized that for AI agents to work together as a true team, they need a shared, persistent memory bus — something Git was never designed to store.
What it does
MoDeX (Memory of Codex) is a two-faced system that gives AI coding agents a shared brain.
Face 1 — Developer-Edge MCP
An MCP server that runs inside your IDE. As you code with your agent, Face 1 automatically captures every prompt, response, file edit, and explicit architectural decision — writing them to Google Sheets and BigQuery in real-time.
The Memory Bus — Fivetran
Fivetran acts as the central nervous system. Three live connectors sync raw session logs from Google Sheets, GitHub PRs and code reviews, and Platform Connector lineage metadata into BigQuery — creating a unified, queryable warehouse of team memory.
Face 2 — Central Memory Guide
A multi-agent system built with Google ADK and Gemini 2.5 Flash, deployed on Cloud Run. Face 2 answers questions about the codebase's history ("Why was this approach rejected?") by citing specific past sessions and PRs. It also operates Fivetran pipelines live — querying connector health, checking lineage, and triggering resyncs with Guardian-gated user approval.
The handoff
When a new agent joins the project, it calls load_context via MCP, reads compressed memory from BigQuery, and starts exactly where the last agent left off. Zero cold starts.
How we built it
MoDeX is built entirely on Google Cloud, with the Fivetran MCP as our partner superpower.
Core AI & Orchestration
- Google ADK (Agent Development Kit) on Vertex AI
- Mission Control agent routes tasks to three specialists: Memory Agent, Pipeline Operator, and Guardian
- All powered by Gemini 2.5 Flash
Data Movement — Fivetran manages three live connectors:
| Connector ID | Source | Destination |
|---|---|---|
stowed_register |
Google Sheets session logs | BigQuery |
solve_unhurt |
GitHub PRs and reviews | BigQuery |
elemental_apparel |
Platform Connector metadata | BigQuery |
Partner Superpower
The Fivetran MCP (fivetran-mcp) is integrated directly into our Pipeline Operator agent. It uses:
list_connectionsget_connection_detailssync_connectionget_connector_lineage
Storage
BigQuery serves as both the ground-truth append-only log (agent_memory.codebase_logs) and the Fivetran destination warehouse (modex_logs.modex_logs).
Deployment Both Face 1 API and Face 2 ADK app are deployed as a single serverless revision on Google Cloud Run (asia-south1).
Security Fivetran API keys stored in Google Secret Manager — injected into Cloud Run at runtime, never in code or environment variables.
Challenges we ran into
Schema Evolution in BigQuery
As we added features like session_summary generation, our BigQuery schema lagged behind application code. We implemented robust fallback logic in memory_store.py to strip unknown columns during inserts, ensuring writes never failed even when the schema hadn't caught up.
Agent Tool Hallucinations
Our ADK agents initially tried to guess Fivetran connector IDs instead of discovering them. We solved this by strictly bounding each specialist's toolset and forcing the Pipeline Operator to always call list_connections first — grounding itself in reality before acting.
Frontend Performance
Rendering live agent traces alongside animated UI elements caused GPU lag. We optimized by removing text-rendering: optimizeLegibility, reducing blur filters, adding CSS contain: layout, and implementing prefers-reduced-motion support — restoring 60fps smoothness.
Accomplishments that we're proud of
True agent-to-agent handoff — Agent A (
developer_id: judge) logs a session with decisions and rejected approaches. Agent B (developer_id: judge2) hydrates that exact context and continues the work — without repeating mistakes or asking for a re-briefing.Fivetran MCP for action, not just reading — Our agent doesn't just tell you a pipeline is stale — it asks for your approval and then triggers a resync via the Fivetran MCP. Governed writes, user in control.
Production-ready on Google Cloud — Clean architecture entirely within the Google Cloud ecosystem — ADK, Cloud Run, BigQuery, Secret Manager — without third-party orchestrators like LangChain or LlamaIndex.
What we learned
"Metadata is as important as data."
Querying the Fivetran Platform Connector via MCP allowed our agent to answer questions about data trust and lineage — not just "is it synced?" but "is it trustworthy?" That distinction is incredibly powerful for data engineering workflows.
Framework orchestration scales complexity. Using Google ADK to route intents between specialized agents (Memory vs. Pipeline vs. Guardian) was far more reliable than forcing a single massive prompt to handle everything. Each agent has bounded tools and a clear mandate.
The memory Git doesn't capture is the memory that matters most. Rejected approaches, alternative designs, and cross-session rationale — these are what make handoffs work. Code alone is never enough context.
What's next for MoDeX
Enterprise RBAC — Role-based access control so agents only access memory for repositories their human counterpart is authorized to view.
Vertex AI Vector Search — Semantic retrieval of past decisions across massive, multi-year codebases — not just keyword matching.
Proactive PR Reviews — Triggering Face 2 via GitHub Actions to review new PRs against the historical memory bus, flagging when a developer attempts an approach that was previously rejected and documented.
Built With
- agent-developement-kit(adk)
- cloud-run
- fivetran
- gemini-2.5-flash
- google-bigquery
- google-cloud
- mcp
- model-context-protocal
- python
- react
- vertex-ai
Log in or sign up for Devpost to join the conversation.