Quickstart

Reflex Layer checks what your phone agent is about to say before it reaches text-to-speech. You send the caller's words and the agent's draft reply, and you get back a decision (pass, review or block), the line to say, and the caller signals for that turn.

This guide takes about ten minutes.

1. Create an agent

  1. Sign up at /app/#signup and confirm your email from the link we send. The Free plan includes 1,000 checks a month, with no card needed.
  2. Go to Rules in the sidebar, then New agent, and pick the starter pack closest to the business: dental or medical office, home services, real estate, or insurance agency.
  3. Open the Business info tab and enter the real business name, prices, opening hours and facts. The price and hours rules check against these exactly, so they need to be right.
  4. Open Try it and paste a caller line and a draft reply. You'll see the decision, every rule's score, and the signals. Try it uses your saved rules, so save edits first.

Copy the agent id (it starts with agt_) from the agent page.

2. Create an API key

Go to Connect in the sidebar and create a key. It starts with rl_live_ and is shown once. Keep it on your server. Never put it in a browser, a mobile app, or a client-side script.

3. Check a turn

curl -s https://YOUR-REFLEX-HOST/v1/check \
  -H "authorization: Bearer $REFLEX_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "agentId": "agt_...",
    "callId": "call-123",
    "turnIndex": 3,
    "callerText": "I was charged twice, can you just refund one?",
    "draftReply": "Of course, I have refunded the extra $129 for you."
  }'

The response looks like this (shortened):

{
  "turnId": "turn_...",
  "decision": "block",
  "say": "I'm not able to approve refunds myself, but I'll have the office manager call you back today.",
  "fallbackUsed": true,
  "fired": [
    { "ruleId": "refund_discount_promise", "title": "Promises a refund or discount", "severity": "block", "band": "fire", "probability": 0.97, "source": "jev" }
  ],
  "signals": {
    "intent": { "id": "billing", "confidence": 0.93 },
    "handoff": { "probability": 0.71, "recommended": true },
    "sentiment": { "score": 1.6, "label": "upset" },
    "endOfTurn": { "probability": 0.95, "complete": true }
  },
  "latencyMs": { "total": 71.4, "jev": 70.9 },
  "degraded": null
}

4. Use the result

If signals.handoff.recommended is true, offer a transfer to a person.

5. Plug it into your platform

See Integrations for Pipecat, LiveKit Agents, Vapi, and generic webhooks. For every field, see the API reference. To write your own rules, see Rule format.

Before you go live