When two parties are in conflict, communication is everything. At Acuerdio (https://acuerdio.com), we built a real-time mediation platform where AI and human mediators guide disputes to resolution — all through WebSockets.
Why Real-time Matters in Mediation
Mediation isn't like a chatbot conversation. It's a structured negotiation where:
- Both parties need to see proposals simultaneously
- A mediator (AI or human) orchestrates the conversation
- Legal documents need to be drafted and signed in real-time
- Video sessions happen alongside text-based negotiation
We needed a system that handles all of this with sub-second latency.
Architecture: Django Channels + Remix
We use Django Channels with a Redis channel layer for WebSocket communication. The frontend uses Remix 2 + React 18 with custom hooks for real-time state management.
The Mediation Flow
- Party A opens case
- AI analyzes conflict
- Both parties join real-time session
- AI proposes resolution / Parties negotiate
- Agreement reached
- eIDAS signature
- Legal document generated
AI as Mediator
The AI mediator participates in the WebSocket session just like a human would — analyzing both parties' positions and suggesting fair resolutions in real-time.
Video Integration with Daily.co
For complex cases, we offer video mediation sessions powered by Daily.co with:
- Private rooms (max 4 participants)
- Recording enabled (legal requirement)
- 1-hour session limit
Scaling Considerations
- Redis Cluster for channel layer (handles 10K+ concurrent connections)
- Celery workers for async LLM calls (don't block the WebSocket)
- PostgreSQL with pgvector for legal document similarity search
- S3 for recorded video sessions and signed documents
Lessons Learned
- WebSocket reconnection is critical — Users on mobile networks drop frequently
- Message ordering matters — In legal mediation, the sequence of proposals is legally significant
- AI latency management — Show typing indicators while AI processes
- Privacy by design — All messages are encrypted, mediations are confidential by law
Built with Django Channels, Remix, and a lot of legal expertise. Acuerdio (https://acuerdio.com) — Resolve disputes without going to court.
Top comments (0)