<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: acuerdio</title>
    <description>The latest articles on DEV Community by acuerdio (@acuerdio).</description>
    <link>https://dev.to/acuerdio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3869503%2F3f455caa-058f-4d67-9c66-6174086bf5e2.png</url>
      <title>DEV Community: acuerdio</title>
      <link>https://dev.to/acuerdio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/acuerdio"/>
    <language>en</language>
    <item>
      <title>Real-time Mediation with WebSockets: How We Built a Legal Dispute Resolution Platform</title>
      <dc:creator>acuerdio</dc:creator>
      <pubDate>Thu, 09 Apr 2026 09:50:09 +0000</pubDate>
      <link>https://dev.to/acuerdio_es/real-time-mediation-with-websockets-how-we-built-a-legal-dispute-resolution-platform-aaf</link>
      <guid>https://dev.to/acuerdio_es/real-time-mediation-with-websockets-how-we-built-a-legal-dispute-resolution-platform-aaf</guid>
      <description>&lt;p&gt;When two parties are in conflict, communication is everything. At Acuerdio (&lt;a href="https://acuerdio.com" rel="noopener noreferrer"&gt;https://acuerdio.com&lt;/a&gt;), we built a real-time mediation platform where AI and human mediators guide disputes to resolution — all through WebSockets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Real-time Matters in Mediation
&lt;/h2&gt;

&lt;p&gt;Mediation isn't like a chatbot conversation. It's a structured negotiation where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both parties need to see proposals simultaneously&lt;/li&gt;
&lt;li&gt;A mediator (AI or human) orchestrates the conversation&lt;/li&gt;
&lt;li&gt;Legal documents need to be drafted and signed in real-time&lt;/li&gt;
&lt;li&gt;Video sessions happen alongside text-based negotiation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We needed a system that handles all of this with sub-second latency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture: Django Channels + Remix
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mediation Flow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Party A opens case&lt;/li&gt;
&lt;li&gt;AI analyzes conflict&lt;/li&gt;
&lt;li&gt;Both parties join real-time session&lt;/li&gt;
&lt;li&gt;AI proposes resolution / Parties negotiate&lt;/li&gt;
&lt;li&gt;Agreement reached&lt;/li&gt;
&lt;li&gt;eIDAS signature&lt;/li&gt;
&lt;li&gt;Legal document generated&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  AI as Mediator
&lt;/h2&gt;

&lt;p&gt;The AI mediator participates in the WebSocket session just like a human would — analyzing both parties' positions and suggesting fair resolutions in real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Video Integration with Daily.co
&lt;/h2&gt;

&lt;p&gt;For complex cases, we offer video mediation sessions powered by Daily.co with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Private rooms (max 4 participants)&lt;/li&gt;
&lt;li&gt;Recording enabled (legal requirement)&lt;/li&gt;
&lt;li&gt;1-hour session limit&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scaling Considerations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Redis Cluster&lt;/strong&gt; for channel layer (handles 10K+ concurrent connections)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Celery workers&lt;/strong&gt; for async LLM calls (don't block the WebSocket)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL with pgvector&lt;/strong&gt; for legal document similarity search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3&lt;/strong&gt; for recorded video sessions and signed documents&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;WebSocket reconnection is critical&lt;/strong&gt; — Users on mobile networks drop frequently&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Message ordering matters&lt;/strong&gt; — In legal mediation, the sequence of proposals is legally significant&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI latency management&lt;/strong&gt; — Show typing indicators while AI processes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy by design&lt;/strong&gt; — All messages are encrypted, mediations are confidential by law&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Built with Django Channels, Remix, and a lot of legal expertise. Acuerdio (&lt;a href="https://acuerdio.com" rel="noopener noreferrer"&gt;https://acuerdio.com&lt;/a&gt;) — Resolve disputes without going to court.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>websocket</category>
      <category>django</category>
      <category>react</category>
      <category>realtime</category>
    </item>
    <item>
      <title>Building an AI Mediator: Multi-LLM Architecture for Legal Dispute Resolution</title>
      <dc:creator>acuerdio</dc:creator>
      <pubDate>Thu, 09 Apr 2026 09:48:15 +0000</pubDate>
      <link>https://dev.to/acuerdio_es/building-an-ai-mediator-multi-llm-architecture-for-legal-dispute-resolution-a9o</link>
      <guid>https://dev.to/acuerdio_es/building-an-ai-mediator-multi-llm-architecture-for-legal-dispute-resolution-a9o</guid>
      <description>&lt;p&gt;At Acuerdio (&lt;a href="https://acuerdio.com" rel="noopener noreferrer"&gt;https://acuerdio.com&lt;/a&gt;), we built Spain's first AI-powered online mediation platform. Here's how we designed a multi-LLM architecture that understands legal conflicts and proposes fair solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Spain's new law (LO 1/2025) requires parties to attempt alternative dispute resolution before going to court. That's millions of potential cases — from neighbor disputes to family conflicts — that need a scalable, AI-assisted mediation process.&lt;/p&gt;

&lt;p&gt;We needed an AI system that could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand legal context in Spanish&lt;/li&gt;
&lt;li&gt;Propose balanced solutions to both parties&lt;/li&gt;
&lt;li&gt;Generate legally valid documents&lt;/li&gt;
&lt;li&gt;Handle sensitive emotional situations with empathy&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Architecture: Multi-Provider LLM Strategy
&lt;/h2&gt;

&lt;p&gt;We don't rely on a single LLM. Our architecture uses multiple providers with intelligent routing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Multi-LLM?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resilience&lt;/strong&gt; — If one provider goes down, we failover automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost optimization&lt;/strong&gt; — Use cheaper models for simple tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best-of-breed&lt;/strong&gt; — Each model excels at different aspects of mediation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance&lt;/strong&gt; — We can route sensitive data to EU-hosted models&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Mediation Pipeline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Case Analysis → Understand the conflict type and legal framework&lt;/li&gt;
&lt;li&gt;Party Profiling → Assess each party's position and interests&lt;/li&gt;
&lt;li&gt;Proposal Generation → Create balanced resolution proposals&lt;/li&gt;
&lt;li&gt;Agreement Drafting → Generate legally binding documents&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Legal Context Understanding
&lt;/h3&gt;

&lt;p&gt;Spanish legal mediation has specific requirements. We built a RAG system with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spanish Civil Code&lt;/li&gt;
&lt;li&gt;LO 1/2025 (mandatory ADR law)&lt;/li&gt;
&lt;li&gt;Regional mediation regulations&lt;/li&gt;
&lt;li&gt;CGPJ case law database&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AI-Assisted Proposals
&lt;/h3&gt;

&lt;p&gt;The AI generates resolution proposals that consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legal precedent for similar cases&lt;/li&gt;
&lt;li&gt;Both parties' stated interests&lt;/li&gt;
&lt;li&gt;Fair distribution principles&lt;/li&gt;
&lt;li&gt;Enforceability of the agreement&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Django 5 + DRF + Channels (WebSocket for real-time mediation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; PostgreSQL 16 with pgvector for embeddings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task Queue:&lt;/strong&gt; Celery + Redis for async LLM calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Remix 2 + React 18&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video:&lt;/strong&gt; Daily.co for live mediation sessions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signatures:&lt;/strong&gt; eIDAS-compliant electronic signatures&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AI resolves ~70% of simple disputes without human mediator involvement&lt;/li&gt;
&lt;li&gt;Average case resolution: under 72 hours (vs 14.3 months for courts)&lt;/li&gt;
&lt;li&gt;Cost: from 9 EUR (vs 3,000-10,000 EUR for litigation)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Voice-based mediation using real-time speech-to-text&lt;/li&gt;
&lt;li&gt;Predictive analytics for case outcomes&lt;/li&gt;
&lt;li&gt;Multi-language support (Catalan, Basque, Galician)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Acuerdio is Spain's first AI-powered mediation platform. Try it at acuerdio.com&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>legaltech</category>
      <category>python</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
