Skip to content
Driss Costa
← All projects

2026 / AI

Tonalia

Year
2026
Field
AI
Stack
Python / LiveKit Agents / Pydantic / Gradium TTS / ai-coustics / pytest / Next.js 16 / React 19 / TypeScript / Supabase / React Flow / LiveKit / Tailwind CSS 4

Tonalia answers the phone in place of the front desk: appointment booking, reservations, takeaway orders, practical information and messages. The platform serves eight trades, from medicine to banking, including restaurants and hotels. It is made of three parts: a Python voice agent, a Studio where each business configures its assistant, and a console for the platform team.

01

The voice agent

The agent picks up, identifies the business from the dialed number, loads the flow published in the Studio and runs the conversation. The flow is JSON data: the agent interprets it, and no business sentence or rule is hard-coded. Triage routes the caller to specialized agents: appointments, takeaway orders, multi-night hotel stays, cancellation or rescheduling, data collection. The main challenge is latency and naturalness: tunable preemptive generation, end-of-turn detection that adapts to each caller's pauses, noise reduction, and a pronunciation lexicon for prices, dates and hours. Sensitive data is protected: a dictated card number or IBAN is detected, the caller is stopped and the value is masked in the log. Each call is streamed live to the Studio log, and the flow schema is kept identical on both sides (pydantic and zod).

  • 01.1Five specialized agents behind triage: appointments, orders, stays, procedures and data.
  • 01.2Over 770 pytest test functions across 43 files.
  • 01.3Eight scenario suites for LiveKit call simulations, including difficult situations and audio.

Python / LiveKit Agents / Pydantic / Gradium TTS / ai-coustics / pytest

02

The Studio

The Studio is the business's tool: it draws its assistant's flow, sets its voice and pace, manages its schedule and follows its calls. The flow is edited as a graph of nodes (greeting, departments, intents, practical information), with draft, publishing and version comparison. Each trade sets its resources, fields, vocabulary and starting flow at creation, from templates that can be reapplied section by section with a diff preview. The manager can call the assistant from the browser over WebRTC, and review each call with its transcript, tags and automatic review. An automatic repairer analyzes failed calls and proposes fixes. Access goes through custom roles and groups of businesses, on Supabase with row level security.

  • 02.1Eight trades: medicine, dental, restaurant, hair salon, real estate, hotel, garage and bank.
  • 02.238 SQL migrations and about 1,300 tests across 176 files.
  • 02.314 API route families for the agent: flow, calls, slots, appointments, stays, orders, records.

Next.js 16 / React 19 / TypeScript / Supabase / React Flow / LiveKit

03

The Administrator console

Administrator is the Tonalia team's console, kept apart from the Studio so that client needs and platform needs do not mix. It brings together businesses, accounts, roles and groups, calls across the platform with live listening and call takeover, estimated costs, thirty-day curves and a single log. A guided setup reads a new business's website, extracts a fact sheet with a small language model, then runs an interview that produces a complete flow to review before publishing. A commercial view computes what each business consumes, what it would be billed under its plan, and the margin. It shares the Studio's Supabase database: shared code is copied rather than published as a package, and a script checks that the copies do not drift.

  • 03.1163 files copied from the Studio, checked by a script that flags any drift.
  • 03.2Guided setup reads the home page and at most four pages of the website, honoring robots.txt.
  • 03.3About 470 tests and around thirty pages: calls, costs, commercial, accounts, roles, settings.

Next.js 16 / React 19 / TypeScript / Supabase / LiveKit / Tailwind CSS 4

Next project

Ariane