Inspiration
A solo founder is the marketing department — and has no time to be. Most "AI marketing" tools are a chatbot wrapped around a prompt: they don't accomplish the job, and they never get better. The job is messy: pull approved claims, find the right customer voice, draft to a channel, fact-check it, route it for approval, learn from what got cut, and attribute real outcomes. We wanted to give a founder of one an agent team that does the whole loop — and, crucially, one whose memory and judgment live in a single system of record it can actually reason over. That made MongoDB the natural backbone: flexible documents for evolving agent state, native vector search for grounding, and an MCP server so agents query the database the way a person would.
What it does
- Drafts grounded content. A
Research → Content → Reviewpipeline (ADKSequentialAgent) produces a channel-specific asset (LinkedIn, blog, email, Substack). Research gathers evidence; Content drafts using approved claims and semantically-retrieved customer quotes; Review fact-checks. - Grades every draft on six rubrics via the Vertex AI Gen AI Evaluation Service — and the grading is grounded: it pulls the most recent rejections for that channel/category from MongoDB so drafts are judged against the team's real standards.
- Keeps a human in the loop. Drafts land in an approval queue; a person approves or rejects with a reason in the web UI.
- Learns from rejections. A rejection is written back to MongoDB as a new negative example; the very next similar draft is penalized for the same weakness. Lessons roll up into
derivedcollections, and a weekly gate proposes promoting an improved playbook version for human sign-off. - Coordinates as a team. A weekly CMO Planner uses other agents as tools (
AgentTool), and every agent is exposed over the Agent2Agent (A2A) protocol viato_a2a(), so they're invoked as remote services, not imports. - Shows its work. A React web app (Drafting, Queue, Experiments, Learning, Skills, Signals, Voice, Telemetry, Live, Weekly Review) lets a human watch the agents reason, approve work, and see the learning happen.
How MongoDB powers it (the track in one section)
MongoDB Atlas is not a side store — it is the system the agents think with.
- MongoDB MCP server = the agents' hands. By default every agent's
read/reasoning calls go through the MongoDB MCP server (
find,aggregate,count,collection-schema, …), launched read-only. The agent decides what to ask the database; MCP executes it. (We expose the MCP read surface to the model undermongodb_*tool names.) - Atlas Vector Search with Automated Embedding = grounding. The
customer_voicecollection is indexed with anautoEmbedVector Search index (managed Voyage AI model). Agents pass natural-language text to$vectorSearch; Atlas embeds both the stored quotes (at insert) and the query (at query time) server-side. No embedding pipeline, no embedding API key in our code — text in, the right documents out. - Document model = evolving agent state. ~30 canonical collections —
experiments,skills,messaging_library,negative_examples,approvals,signals,paid_variants, and more — model state that changes shape as the product evolves, which is exactly where documents beat rigid tables. - Provenance + time-travel = trust. Every canonical write carries a
_provenanceblock and appends a pre-image to ahistory.<collection>collection, so "who changed this, when, and why" is always answerable — essential when an autonomous agent is the one writing. - Derived rollups = the learning substrate. Scheduled jobs compute
derived.*collections (per-playbook rubric track records, ICP profiles) that feed self-critique and skill promotion.
The result: the same MongoDB data is the agent's working memory (via MCP),
its grounding (via Vector Search), its grading standard (via
negative_examples), and its audit trail (via provenance/history).
How we built it
- Agents & orchestration: Google Cloud Agent Builder / ADK —
LlmAgent,SequentialAgent,AgentTool, andto_a2a()for the A2A protocol. Deployed as Cloud Run services + jobs on Cloud Scheduler. - Models: Gemini (Flash and Flash-Lite) on Vertex AI for drafting, review, planning, and self-critique.
- Data & retrieval: MongoDB Atlas via the MongoDB MCP server; Atlas Vector Search (Automated Embedding, Voyage AI) for semantic grounding.
- Evaluation: Vertex AI Gen AI Evaluation Service (six pointwise rubrics), re-graded nightly by an eval harness.
- Safety: Model Armor on agent inputs/outputs.
- Frontend: React/TypeScript web app.
- Other Google Cloud: Secret Manager (no secrets in code), BigQuery for high-volume telemetry, Looker Studio dashboards.
Challenges we ran into
- Making the MongoDB MCP server work with ADK. The MCP server emits tool
schemas using JSON-Schema 2020-12 features (
const,propertyNames,additionalProperties, nestedoneOf) that ADK's tool-schema converter rejected withextra_forbidden. We built a sanitizer that rewrites each MCP tool's input schema to the Draft-7 subset ADK + Gemini accept before the function declaration is built — so the live MCP toolset loads cleanly. - Embeddings without an embedding pipeline. We replaced a client-side Voyage REST call with Atlas Automated Embedding, moving embedding into the database. Simpler, no key handling — at the cost of depending on a preview feature (see "What's next").
- Letting agents write without losing the audit trail. Raw MCP writes would bypass our history layer, so we kept canonical writes on a provenance-capturing path while MCP serves reads — a deliberate hybrid that preserves "who/what/why" for every mutation.
Accomplishments that we're proud of
- A genuine multi-agent team (pipeline + tool-composition + A2A), not a single prompt.
- A closed learning loop you can demonstrate live: reject a draft → the next similar draft is graded harder and comes out better, driven by one MongoDB document.
- MongoDB used four ways at once — MCP reasoning, vector grounding, grading standard, and audit trail — from a single source of truth.
What we learned
- An MCP server changes how you design agents: you stop wiring brittle per-query tools and let the model ask the database directly — but you must guard the schema boundary (the sanitizer) and the write boundary (provenance) yourself.
- Pushing embedding into Atlas removes a whole class of glue code and failure modes; "text in, documents out" is the right primitive for agents.
- Grounding evaluation in your own historical data (past rejections) is a cheap, powerful way to make an agent reflect a team's real standards.
What's next for hindsight-guild
- Promote Automated Embedding from preview to a production tier and add vector grounding to more collections (experiments, messaging).
- Richer cross-collection retrieval through MCP
aggregate($vectorSearch+$lookup) for multi-hop reasoning. - Tighter outcome attribution → automatic experiment decisions.
Built With
- a2a-protocol
- adk
- gemini
- google-cloud
- mongodb
- mongodb-atlas
- mongodb-mcp-server
- vertexai
Log in or sign up for Devpost to join the conversation.