Parley

An AI conversation coach inside SignedDocsRepublic, open to the public with no login, so the guardrails are the feature.

Type
AI feature inside SignedDocsRepublic
Industry
AI product feature
Platform
Web (no login)
Role
Design, build, deploy
Parley AI conversation coach chat view

What made this hard.

Parley (first shipped as Skillforge) is an AI feature inside SignedDocsRepublic, not a separate product. Pick a scenario (asking for a raise, giving hard feedback, pushing back, saying no), learn the technique, then role-play it against an AI that plays the other person convincingly. At the end it returns a structured debrief on what landed and what to try next.

A conversation-practice tool is easy to imagine and hard to ship responsibly. The model has to stay in character as a realistic, slightly resistant counterpart instead of collapsing into a helpful assistant that agrees with everything.

Replies have to stream, or a live conversation feels like waiting on a page load. And because it is open to the public with no login gate, it had to be safe to run at scale from day one: bounded in cost, resistant to abuse, and impossible to turn into someone else's free LLM proxy.

What we built.

  • Built the coach as a vanilla ESM front-end module against a Laravel controller and a service trio (coach service, model client, scenario repository) with server-sent-events streaming end to end through a backend proxy, so no model credentials ever reach the browser.
  • Designed the prompting in two phases: hold the model in role as the counterpart during the conversation, then switch to an evaluator to produce the structured debrief.
  • Made the scenario catalogue fully data-driven. Sections and scenarios are data, each with its own briefing, coaching notes and lesson stepper, so expanding from one workplace category to several life-skill categories needed no front-end change.
  • Treated guardrails as first-class: per-hour message limits, per-day session limits, per-turn input-token caps, a per-user spend tripwire, a daily budget report, and separate spend and error logs.
  • Kept a provider-agnostic model layer, so the underlying LLM can be swapped without touching the coaching logic.
  • Designed persistence for privacy: conversation messages auto-purge on a schedule via a dedicated command, while the structured debriefs are retained.
  • Let visitors start without signing up through guest-provisioning middleware, with the guest row explicitly marked and tested as intended behaviour rather than an auth hole.

What it runs on.

Chosen to be maintainable for years, not to win an argument on the internet.

  • PHP 8
  • Laravel 12
  • Server-Sent Events
  • Vanilla ESM
  • LLM API
  • MySQL
  • Nginx

Where it landed.

A notable bug worth remembering: per-delta trimming while stripping the model's reasoning blocks was eating word-boundary spaces mid-stream. The fix strips without trimming on the server and keeps a cross-delta handler on the client.

The result turns a document-signing site into something people have a reason to return to: a private place to rehearse the conversations they would rather avoid. The guardrails are what let it stay open to the public instead of becoming a liability.

Need something in this territory? This is AI agent & LLM development work. Start from all services or see pricing.

Your project

Tell us what you're building. We reply within two business days.

Hour Blocks from $180reply within two business days Start a project