Assembly AI Lab
A multi-agent constitutional deliberation platform - turning legal text into structured, observable debate between AI delegates.
Abstract
Assembly AI Lab is a research prototype that recreates a constitutional assembly using AI delegates. A user uploads a constitution or passage of law, the system parses it into clause-level units, and an orchestrator runs a structured deliberation session - speaker election, clause-by-clause debate, amendments, voting, summaries, and a final narrative report.
The system is built as a React + TypeScript frontend, an Express + TypeScript backend, and a Firebase Firestore layer providing real-time persistence. Large language models are accessed through a provider abstraction. The orchestrator is the most distinguishing component: rather than producing free-form chatter, it drives delegates through a deterministic procedural workflow that produces transcripts and metrics suitable for academic review.
System architecture
Three layers, separated by clear contracts. The frontend renders state; the backend writes it; Firestore synchronizes everything in real time.
End-to-end orchestration
The orchestrator is the system's distinguishing feature. Rather than free-form chat, it drives a deterministic five-phase workflow from upload to final report.
Constitution ingestion
User uploads a PDF or TXT. Backend extracts text and applies parsing logic to detect headings - article, section, part. Each clause becomes a Firestore document under a parent constitution. When no clean structure is detected, the system falls back to chunk-based segmentation so a session can still proceed.
Session configuration
User specifies the constitution, one or more language models, the number of active agents, max clauses, majority threshold, speech preferences, rebuttal behavior, and whether a speaker is elected. The backend validates and writes a normalized session shell to Firestore.
Orchestration & debate
On launch, the backend acquires a Firestore lock to prevent duplicate orchestrators. Delegate agents are instantiated from persona templates; an optional speaker election runs. For each clause: openings → optional rebuttals → amendment proposals → evaluation → voting → patch application. Every event writes to Firestore in real time.
Live state & frontend monitoring
The workspace subscribes directly to the session document and its subcollections (agents, messages, events, amendments). The frontend also drives browser-side speech synthesis with a playback-ACK handshake so the orchestrator advances safely.
Finalization & output
After the last clause, the orchestrator assembles the final draft, writes a narrative report under the reports collection, updates lifecycle state, and releases the session lock. Stored transcripts, metrics, amendments, and reports remain available for post-session review.
Architectural & functional results
Three observations stood out across the implementation: a clean separation of concerns, Firestore as a live synchronization layer (not just a database), and a procedural orchestrator that makes deliberation auditable.
Clean three-layer separation
React frontend, Express backend, and Firestore form a clear boundary stack. Each layer is independently understandable and observable in real time, which made debugging orchestration-stage transitions tractable.
Firestore as a live event bus
Subscribing the workspace directly to session documents and subcollections eliminated a polling loop and let the UI animate as the orchestrator wrote events - closer to a streaming-state model than a request-response one.
Clause-level document intelligence
Treating ingestion as a parser problem (headings - clause records) rather than free-form chunking made every later step - debate, amendment, vote, summary - addressable per clause and traceable back to the source document.
Procedural orchestrator over free chat
The deterministic phase machine (open → rebut → amend → evaluate → vote → apply) produced transcripts that read as deliberation rather than conversation, and made post-session review meaningful instead of anecdotal.
The platform combines a technical design, real-time data persistence, and a structural format of deliberation into one place. At the same time, parts of the system have conceptual richness exceeding their current implementation maturity.
What this prototype is honest about
The implementation is partially complete and the report is candid about it. These are the contract gaps and engineering shortfalls we'd close before calling it production-ready.
What comes next
Contract unification
A single shared schema for session config, metrics, and reports - synchronized across backend and frontend so every visible field has a runtime impact.
Testing & reproducibility
Integration tests, orchestrator smoke tests, and a deterministic mock LLM provider so demonstration sessions become repeatable.
Analytics enhancement
Delegate-influence estimation, consensus measurement, amendment-acceptance analysis, cross-session comparison.
Session reporting
Full narrative report generation plus direct export of session summaries as paper-ready artifacts.
Security & authentication
Production Firestore rules, authentication, secret management, structured error logging.
Visual interface
A visual state machine, session presets, and explanations aimed at non-technical readers of debate transcripts.
Cite this work
@techreport{verma2026assembly,
title = {Assembly AI Lab: A Multi-Agent Constitutional
Deliberation Platform},
author = {Verma, Sachin and Das, Rishi Raj},
year = {2026},
month = {May},
type = {Research Prototype Report},
institution = {Acadable Labs},
note = {Working prototype}
}Want the full report, the Firestore schema, or to talk about extending the orchestrator? Get in touch.

