Trace watches your team's chat, pull requests, and documents across every platform, builds a living temporal knowledge graph of every decision, and interrupts the moment someone contradicts a past decision, rebuilds something that already exists, or lets critical knowledge walk out the door.
Decisions get made in Slack threads, standups, PR descriptions, and one-off docs — then quietly forgotten. Engineers ship things the team already ruled out. Two squads build the same service, unaware of each other. When one person leaves, the why leaves with them.
None of this is a search problem — "where's the doc?" You don't know you need to search, because you don't know the decision exists. It's a memory problem: an organization can't remember what it decided, when, and why — and can't notice when it contradicts itself.
Trace is not a search box you have to remember to open. It's an agent that watches, remembers, and interrupts — only when it matters.
| Finding | Real example it fires on | |
|---|---|---|
| 🔴 | Decision drift | A PR migrates billing to MongoDB — but the team standardized on PostgreSQL last quarter, "no MongoDB for new services." |
| 🔵 | Duplicate work | Payments starts building a retry queue — Platform already shipped a shared one every service was told to reuse. |
| 🟡 | Ownership / bus-factor gaps | Auth is solely owned by one engineer — who just announced they're on leave next month. |
Every finding is cited, dated, and routed to an owner. You grade it (✅ real / ❌ not real), and that judgment trains the agent's precision for your team — a feedback signal a passive search tool never gets to collect.
The heart of Trace. Every message and PR is checked against the team's entire decision history before it lands. When it genuinely contradicts or duplicates a prior decision, Trace replies in-thread / on the PR with a cited, high-confidence alert — the headline, the exact prior quote, who decided it, and the reconciliation ask. When there's no real conflict, it stays silent. Precision is the whole product: one false "you contradicted yourself" ping destroys trust, so the Guardian only speaks when it can prove it.
A daily scan over the whole memory that surfaces the top things your team hasn't realized yet — drift, duplicate work, and ownership risk — each grounded in real, dated source quotes. One click delivers the briefing to Discord, Slack, or Teams. Nobody has to ask; the memory reports on itself.
Trace's agents don't just read chat text — they read the files people drop, on every connected platform. Attach a PDF spec in Discord, a design doc in Slack, a spreadsheet of decisions, a meeting transcript (.vtt/.srt) — Trace extracts the text (PDF, DOCX, XLSX, CSV, Markdown, TXT, transcripts, logs, JSON), folds it into the same knowledge graph, and reasons over it alongside every message. The result: richer context and durable long-term memory — the decisions buried in attachments become first-class, searchable, and defended just like the ones typed in chat.
Trace exposes the team's live memory as a machine-readable contract other coding agents consult before they write code. Cursor, Claude Code, Copilot, Aider, and Windsurf can pull architecture constraints, conventions, past mistakes, rejected designs, known bugs, and current ownership — so every agent shares one organizational memory and stops reintroducing things the team already ruled out. Delivered three ways: a live HTTP endpoint, a Model Context Protocol (MCP) server, and a rules-file generator (.cursorrules, CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, CONVENTIONS.md).
The memory, made visible. An interactive force-directed graph of people, decisions, reasons, and their typed temporal relationships (who · decided · because · supersedes), plus a decision timeline that shows exactly which decision reversed which, and when.
Ask the memory anything ("what did we decide about the database?", "who owns auth?") and get a cited answer composed from the graph and the original source messages — in text, or spoken through a lip-synced voice agent.
Confirm or dismiss any finding and Trace writes it back into memory: confirmed findings are reinforced, dismissed ones are suppressed and never raised again, and reversed decisions supersede the stale ones rather than piling up. The precision score climbs as the team trains it.
Model a bus-factor scenario ("what happens if this owner leaves?") and see which decisions and systems are exposed.
Confidential or forgotten items are redacted across every surface — the graph, answers, briefings, and the Brain API — so private context never leaks into an agent's response.
Trace is built on Cognee — Cognee is the brain, not a bolt-on. Where a vector store only remembers text that looks similar, Cognee's ECL (Extract → Cognify → Load) pipeline builds a temporal knowledge graph of typed entities and relationships — which is the only representation in which "this decision reversed that one, over time" is even expressible. That single capability is what makes drift detection possible.
Trace uses the full Cognee lifecycle:
| Stage | What Trace does | Cognee primitives |
|---|---|---|
| Remember | Every message, PR, and parsed file is ingested and turned into an evolving graph of entities and typed, temporal relationships (who · decided · because · supersedes). |
add() → cognify() |
| Recall | Drift checks, Q&A, briefings, and the Brain all retrieve grounded evidence — the traversed subgraph and the exact source message for citations. | search() with GRAPH_COMPLETION + CHUNKS |
| Improve | Graded findings are written back as notes and re-cognified; reversed decisions supersede the stale ones. | re-cognify() on feedback |
| Forget | Confidential items are deleted/redacted across every surface. | dataset + node redaction |
The client in lib/cognee.ts authenticates with X-Api-Key + X-Tenant-Id and hardens every call with per-request timeouts, a fresh-socket retry for transient resets, and a circuit breaker with automatic failover to a self-hosted Cognee instance — so a slow or unreachable backend never takes the product down. Retrieval merges local-embedded chunks + the graph, so answers stay accurate and cited even under load.
Trace is a single Next.js process that serves the UI and hosts every API route — all secrets stay server-side. Thin platform adapters push events into ingest endpoints; a debounced buffer batches writes into Cognee, the system's temporal knowledge graph. All reasoning (drift / duplicate / ownership) is grounded in that graph.
graph TD
subgraph Sources["Connected sources"]
DIS[Discord bot] --> ING
SL[Slack Events] --> SLK
GH[GitHub webhook] --> HOOK
TM[Teams webhook] --> ING
FILES[PDF · DOCX · XLSX · CSV · transcripts] --> IF
end
subgraph App["Next.js app · UI + API · secrets server-side"]
ING[/api/ingest/] --> BUF[Debounced ingest buffer]
IF[/api/ingest-file · parse to text/] --> BUF
HOOK[/api/github/webhook/] --> GUARD
SLK[/api/slack/events/] --> GUARD
BUF --> REMEMBER
GUARD[Guardian · /api/guard]
PULSE[/api/pulse · daily scan/]
RECALL[/api/recall · Q&A + voice/]
BRAIN[/api/brain/context · agent contract/]
end
subgraph Cognee["Cognee · temporal knowledge graph"]
REMEMBER[remember: add + cognify] --> KG[(Decision graph)]
KG --> RETRIEVE[recall: GRAPH_COMPLETION + CHUNKS]
end
GUARD --> RETRIEVE
PULSE --> RETRIEVE
RECALL --> RETRIEVE
BRAIN --> RETRIEVE
GUARD -->|drift / duplicate| REPLY[Reply in thread · comment on PR]
PULSE --> BRIEF[Morning briefing · deliver to channels]
BRAIN --> AGENTS[Cursor · Claude · Copilot · Aider via MCP + rules]
RETRIEVE --> UI[Dashboard: graph · timeline · ask · voice]
Trace runs a continuous Observe → Remember → Detect → Interrupt → Learn loop. It doesn't wait to be prompted.
sequenceDiagram
participant Team as Team (chat / PR / file)
participant Bot as Adapter (Discord / Slack / GitHub)
participant Guard as Guardian (/api/guard)
participant Cognee as Cognee
Team->>Bot: posts a message · opens a PR · drops a doc
Bot->>Guard: checkMessage(text, author)
Guard->>Cognee: retrieve prior decisions (GRAPH_COMPLETION)
Cognee-->>Guard: relevant prior decision(s) + who / when
alt contradicts or duplicates a prior decision (high confidence)
Guard-->>Bot: cited alert · headline + prior quote + owner
Bot-->>Team: replies in-thread / comments on the PR
else no clear conflict
Guard-->>Bot: silence (precision-first — no false pings)
end
Bot->>Cognee: ingest the new message / file (remember)
- Cloud-first, self-healing.
lib/cognee.tsauthenticates to Cognee Cloud (X-Api-Key+X-Tenant-Id) and treats it as primary; a circuit breaker flips to a self-hosted Cognee instance on a stall/outage, then re-probes Cloud after a cooldown. A stale-while-revalidate graph cache means the dashboard never blocks on a slow backend. - Bounded latency, always. Every Cognee call is wrapped in a per-request timeout with a fresh-socket retry for transient resets. The Company Brain endpoint races live enrichment (Cognee + open GitHub issues) against a hard deadline and falls back to the decision ledger — so an agent's pre-code call can never hang.
- Resilient reasoning chain. The Guardian, briefing, and answer composition run through an LLM failover chain (Cognee's managed model → Groq → Google → local Ollama) with a per-provider cooldown on rate limits, so a single provider's 429 never breaks a catch.
- Precision-first, and it learns. The Guardian only fires on a cited, high-confidence conflict; the confirm/dismiss loop writes graded findings back into memory, reinforces the real ones, and suppresses dismissed ones.
- Safe by construction. UI and integrations live in one long-lived Node server (Docker) with secrets server-side; webhooks are HMAC-verified; and forgotten/confidential terms are redacted across every surface — graph, answers, briefings, and the Brain API.
GET /api/brain/context?topic=<area>&format=json|md|rules&target=cursor|claude|copilot|aider|agents
Returns the pre-code context pack — architecture constraints, conventions, past mistakes, rejected designs, known bugs (seeded + memory-derived + live open GitHub issues), and current ownership — scoped to a topic, and always redacted for forgotten/confidential terms.
# Live JSON an agent can consume before writing code
curl "https://thetrace.me/api/brain/context?topic=database"
# Generate rules files the whole team's agents share
npm run brain:rules # writes .cursorrules · CLAUDE.md · AGENTS.md · copilot-instructions.md · CONVENTIONS.mdMCP server (adapters/brain-mcp.mjs) exposes two tools to any MCP-capable agent:
company_brain({ topic })→ the context pack as agent-readable markdown.check_before_coding({ intent })→ scoped pack + conflict flags ("your plan uses MongoDB — the org standard is Postgres; MongoDB was rejected in Q1").
- App — Next.js 14 (App Router) · React 18 · TypeScript (strict) · Tailwind with OKLCH design tokens
- Memory — Cognee temporal knowledge graph (
remember/recall/improve/forget), managed or self-hosted, with automatic failover - Reasoning — Cognee's managed LLM for graph completion, with a resilient provider chain (Groq / Google / local Ollama) for the Guardian, briefing, and answer composition — so a single provider's rate limit never breaks the agent
- File understanding —
unpdf(PDF) ·mammoth(DOCX) ·xlsx(Excel/CSV) · native text/transcripts - Graph viz —
react-force-graph-2d - Voice — ElevenLabs Conversational AI (WebRTC) with a lip-synced avatar
- Sources — Discord (
discord.jsgateway) · Slack (Events API) · GitHub (HMAC-verified webhooks) · Teams (incoming webhook) · direct file upload - Agent interop — Model Context Protocol server + rules-file generator
- Quality — Vitest · CI (typecheck · lint · test · build · secret scan)
| Endpoint | Purpose |
|---|---|
POST /api/ingest |
Chat/platform adapters push messages → buffered into memory |
POST /api/ingest-file |
Parse PDF/DOCX/XLSX/CSV/transcripts → text → memory |
POST /api/guard |
Real-time drift/duplicate check for one message or PR |
POST /api/recall |
Cited Q&A over team memory (text + voice) |
GET /api/pulse |
Morning briefing — the top findings, each cited |
GET /api/brain/context |
Company Brain — agent-consumable context pack |
POST /api/github/webhook |
HMAC-verified PR drift catch → comments on the PR |
POST /api/slack/events |
Slack mentions (answers) + messages (drift), replied in-thread |
GET /api/graph |
The live decision graph for visualization |
GET /api/health |
Liveness + memory backend reachability |
app/ Next.js routes — pages + ~25 API handlers (ingest, guard, recall, pulse, brain, webhooks…)
components/ UI — dashboard, decision graph, timeline, ask/voice, briefing, integrations hub
lib/ Domain services — cognee client + failover, guard, pulse, compose, brain, parseFile, notify
adapters/ Platform bridges — discord-bot.mjs, brain-mcp.mjs (MCP), teams/
data/ Decision ledger, known issues, and the offline memory snapshot
scripts/ Seeding + rules-file generation
# 1 · install
npm install
# 2 · configure memory (copy the template, fill in real values)
cp .env.example .env.local
# COGNEE_ENABLED=true
# COGNEE_BASE_URL=https://<your-tenant>.cognee.ai # or http://localhost:8000 (self-hosted)
# COGNEE_API_KEY=... COGNEE_TENANT_ID=...
# COGNEE_DATASET=trace
# GROQ_API_KEY=... # resilient reasoning fallback
# NEXT_PUBLIC_ELEVENLABS_AGENT_ID=... # optional · voice
# 3 · run
npm run dev # http://localhost:3001
npm run seed:demo # optional · load a sample decision history to exploreConnect Discord, Slack, GitHub, and Teams from the in-app Sources page — no terminal required. Health is at GET /api/health.
Trace today catches drift. Next, it closes the loop — and becomes the single memory layer every team and every agent shares:
- Autonomous reconciliation. Trace won't just flag a drift — it opens the fix. Catch a MongoDB PR against the Postgres standard, and Trace drafts the reconciling pull request (or the exception ADR) automatically. An agent that acts, not just alerts.
- Trace as a merge gate. A GitHub / GitLab status check that reviews every PR against the org's full decision history, conventions, and known bugs before it can merge — so drift never reaches
main. - Native Microsoft Teams + Jira / Linear. Catch drift at the ticket and standup level: a Jira story that reopens a settled decision, or a Teams thread that contradicts the roadmap, flagged before work starts.
- Standup Copilot. Trace joins the meeting, transcribes, and captures decisions live — the why is remembered the moment it's said, and no one has to write it down.
- Company Brain in your IDE. A VS Code / JetBrains extension surfacing constraints, rejected designs, and past mistakes inline as you type — not only over MCP.
- Org-wide brain with compounding precision. One shared memory across every repo, channel, and team, whose accuracy climbs per-team as findings are graded.
Trace pushes Cognee hard in production, and we're preparing contributions back to the project: a hardened, resilient client pattern (per-request timeouts + fresh-socket retry + circuit-breaker failover between managed and self-hosted), a "temporal decision graph" cookbook example, and field notes on running cognify reliably under sustained load. Cognee's temporal knowledge graph is what makes Trace possible — huge thanks to the team and community.
🌐 Try Trace ·
Trace — because the most expensive bugs are the decisions your team already made, and forgot.