Multi-agent systems · Live application

Tarka Sabha

A multi-agent debate platform with configurable personas, provider routing, encrypted keys, and inspectable speaker state.

Problem

Multi-agent conversations need more structure than a loop of prompts: personas, providers, credentials, speaker selection, history, and failure states must remain separable.

System

A Next.js application stores auth-backed debate state in PostgreSQL while a server-side adapter normalizes model providers and an orchestrator selects sequential or mentioned speakers.

Proof

  • Runs as a public web application with a public source repository.
  • Models providers, personas, chats, messages, and rate limits as separate persisted concepts.
  • Encrypts provider keys at rest and keeps model calls server-side.
  • Uses deterministic round-robin selection with mention-aware priority.

Architecture

  1. ComposeDefine a topic and select persona participants.
  2. SelectChoose the next speaker from deterministic and mention-aware state.
  3. RouteBuild a provider-specific request behind a shared server boundary.
  4. PersistStore the response and advance inspectable debate state.

Decisions

  • Separate provider APIs from the product workflow behind one adapter boundary.
  • Favor deterministic speaker selection for debuggability.
  • Persist conversation and rate-limit state instead of relying on browser memory.

Tradeoffs and limitations

  • Supporting many providers increases validation and failure-mode complexity.
  • Output quality still depends on persona design, topic framing, and context limits.

Technologies

  • Next.js
  • TypeScript
  • PostgreSQL
  • Prisma
  • NextAuth
  • LLM APIs