Relay — the memory layer for your codebase

*Git remembers what changed. Relay remembers why.

💡 Inspiration

Every engineer has lived this: a PR merges, and within weeks nobody remembers why the code looks the way it does. What was tried and abandoned? What gotcha did the diff quietly work around? Which approach did we reject, and why? That context — the tribal knowledge — dies the moment the PR closes. The next developer, or the next AI agent, starts blind and re-makes the same mistakes.

We felt it acutely during the hackathon itself: two of us independently built the same webhook handler without realizing it, because there was no shared memory of who had done what. We were living the exact problem we were trying to solve. That sealed it — the handoff problem isn't abstract, it's the daily tax of working in a codebase with other people (and now, other agents).

🚀 What it does

Relay turns the events that already happen in your workflow into durable, trustworthy memory:

  1. Captures automatically — on every PR merge (via GitHub webhook), it pulls the diff, commits, and review threads (where the real decisions live).
  2. Synthesizes the why, what-was-rejected, and watch-outs using Cerebras.
  3. Builds a confidence/conflict knowledge graph on top of Backboard — when two PRs make contradictory architectural decisions, it flags the conflict for a human instead of letting it merge silently; when PRs corroborate, it raises a confidence score.
  4. Serves it to humans and agents — a chat UI for developers, and a sync into R-CLI so a coding agent inherits the full decision history before it writes a line of code.

Our demo: three auth PRs — a foundation, a session-based approach, and a JWT approach. Merge the JWT PR and Relay instantly flags that it conflicts with the session-based one. Ask the agent "what should I know before I implement auth?" and it answers with both approaches and the unresolved conflict. The handoff, made clean.

🛠️ How we built it

A small, composable Python service:

  • Capture — FastAPI webhook → GitHub API (diff + commits + review threads) → Cerebras gpt-oss-120b synthesizes a structured memory entry.
  • Knowledge graph — each memory is a node; relationships (conflicts_with, corroborated_by) are edges stored in Backboard metadata. On every capture, a second Cerebras call classifies the new memory against semantically-related ones as conflict | corroborate | unrelated, then updates both entries' epistemic state (status + a confidence score).
  • Read side — Backboard RAG retrieval → Cerebras streams a cited answer that surfaces conflicts and confidence ("⚠️ conflicts with #6", "corroborated by 3 PRs").
  • Agent handoff — a background watcher syncs the memory store into the active R-CLI session, so the agent reads it via /memory auto.
  • Live UI — a GitHub-themed dashboard with a real-time pipeline animation driven by Server-Sent Events.
  • Shipping — fully containerized with Docker and deployed live on Fly.io.

The pipeline is genuinely multi-call per merge (synthesize + conflict-check), which is only viable in real time because of Cerebras' throughput — the speed buys us a correctness guarantee a slower API would force us to batch overnight.

🧗 Challenges we ran into

  • Rate limits vs. a multi-call pipeline. A free Cerebras org is ~5 requests/min, but each capture needs several calls. We round-robin across N API keys to solve this problem. Three keys turned bursty captures from "429 stall" into smooth.

  • R-CLI's per-session memory. R-CLI spins up a new assistant every session, and Backboard memory is assistant-scoped — so the agent couldn't see Relay's memory by default. We built a watcher that auto-syncs the store into whichever session is live, and made the sync idempotent to kill duplicate cards under concurrent writes.

Built With

  • asyncio
  • backboard
  • cerebras
  • docker
  • docker-compose
  • fastapi
  • fly.io
  • github-api
  • github-webhooks
  • gpt-oss-120b
  • html
  • httpx
  • javascript
  • python
  • r-cli
  • rag
  • server-sent-events
  • uvicorn
Share this project:

Updates