Project Info
Inspiration
Every company knows more than its public surface says. The team remembers what got decided in a meeting; the website still shows last year's pricing. Support answers a question one way; the docs say another. AI search engines then read the stale version and repeat it with total confidence. We kept hitting the same failure. AI tools are great at generating answers and terrible at proving them. A chatbot will happily tell a customer something that contradicts your own internal truth, with zero evidence and zero paper trail. For anything customer-facing, "sounds right" isn't good enough. So we built Quad: an AI employee that proves its work. Not a chatbot. An employee with a company brain, real browser-grounded evidence, live execution, and an approval-first contract.
What it does
Quad connects to your systems of record and continuously audits them. It finds conflicting claims, stale facts, and broken links across every tool your company runs on, and traces every answer back to the exact source document that produced it. Every fix is drafted in your brand voice and queued for one-click approval before anything ships. Every AI-generated conversation gets evaluated for quality in production. Quad also joins meetings. It listens live, in real time, and turns conversation into structured memory the moment it's said. Ask ASI:One "what did we decide on the Q3 budget" and Quad retrieves it, sourced back to the exact meeting and moment. Quad takes action. It operates a real browser, executes the fix, and orchestrates other agents through Agentverse to get the work done. Quad gets better from doing the work. Every meeting it sits in, every gap it finds and fixes, every correction a human makes, trains the system that runs the next one. The system running next month answers better than the system running today. Every claim Quad makes carries proof. This is Quad Chain. When Quad says your refund window is 30 days, it shows the exact source. When it compresses a long meeting trace into a short memory, it proves what was kept and what was dropped, so an agent or a human downstream can verify the summary before acting on it. Quad traces a claim all the way back to the moment it was true, a document or a sentence someone said in a call.
How we built it
Connect: integrates with the systems of record knowledge actually lives in. Audit: a continuous pass across every connected source finds conflicts, stale facts, and gaps. Live meeting capture: Quad joins meetings and listens in real time, converting conversation into structured, sourced memory as it happens. Memory: a persistent, embeddings-backed company brain, queryable retroactively through ASI:One, accumulating from documents and conversations. Quad Chain: verifiable receipts on every memory and every claim. Compression with proof of what was preserved. Tamper-evident, anchorable on-chain, private data stays off-chain. Learning loop: outcomes from real meetings and real corrections feed back into the system, so accuracy and usefulness improve with usage. Trace: every answer resolves back to its source, with drafted fixes in brand voice queued for approval. Action: real browser execution via Browserbase, real multi-agent orchestration via Agentverse, registered and callable as a live agent through the Fetch.ai Agent Chat Protocol and ASI:One. Reasoning: a multi-call Anthropic pipeline does analysis, drafting, independent verification of each draft against its evidence, and synthesis. Observability: Arize traces and evals on every cognitive step, scoring groundedness and hallucination risk before anything ships. Reliability: Sentry-instrumented end to end so a failed step degrades instead of taking down the run. Retrieval: OpenAI embeddings power recall across the memory graph. Quadchain Modern agent systems do not just need shorter prompts; they need compressed memory that can be routed, audited, repaired, and rejected when declared obligations are missing. We introduce QuadChain, an obligation-verifiable context compression architecture for multiagent LLM systems. QuadChain couples extractive compression with explicit evidence obligations, answer-concept checks, role-aware routing, omission manifests, handoff integrity metadata, and verified selective rehydration. The output is not a proof of semantic faithfulness; it is a verifiable memory packet that tells downstream agents which declared facts were preserved, which spans were omitted, what was repaired, and whether the handoff should be accepted. In controlled coding-agent fixtures and public-benchmark-style local adapters, the measured 4-agent workflow drops from 9,000 raw tokens to 2,283 routed tokens (74.63% reduction). Verified selective rehydration reaches 0.9390 deterministic task score with 88.89% mean token reduction and 210/240 accepted packets under matched budgets. These results do not establish state-of-the-art prompt compression; they support a narrower systems claim: compressed agent memory should be accountable, rejectable, and selectively repairable rather than blindly summarized.
Challenges we ran into
Reinforcement learning from real conversations had to improve answers, not just add to the model indiscriminately. We gated the loop so only verified outcomes feed it. Live meeting capture had to stay reliable enough to demo. We built a fallback path that keeps the session running if a piece of the pipeline hiccups. The action layer and the knowledge layer had to work as one system. We built them on the same backend from the start. Accomplishments we're proud of A knowledge platform that connects, audits, traces, drafts, and evaluates, and also captures knowledge that never existed in a document. A verifiable memory protocol, Quad Chain, that's infrastructure-grade. Real agent orchestration through Agentverse with real execution. An agent that's genuinely discoverable and callable through ASI:One. A reinforcement loop where the system improves with usage.
What we learned
Auditing documents is the easy part of this problem. The hard part is the knowledge that was never written down, the meeting where the real decision got made, and proving that what an agent remembers is still true by the time it acts on it.
What's next
Extend live capture into every channel knowledge moves through. Deepen the learning loop so improvement compounds faster with usage. Open Quad Chain as the verifiable memory layer other agents ground themselves against.
Quad
Knowledge infrastructure for every agent.
Quad is a company-aware AI employee that connects to systems of record, builds a scoped company brain, audits customer-facing surfaces against that brain, and turns gaps into approved work with verifiable receipts.
Landing: quad.stephenhung.me | Dashboard: app.quad.stephenhung.me Research: QuadChain paper
What Quad Does
- Ingests company context from docs, websites, meetings, transcripts, and connector events.
- Scopes memory by organization, workspace, team, user, freshness, visibility, and approval state.
- Audits public claims, security answers, and customer-facing content against verified internal context.
- Streams work live through the run event spine so dashboard, worker, and agent surfaces share the same trace.
- Drafts fixes, answers, tasks, and connector actions, then gates writes behind approval.
- Emits QuadChain packets for memory writes, agent handoffs, audit reports, trust packets, approvals, and connector actions.
Technically, Quad is a shared runtime for agents that need to know what the company knows, prove where it came from, and act only when the proof is good enough.
Product Loop
connect sources -> capture context -> retrieve scoped memory -> audit claims
-> draft action -> verify evidence -> request approval -> execute or block
-> write receipt -> learn back into the brain
The same loop is exposed through the dashboard, external agent routes, worker queue, chat, voice, meeting capture, and future connector surfaces.
Architecture
| Layer | Implementation |
|---|---|
| Web app | Next.js App Router, React, TypeScript, Tailwind |
| Operator UI | QuadWorkspaceDashboard, operator console, live logs, trust trail, QuadChain workbench |
| Company brain | Postgres/Supabase + pgvector schema, metadata sidecars, permissions, seeded local fallback |
| Runtime facade | /api/core/run for chat and queued audits across dashboard, voice, worker, and external agents |
| Run/event spine | Redis streams when configured, bounded in-memory fallback for zero-key demos and tests |
| Jobs | Durable audit queue, worker loop, canary route, retry/dead-letter accounting |
| Browser/action layer | Browserbase render path with static fetch fallback, publish dry-run/execute contracts |
| Meeting and voice | Deepgram transcription, meeting intelligence, context capture, approval-backed memory proposals |
| External agents | Fetch/Agentverse-style descriptor and run handoff routes backed by the same core runtime |
| QuadChain | Hash-backed packets, evidence obligations, omission manifests, answer-readiness checks, optional anchoring metadata |
| Observability | OpenTelemetry/Phoenix traces, Sentry, runtime receipts, usage meter, eval surfaces |
QuadChain
QuadChain is the verifiable memory layer behind Quad. It treats compressed context as an object with obligations, not just a shorter string.
Each packet can include:
- source hashes and packet hashes
- required evidence obligations
- answer concepts that must survive compression
- omitted span manifests
- token before/after accounting
- verifier version and policy hash
- handoff id and certificate id
- open obligations such as missing evidence, required approval, or blocked connectors
A downstream agent can accept or reject a packet based on declared evidence and concepts. When obligations are missing, QuadChain supports selective rehydration: fetch the minimum source spans needed for repair instead of blindly expanding the whole context.
The research paper frames the boundary clearly: QuadChain is not a proof of semantic faithfulness and does not claim state-of-the-art prompt compression. It is a systems primitive for accountable, rejectable, selectively repairable agent memory.
Measured results from the paper:
- 4-agent workflow: 9,000 raw tokens to 2,283 routed tokens, a 74.63% reduction, with 41/41 required evidence items and 38/38 answer concepts preserved.
- Verified selective rehydration: 0.9390 deterministic task score with 88.89% mean token reduction and 210/240 accepted packets under matched budgets.
- Handoff smoke checks reject tampered Merkle roots, dropped required evidence, stale registry receipts, and invalid routes.
Private raw context, evidence strings, transcripts, screenshots, prompts, responses, credentials, and customer documents stay off public registries. Optional anchoring is limited to ids, hashes, Merkle roots, verifier versions, policy metadata, and handoff records.
Key API Surfaces
| Surface | Purpose |
|---|---|
POST /api/core/run | Shared runtime command contract for chat and queued audits |
GET /api/agent/describe | Public external-agent descriptor for discovery and handoff metadata |
POST /api/agent/run | External-agent entrypoint that delegates into the same core queue path |
GET /api/operator | Workspace, memory, run, approval, capability, evidence, worker, and usage summary |
POST /api/ingest | Stage or write company memory with scope and approval metadata |
POST /api/context/capture | Normalize meeting, voice, chat, docs, or connector events into durable context signals |
GET /api/connectors/registry | Safe connector registry with auth mode, scopes, lifecycle state, credential state, risk, and playbook bindings |
GET /api/connectors/audit-log | Safe service-account audit logs for connector credential installs and revokes |
GET /api/brain/graph | Safe context graph with freshness, scope, relationship, and receipt summaries |
GET /api/playbooks | Safe skill/playbook registry with guardrails, evidence requirements, approval tiers, and verifier checks |
POST /api/enterprise-proof | Answer trust/security questions from brain memory plus connector documents |
GET /api/quadchain/packets | List packet summaries for runs and handoffs |
POST /api/quadchain/verify | Verify a packet certificate and declared obligations |
POST /api/publish/dry-run | Stage connector writes only when capabilities and approval gates allow it |
POST /api/publish/execute | Record approved connector execution receipts |
POST /api/voice/transcribe | Transcribe voice, optionally remember it, then route through the shared chat runtime |
POST /api/jobs | Queue website audit and enterprise proof runs for the worker |
GET /api/jobs/health | Report queue depth, retries, dead letters, heartbeat, and canary status |
Hosted routes use the same bearer/api-key auth shape: Authorization: Bearer $QUAD_API_SECRET or x-quad-api-key: $QUAD_API_SECRET. Service tokens can be scoped by org and capability. Zero-key local mode stays available for demos through seeded data and in-memory fallbacks.
Repository Map
src/app/ Next.js pages and API routes
src/components/ Dashboard, operator console, live logs, voice, QuadChain UI
src/lib/core/ Shared runtime facade and agent-loop traces
src/lib/brain/ Memory schema, ingest, retrieval, permissions, refresh, graph
src/lib/context-capture/ Event-to-memory signal extraction
src/lib/connectors/ Connector credentials, documents, registry, auth posture
src/lib/quad-chain/ Packet construction, verification, registry, metrics, workbench
src/lib/runs/ Runs, tasks, artifacts, approvals, receipts, access checks
src/lib/jobs/ Queue, worker, scheduler, canary
src/lib/fde/ Trust packets, verification, publishing, execution receipts
src/lib/metaregistry/ Capability catalog, install plans, runtime tool routing
src/lib/meeting/ Meeting intelligence and sourced follow-ups
src/lib/observability/ Runtime traces, evals, status, Sentry/Phoenix wiring
landing/ Public site and research paper assets
docs/ Backend schema, readiness notes, runbooks, gap plan
Local Development
npm install
cp .env.example .env.local
npm run dev
The app runs without hosted keys. Redis falls back to in-memory streams, the brain falls back to seeded demo data, and Browserbase falls back to static fetch. Add keys in .env.local to turn on durable storage, hosted events, model calls, voice, Browserbase, Sentry, and Phoenix.
To enable durable backend state:
npm run db:migrate:dry
npm run db:migrate
npm run db:status
Worker path:
npm run worker:preflight
npm run worker
npm run canary:worker
Verification
npm run typecheck
npm test
npm run build
npm run e2e
For a faster local gate, run:
npm run check
npm run check:full adds the Playwright e2e suite. npm run sponsor:proof returns a booth-safe manifest of live, fallback, and planned sponsor proof claims without printing secrets.
Status
Quad currently ships the core loop: company brain, scoped retrieval, browser-grounded audit, run/event replay, approval ledger, QuadChain receipts, operator console, capability registry, worker queue, meeting/voice capture, and connector staging contracts.
The important remaining work is integration depth: more production connectors, full public long-context benchmarks for QuadChain, receiver-side rehydration in more routes, and live third-party publisher adapters beyond the current approval-backed execution records.
Analysis
View
Metric
- 128
- 48
- 39
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- Next.jsIn code
- PostgreSQLIn code
- PythonIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- RedisClaimed
12 of 13 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeConfig · Commits
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
2.2 MB
Source files
395
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
notandruu/quad
494 files · 8.5 MB · @ 294b565
Structure
Interface
56 files · 11%Screens, components and styles rendered to the user.
API & routing
52 files · 11%Request entry points: routes, handlers and controllers.
Application logic
111 files · 22%Domain rules, services and shared utilities.
Background jobs
12 files · 2%Work run outside a request: tasks, workers and schedules.
Data & schema
1 file · 0%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript78%
- Markdown11%
- HTML7%
- Python2%
- CSS1%
- SQL1%
- Other (3)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 31- @anthropic-ai/sdk
- @browserbasehq/sdk
- @gsap/react
- @opentelemetry/api
- @opentelemetry/exporter-trace-otlp-http
- @opentelemetry/resources
- @opentelemetry/sdk-trace-node
- @opentelemetry/semantic-conventions
- @sentry/nextjs
- @supabase/supabase-js
- @upstash/redis
- gsap
- next
- pg
- playwright-core
- react
- react-dom
- zod
- +13 more
landing/package.json
npm · 15- @gsap/react
- eslint-config-next
- framer-motion
- gsap
- lenis
- next
- react
- react-dom
- +7 more
agent/requirements.txt
pypi · 4- python-dotenv
- requests
- uagents
- uagents-core
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.