AgentCloud — Devpost Submission
GitHub PRs for what your coding agents believe.
Event: Agentic Engineering Hack (NYC)
Sponsors targeted: Datadog (Lapdog + APM), ClickHouse
Inspiration
Every AI coding agent has memory now. mem0, Letta, CLAUDE.md, agentmemory — they all solve the same problem: your agent remembers your codebase across sessions.
That breaks the moment two developers share a memory store.
Alice's agent learns "we use Postgres." Bob's agent learns "we use SQLite for prototypes." Last-write-wins. Nobody knows who taught the agent what, when it changed, or why two agents now disagree. Personal preferences leak into team knowledge. Contradictions surface at read time — if at all.
We wanted governance for shared agent memory: review before activation, blame on every belief, semantic diffs instead of silent overwrites, and path-scoped truths so "SQLite in prototypes" and "Postgres in production" can coexist.
What it does
AgentCloud is a governance layer on agentmemory that turns team knowledge changes into Memory PRs — reviewable proposals that must be approved before a Belief enters retrieval.
| Primitive | What it does |
|---|---|
| Belief | Team-governed assertion (claim + scope + evidence) with full lifecycle |
| Memory PR | Proposed belief change: `proposed → approved \ |
| Blame | Provenance — author, approver, evidence, event timeline |
| Scoped merge | Resolve conflicts by narrowing path scope; both beliefs stay active |
| Contested detection | Embedding similarity >0.85 in overlapping scope flags conflicts at write time |
For developers: agents propose team facts via MCP; humans review in a dashboard; approved beliefs flow back into scoped retrieval.
For teams: every read is traceable, every write is reviewable, every contradiction is surfaced before it silently overwrites the truth.
How we built it
We forked agentmemory in-place — no rewrite of retrieval, hooks, or the single-user memory engine. Governance is additive.
Claude Code / Cursor → MCP (governance tools) → iii-engine KV (state)
↓ dual-write
ClickHouse (event log)
↓
Next.js Dashboard (BFF proxy)
↑
Datadog Lapdog (agent telemetry)
Backend (this repo)
- 6 new MCP tools:
memory_propose,memory_review_queue,memory_approve,memory_reject,memory_contest,memory_blame_dynamic - Team writes silently redirect:
memory_save/memory_team_share→ PR flow - Extended
memory_smart_search: unified ranked hits for Beliefs + personal Memories, scope metadata on every result - Conflict detection via local
all-MiniLM-L6-v2embeddings (no API key) - KV scopes for PRs, belief scopes, contested pairs — SQLite-backed via iii-engine
- ClickHouse dual-write for append-only
belief_events; blame degrades gracefully when CH is down
Dashboard (Next.js)
- PR review queue with semantic dynamic diffs (claim / scope / confidence / provenance — not line diffs)
- Contested belief resolver with scoped-merge preview
- Activity feed from ClickHouse
- Memory ROI: read counts, citations, token savings (Lapdog ⋈ ClickHouse)
- BFF architecture: browser never holds secrets or calls MCP/CH/Datadog directly
Agent integration
- Works with Claude Code, Cursor, Codex CLI, Gemini CLI, and any MCP client
- Lapdog captures prompts, tool calls, and token counts for demo observability
Challenges we ran into
- Agent tool descriptions are the UX. Bad MCP descriptions mean agents save team facts as personal memory or skip the PR flow entirely. We iterated on tool schemas and ran known-good test prompts until agents reliably called
memory_proposefor team scope. - Belief diffs aren't line diffs. Comparing two natural-language claims required semantic dimension cards (claim, scope, confidence, downstream impact) — not git-style patches.
- Scoped merge is subtle. "Both beliefs active at different paths" needs authoritative server-side glob validation on approve; the dashboard preview is UX-only.
- Soft dependencies must not block demos. ClickHouse and Datadog are optional — KV-backed blame always works; the UI shows degradation banners instead of hard failures.
Accomplishments we're proud of
- PR-mediated team memory end-to-end: propose → contest → scoped merge → scoped retrieval
- 950+ tests on the base engine; governance layer follows the same iii-engine / MCP patterns
- Zero external DBs required for core operation — iii-engine KV + local embeddings
- Graceful degradation — demo works with KV alone; analytics layer when sponsors' infra is available
- Built on a production-grade memory engine (54 MCP tools, hybrid BM25 + vector + graph retrieval, 95.2% R@5)
What we learned
- Single-user memory and team memory are different products. Conflating them causes silent corruption.
- Governance belongs at the write boundary, not read time. Detect conflicts when someone proposes, not when an agent retrieves stale truth.
- Path-scoped beliefs (
services/auth/**vsprototypes/**) are more practical than picking one winner in contested resolution. - MCP tool descriptions and auth headers (
X-User-Id,X-Agent-Session-Id) are as important as the storage schema.
What's next
- GC cron: nightly
gc-botproposes dedup/archive PRs through the same review flow - RBAC on memory scope (
project:read,governance:delete) - Clerk/NextAuth identity (MVP uses shared secret + attested headers)
- LLM-assisted conflict judgment (MVP uses embedding cosine only)
- IDE inline hover: blame on retrieved beliefs without leaving the editor
Built with
typescript, nodejs, iii-engine, iii-sdk, mcp, sqlite, clickhouse, next.js, react, tailwindcss, datadog, lapdog, claude-code, cursor, vitest, docker, vercel
Try it out
git clone https://github.com/<your-org>/agentcloud
cd agentcloud && npm install && npm run build
export AGENTMEMORY_SECRET=your-secret
export USER_ID=alice
export TEAM_ID=your-team
npm start # memory server :3111, viewer :3113
npx agentmemory connect cursor # or claude-code
cd dashboard && npm run dev # governance UI :3000
npm run seed:governance # demo data
- GitHub:
https://github.com/<your-org>/agentcloud(update before submit) - Demo video: (add link)
- Live dashboard: (add Vercel URL if deployed)
Log in or sign up for Devpost to join the conversation.