Documentation
Rylvo API reference
One endpoint runs a full bot turn — prompts, guardrails, tools and knowledge-base retrieval — on your own LLM key. Everything else here is how to build, test and release the bot behind it.
Quick Start
Make your first API call in under a minute. You need a botId and an API key from the dashboard. API keys are included from the Lite plan; Free and Starter workspaces have none, and put a bot on a website with the widget or share it with a Beam link instead.
curl -X POST https://rylvo.com/api/v1/bot-run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"botId": "your_bot_id",
"sessionId": "session_001",
"message": "I cannot access my account."
}'Access Model
Rylvo exposes three surfaces. Knowing which one to use for what avoids confusion when integrating a backend, connecting an AI editor, or operating the platform day-to-day.
Path convention: Firestore document paths in this reference write {envRoot} as shorthand for the workspace-environment root — the environments/{environment} subtree under organizations/{orgId} — where {environment} is production or test. Environment-owned collections exist independently per environment — the same logical ID in Test and Production refers to two different documents. Workspace-wide data (members, billing, audit log) stays directly under organizations/{orgId}.
Public REST
Backend runtime
Call from your backend with your org API key (Authorization: Bearer rylv_…). This is the runtime surface you ship in production. All of it is listed under Endpoints.
POST /api/v1/bot-run(scope: respond)/api/v1/kb/*(kb:read, kb:write)/api/v1/sessions,/state,/memoryPOST /api/v1/tests/gate(tests:read, Enterprise)
MCP / AI editor
External AI tools
Connect Claude Code, Cursor, Windsurf, Zed, or Codex directly to Rylvo. OAuth 2.1 + PKCE, org-scoped tokens.
POST /mcp(Streamable HTTP)/oauth/*registration + token exchange- 187 tools for bots, prompts, KB, skills, connectors
- OpenAPI 3.1 spec of the public REST API at
/openapi.json
Dashboard
Configuration & ops
Manage from rylvo.com/dashboard. Many features are also reachable through the MCP / AI Editor surface.
- Bots, Prompts, Guardrails, Knowledge Base
- Workspace Architect, Bot Chat, Bot Tests
- Edge Cases, Red Team, Automation, Reports
- Mission Control, Agent Evolution, Skills, MCP Hub
- Billing, Team, API Keys, Build Intelligence
Sections below marked Dashboard-only have no dedicated public REST endpoint. They work in the dashboard and through the MCP / AI Editor surface, and their behavior affects the /api/v1/bot-run runtime.
Environments & Releases
Every workspace has two environments: Test and Production. You build and experiment in Test, then promote a frozen, versioned release to Production. Configuration, data, analytics, traces, and API keys are isolated per environment — the same logical ID in Test and Production refers to two different documents (see Access Model for the {envRoot} path convention). There is a dedicated Environments & Releases overview if you want the product tour.
Editable
Test
A fully editable copy of your workspace. Iterate on bots, prompts, guardrails, flows, skills, knowledge, and connectors against real models. Test traffic never touches Production configuration or data.
Read-only
Production
What your customers reach. Promotable configuration is read-only — it only changes when you activate a release or roll one back. An org that has never promoted keeps serving its legacy configuration until the first release is activated.
The release lifecycle
- Freeze a candidate — snapshot the current Test configuration into an immutable release candidate (a versioned manifest of artifacts). Test stays editable.
- Review the diff & gates — see what changed versus live Production (added / changed / removed / unchanged, grouped by artifact family). Optional gates: two-person approval (the creator cannot approve their own manifest) and a green test run.
- Activate Production — the active pointer flips atomically, but only after every artifact in the manifest is verified. The environment generation increments by one.
- Roll back if needed — every activated release is immutable and retained. Point Production back to any earlier release and runtime traffic switches immediately.
You can also refresh Test from the active Production release (safe mode preserves divergent Test edits) or reset Test entirely. Every destructive operation is checkpointed first. Managing releases (freeze, activate, rollback) requires an admin or owner role.
Selecting an environment over the API
The API key picks the environment. Every key belongs to the environment the dashboard was in when the key was created: a Test key answers from Test's configuration and writes Test's data, a Production key does the same for Production. No header switches it, so a Test key can never reach Production data. Point your CI at a Test key and your site at a Production key.
# A key created while the dashboard is in Test
curl -X POST https://rylvo.com/api/v1/bot-run \
-H "Authorization: Bearer $RYLVO_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{"botId": "…", "message": "hello"}'See Authentication and API Keys for how keys are scoped.
Test-data watermarking
Data exported from Test is watermarked so a Test dataset is never mistaken for genuine customer records downstream. Production exports carry no watermark; Test exports always do, and the environment provenance travels with the data after it leaves Rylvo.
Authentication
Every /api/v1 request carries an org API key. Send it as Authorization: Bearer <key>; X-API-Key and X-Rylvo-Key are accepted too. Create keys in Dashboard → API Keys. API keys come with Lite and up; Free and Starter workspaces have none.
Authorization: Bearer rylv_abc123...- Format
rylv_followed by 40 hex characters- Permissions
- Each key carries scopes: respond, kb:read, kb:write, sessions:read, sessions:write, state:read, state:write, memory:read, memory:write, tests:read. A call without the scope its route needs is a 403.
- Environment
- A key belongs to Test or Production, and only ever reaches that environment.
- Bot binding
- A key can be bound to one bot; it is then refused for every other bot (403 key_scope_mismatch).
- Rate limit
- A per-key override replaces the default calls per minute. See Rate Limits.
Security. Never expose API keys in client-side code. Call the API from your backend. The website widget uses its own public site token, which can only run its one bot.
BotsDashboard-only
Every agent in your workspace is built, configured, and shipped from Dashboard → Bots. The sidebar lists agent groups first and standalone bots after, each showing the model it runs on and whether it is live.
New Bot — from scratch
- Name, generated avatar, and a description of what the agent is for
- Model, chosen once from every provider you hold a key for (see BYOK below)
- Image and audio input toggles
- How many recent messages the bot rereads each turn
- Optionally drop the new agent straight into a group
From a template
- Catalog of validated blueprints, searchable and filterable by category
- Single-agent bots first, multi-agent pipelines after
- Choosing one opens a customize step — nothing is created until you finish it
- What you get is a fully editable bot, not a locked preset
A bot is only reachable over the API once it is live and it has an AI key for its model: your plan's included replies, or a provider key you hold. Group several bots together so they can hand work to one another — see Agent Groups.
Provider Keys (BYOK)Dashboard-only
Every bot chat on Rylvo runs on an AI key the workspace holds: the AI replies included with every paid plan on a Rylvo-managed OpenRouter key, or your own LLM provider key if you add one. Your own key is optional; while one is in use your agents run on your own provider account and your included replies pause. Rylvo routes the call server-side and logs a full trace for observability. Manage keys in Settings → LLM Provider Keys.
Included AI replies
- Every paid plan includes AI replies each billing cycle: about 650 on Starter, 1,300 on Lite and 2,650 on Pro and Enterprise ($1 / $2 / $4 of AI on the default model). Unused replies do not carry over. Free includes no AI after the trial.
- Replies are counted on the default model; a stronger model uses more of them, and the model picker says how many.
- Extra replies: 1,000 for $5, a one-time reply pack bought on the Billing page. Pack replies stay while you are subscribed. Packs are not wallet money: the prepaid wallet still pays for nothing AI.
- Your own AI key is optional. Add one in Settings → LLM Providers and your agents run on your own provider account; your included replies pause until you remove it. Your included replies are never lost while a key of yours is in use.
- When a workspace runs out of replies the agent is not silent: it tells the visitor you will get back to them, takes their details and e-mails you the lead, until you buy more replies, upgrade or add your own key.
- The owner is e-mailed once per cycle when 20% of the replies are left, and again when they run out.
- The included replies run on Rylvo's OpenRouter account: while they are in use, prompts and content go to OpenRouter and the model provider it routes to under Rylvo's account. On your own key they go to your provider under your account.
Bot Chat, Group Chat, Bot Tests
Spend the plan's included AI replies, or route to the customer's own provider key: either the matching direct-provider key (e.g. Anthropic for anthropic/* models) or an OpenRouter universal key. With no replies left and no key of your own the UI names the way forward (buy a reply pack, upgrade, or add a key). New workspaces start with a trial key carrying about 1,300 AI replies (once the email is verified), so they can chat before choosing a plan; a paid plan funds the same key.
Workspace Architect
Runs on your plan's included AI replies, or on your own provider key, like everything else. During the Pro trial it runs on the AI replies the trial includes (about 1,300 AI replies), so you can build before choosing a plan. The bots it creates answer with the same included replies once you are on a paid plan, or with your own key.
Key resolution order
- Auto (default) - the model's native provider key when added (direct to e.g.
api.anthropic.com), otherwise your OpenRouter key. - Always OpenRouter - every chat runs on your OpenRouter key, even when a direct key exists.
- Native keys only - OpenRouter is never used; models without a direct key are locked.
- Per-bot override available in the Bot Hub. When no key can serve a model, the chat UI names exactly which key(s) would unlock it.
Supported providers
- OpenRouter - universal, covers every model except Groq's and GLM 4.7 FlashX
- OpenAI -
openai/* - Anthropic -
anthropic/*(native Messages API adapter) - Google Gemini -
google/*(nativegenerateContentadapter) - DeepSeek -
deepseek/* - xAI (Grok) -
x-ai/* - Kimi / Qwen / GLM -
moonshotai/*,qwen/*,z-ai/*(older bots:kimi/*,zhipu/*); keys from either region work - Mistral -
mistralai/* - Groq -
groq/*(needs its own key; not on OpenRouter) - MiniMax, Meta, Cohere, NVIDIA, Xiaomi, ByteDance, Tencent, StepFun, Inception, Upstage, IBM - OpenRouter key only
- The full model list, with prices and the key each runs on, is in the dashboard model picker (Bots → Edit → Model).
Access & security
- Write/delete restricted to org admins.
- Read allowed for all org members so operators can chat with bots.
- Keys never leave Firestore + the route handler - never exposed to page HTML.
- Key rotation automatically resets verification state.
Verified when saved
Every key is checked with its provider before it is stored - a 16-token ping (< $0.001). A key the provider rejects is never saved, and the page shows exactly what the provider answered. Use Test to re-check a saved key any time and Test all to re-verify every key at once.
Bot Tagging (Mandatory)
Required: Every runtime request must include a botId (or a groupId for an agent group). Requests with neither are rejected with a 400 error.
Bots are the primary organizational unit for your API usage. Each bot represents a distinct agent or use case (e.g. "Support Triage Bot", "Sales Qualifier Bot"). Create bots from your dashboard, then use the bot ID to tag every API call.
How it works
Create a bot
Go to Dashboard → Bots → New Bot. Give it a name and description.
Copy the bot ID
Each bot gets a unique ID. Copy it from the bot card.
Tag every API request
Include "botId": "your_bot_id" in the request body.
View per-bot analytics
Filter traces, analytics, and billing by bot.
Example request with botId
{
"botId": "bot_abc123def456",
"sessionId": "sess_001",
"message": "I can't access my account."
}Benefits of bot tagging
Per-bot analytics
View metrics, latency, and error rates per bot
Trace grouping
Filter and search traces by bot name
Key association
Link API keys to specific bots
Access control
Manage permissions per bot
Bot Chat PlaygroundDashboard-only
Test a bot's behavior end-to-end before pointing production traffic at it. The playground at /dashboard/bots/[botId]/chat assembles the full runtime exactly like /api/v1/bot-run does: system prompts, placeholders, guardrails, connectors, KB connections, and evolution rules.
Every turn captures
- Active prompt IDs + resolved placeholders
- Guardrails evaluated (and which triggered)
- Connectors invoked + request/response bodies
- Evolution rules injected into the system prompt
- Active flow step + transitions evaluated (if a flow is attached)
- Token usage + cost (on your included replies or your own key)
Good for
- Reproducing a failure from a trace replay
- Iterating on a prompt before promoting to active
- Verifying a new guardrail actually fires
- Comparing two bots side-by-side (
/dashboard/bots/[botId]/compare)
Each playground turn shows the prompt stack, guardrail decisions, connector calls, evolution rules applied, the active flow step (if a flow is attached), operator whispers, token usage, and cost - all alongside the message itself.
Bot TestsDashboard-only
Define reusable test cases per bot and run them on demand or via an Automation schedule. Manage at /dashboard/bots/[botId]/tests.
A test case specifies
- Input message (single-turn) or a scripted multi-turn conversation
- Expected output text / behaviour
- Guardrails that should or must not trigger
- Checks on the replies: words they must or must never use, a pattern, JSON of a given shape, a number within a margin, wording close to a reference answer
- Checks on what the bot did: the tools it called (or must never call, or in what order), whether it used the knowledge base, how fast every reply came, what the conversation cost
- Optional pre-populated
structured_state - Photos a customer message sends (up to 3, 4 MB each) — read the way a customer's photo is
- Tracked details the bot must have saved, and the flow step the conversation must end on
A test run produces
- Pass/fail per case with diff against expectations
- Token usage & cost for the whole run
- Full trace links for every case (for debugging)
- A summary you can attach to a report or alert channel
How a test is scored is yours. Tests → Scoring sets the pass mark (70 unless you change it), stricter bars for a priority or kind of test, what the AI judge scores and how much each part counts — for every bot, or for one. Test re-scores the bot's last run before you save, and every run records the scoring it was judged under, so runs scored differently are never compared as if nothing changed. Every plan can see it; changing it is Pro, for admins and owners.
Checks are hard rules. Each one fails the test on its own, whatever the AI judge scores, and a check with nothing to read — a reply time that wasn't recorded, a bot with no knowledge base — fails and says so instead of passing quietly. Similarity compares wording, not meaning: use it where an exact phrase is wrong to demand but the answer should read much the same.
A photo flow can be tested. On a customer message, Add a photo attaches up to three (4 MB each; JPEG, PNG, WebP or GIF, judged by the file itself). The run puts each one through the same reading a customer's photo gets — your bot's own reading profiles and models, counted as media units (a photo already read with the same profile is served from the cache and costs nothing). Then say what must be true: the tracked details the bot must have saved (an exact value, or just “saved” — a sensitive detail can only be checked for being saved) and the flow step the conversation must end on. Both are hard rules, so they fail the test whatever the judge scores, and they count in a test set and in the release gate like any other test. A test run never saves anything: it sees what the bot would save with each message and checks the last value it saw, so a detail set on one message is empty on the next. Test also blocks calls to your own systems, so a flow's call step takes its “couldn't check this right now” path in a test — write the test for that path; the real call is proved in Production. A photo the bot was never given (images switched off, a failed security check) fails its own rule by name, so a test never passes without having looked at its photo.
A failure becomes a test. On an edge case, or any reply in Traces, "Add as test" opens the test editor already filled in: the customer's messages up to where it went wrong, what should have happened, and a check that keeps it from passing again. Save it and the same bug can't ship twice — the edge case lists the tests made from it, and runs them.
Test sets keep a suite fixed. Save the tests that matter — say, the ones that must pass before a release — as a named set. Each version freezes a copy of every test in it, so "the release suite, version 3" runs the same conversations against the same expectations in March and in December, however the tests are edited since. Each version marks which of its tests have changed or been deleted since, and every run says which version it ran.
Tests travel as files. Download a bot's tests, or one version of a set, as CSV (one test per row, for a spreadsheet), JSON Lines or JSON — and import any of them back. An import is checked before anything is added, and a file that can't be read says which row and why.
How far to trust the judge (Enterprise). Reviewers give their own verdict on judged results — pass, partial or fail, and a score for any part if they like. Tests → Scoring then shows how often the AI judge agrees with them (with Cohen's kappa, so agreement by chance doesn't count), whether it is more often too generous or too strict, and which part it scores furthest from your reviewers. Testing a scoring change says whether the judge would agree with them more, and a pinned baseline judge flags any run judged differently — its scores don't compare with the trend.
A release waits until the tests pass. Switched on in Tests → Release gate, a release to Production waits until every bot in it clears the gate on a run against that exact release, and Review & release names the tests that didn't pass, each a link to its result. Unless you change it, a run clears the gate when none of its tests fail and at least one passes. On Enterprise you decide what passing means — a pass rate, every critical test, a run of a named test set, the judge's agreement with your reviewers — and your own CI pipeline asks the same gate with POST /api/v1/tests/gate and an API key with the tests:read scope, failing the deploy unless it says passing.
Failed test cases can be converted into Edge Cases so the engine tracks them through the detect → classify → fix → verify loop.
Agent Groups (Multi-Bot Teams)Dashboard-only
Compose multiple bots into a team where one bot routes, delegates, and merges results from specialists. Useful for workflows that span domains (e.g. billing + technical support) or require parallel drafts.
Group modes
- Router - one bot picks the best specialist per turn
- Sequential - bots run in a fixed pipeline
- Parallel - bots run simultaneously, a merger summarises
- Round-robin - alternates bots across turns
Each member contributes
- Its own prompts, guardrails, connectors, KB scope
- An attached role/persona (e.g.
billing_specialist) - Its own trace - the group trace links all of them
Group chats record which member bots contributed to each turn and how routing decisions were made, so you can debug who said what and why.
Typed decisions in groups: a router whose rules read only the intent (no other facts, no pass_fields) is dispatched by TypeSafe Jev; other routers keep the LLM classifier. A fan-out with the vote merge has Jev pick the best branch, and that branch's reply is returned exactly as written — previously an LLM re-typed it. Both fall back to the LLM path if Jev cannot answer.
Endpoints
Every endpoint takes an org API key and lives under https://rylvo.com. The limit is the default calls per minute for one key.
- POST
/api/v1/bot-run - Run one bot or agent-group turn
- Scope
respond - Limit60/min
- POST
/api/v1/kb/query - Query a knowledge-base connection
- Scope
kb:read - Limit60/min
- POST
/api/v1/kb/documents - Upload documents to a KB source (up to 100 per request)
- Scope
kb:write - Limit20/min
- DELETE
/api/v1/kb/documents?documentId=… - Remove one KB document
- Scope
kb:write - Limit20/min
- GET
/api/v1/sessions - List a bot's conversations
- Scope
sessions:read - Limit60/min
- GET
/api/v1/sessions/{sessionId} - Read one conversation with its transcript
- Scope
sessions:read - Limit60/min
- POST
/api/v1/sessions/{sessionId}/end - End a conversation
- Scope
sessions:write - Limit60/min
- POST
/api/v1/sessions/{sessionId}/fork - Start a new conversation from an old one
- Scope
sessions:write - Limit60/min
- GET · PATCH · DELETE
/api/v1/state/{botId}/… - Read and change tracked details
- Scope
state:read / state:write - Limit120/min
- GET · POST · PATCH · DELETE
/api/v1/memory/{botId}/… - Read, add, search and forget long-term memory
- Scope
memory:read / memory:write - Limit60/min
- POST
/api/v1/tests/gate - Does a bot's test run clear the release gate? For CI (Enterprise)
- Scope
tests:read - Limit30/min
The full machine-readable contract is at /openapi.json (OpenAPI 3.1). The model catalog, traces, analytics, and connector CRUD are managed from the dashboard and the MCP / AI Editor surface; they are not public REST endpoints today.
Runtime (Bot Turn)
POST /api/v1/bot-run is the core of Rylvo. Send a message (plus optional session + history) and the engine runs one full agentic turn, returning the assistant reply with full telemetry. It runs on your plan's included AI replies, or on your own key.
- Prompt assembly
- Bot prompts + skills
- Guardrails
- Block / rewrite / escalate
- Tools & connectors
- Live tool calls
- KB retrieval
- Grounded answers
Request Format
{
"botId": "bot_abc123def456",
"sessionId": "sess_001",
"message": "The display shows error E42.",
"conversationHistory": [
{ "role": "user", "content": "Hi, my device won't start." },
{ "role": "assistant", "content": "I can help. What does the screen show?" }
],
"endUserExternalId": "user_8842",
"endUserDisplayName": "Jordan Lee",
"channel": "api"
}Required Fields
| Field | Type | Description |
|---|---|---|
| botId | string | Bot identifier (from Dashboard → Bots). Either botId or groupId is required. |
| message | string | The end user's current message |
Optional Fields
| Field | Type | Description |
|---|---|---|
| groupId | string | Agent-group id (run a multi-bot team instead of a single bot) |
| conversationHistory | object[] | Prior turns: { role: 'user' | 'assistant', content } |
| sessionId | string | Conversation id. A hint: reused while it matches the live session, but the server may start a fresh one (after a reset or idle expiry), so always send back the sessionId of the last response. Server-side sessions need endUserExternalId; without it nothing is stored and you send conversationHistory yourself. |
| attachments | object[] | Photos, voice notes and documents: [{ kind, mimeType, dataBase64 }], at most 10 per turn. See Image & Voice Intake. |
| endUserExternalId | string | Stable end-user id in your namespace (≤256). Required for display name / email. |
| endUserDisplayName | string | Human-readable name shown in Traces (≤200) |
| endUserEmail | string | End-user email for support handoff (validated) |
| known_facts | object[] | What you already know about the person: [{ key, value }], at most 20. key is a Data Collection field key of the bot (lower case, ≤64, sent once); value is text ≤1000. Used only so the bot doesn't ask again; never saved; it must be a valid answer to that field. A malformed list is a 400. |
| channel | string | api (default) | widget | unknown. Any other value, including whatsapp or slack, is a 400: deployed channels set their own identity. |
| context | object | Run context: facts your app sends with this message (≤16 KB), checked against the bot's context schema (422 when it does not match) and available as {{context.key}} in prompts. Never stored. |
| endUserAccessGroups | string[] | Access groups your system asserts for this person; KB sources limited to groups answer only for them. |
| model | string | Override model (e.g. openai/gpt-4.1-mini, anthropic/claude-sonnet-4.6) |
| maxTokens | number | Max output tokens for this turn |
| temperature | number | Sampling temperature for this turn |
| disableTools | boolean | Disable tool/connector calls for this turn |
| maxToolIterations | number | Cap the tool-call loop iterations |
| responseFormat | object | Structured output: {type:"json_object"} or {type:"json_schema", json_schema:{...}} — constrains the final reply (OpenAI-compatible models only) |
| stream | boolean | Token streaming via Server-Sent Events: token events as the reply generates, then a final result event with the standard JSON body (single-bot only) |
Optional header Idempotency-Key: <uuid> — re-sending the same key for the same API key replays the stored response (no double-billing / re-running tools).
Response Format
{
"response": "I've logged error E42. Let me pull up the matching fix steps.",
"conversationId": "sess_001",
"sessionId": "sess_001",
"sessionNew": false,
"runId": "run_8f3a21c9",
"model": "openai/gpt-4.1-mini",
"latencyMs": 1840,
"tokens": { "prompt": 1203, "completion": 88, "total": 1291 },
"guardrails": {
"inputBlocked": false,
"outputBlocked": false,
"outputRewritten": false,
"blockedBy": null,
"escalated": false,
"escalatedBy": null
},
"toolCalls": [],
"augmentation": { "rulesApplied": 0, "skillsMatched": 1, "episodicRecallCount": 0, "userModelApplied": false },
"sessionEnd": null,
"kb": null,
"pendingApproval": null
}Key Response Fields
| Field | Description |
|---|---|
| response | The assistant's reply text to show the user |
| runId | Unique id for this turn — find it in Dashboard → Traces |
| conversationId | The session this turn ran under (empty when it ran without one) |
| sessionId | The id to send on your next turn: yours when continued, a fresh one when the server started a new session, null when there is none |
| sessionNew | true when this turn began a new session |
| model | The model that actually served the turn |
| latencyMs | Server-side turn latency (ms) |
| tokens | { prompt, completion, total } token counts |
| guardrails | { inputBlocked, outputBlocked, outputRewritten, blockedBy, escalated, escalatedBy } — inputBlocked = the message was refused before the model ran; outputBlocked = the reply was blocked after it was generated |
| toolCalls | Tools called this turn: { toolName, ok, disposition, … }. Not sent to widget traffic |
| collectionState | Data-collection state after this turn: { attemptedWrites, persistedWrites, missingRequiredIds, complete, … } |
| state / memory | Tracked details and long-term memory, only for a key with state:read or memory:read |
| sessionEnd | Set when the bot ended the session ({ reason, summary? }) |
| kb | KB grounding telemetry incl. citations (when retrieval ran) |
| pendingApproval | Present when a tool call awaits operator approval |
Flows
Flows are an optional guided/strict conversation graph attached to a bot (bot.flowId) or an agent group (dashboard/MCP-managed) that shapes its runtime behaviour — they are not part of the /api/v1/bot-run request or response. A flow is a set of steps: the engine keeps a per-session pointer to the current step, injects that step's goal into the system prompt, scopes its tools, and advances when a transition fires.
A step carries
goalInjected into the system prompt as this step's instructioncollectInformation to ask for before moving on — the flow keeps what the bot can't saveallowed_toolsStrict: the only tools offered. Guided: named to the bot as guidancetransitionsEdges to the next step, evaluated every turnTransition kinds
alwaysFires unconditionallydata_completeAll of the step's collect fields are gatheredintentThe classified intent matchesconditionAn expression over the fields (null until given), tracked details as state.<key>, and turn_count / step_turns is truetool_resultA named tool ran successfully this turnHow intent is classified: when a step has intent transitions, TypeSafe Jev picks one of that step's intents. A transition is taken only when Jev is at least 50% sure; otherwise the flow stays on its step. If Jev cannot answer, the previous LLM classifier on the bot's model decides.
Bot workflow stages (bot.workflowId, separate from flows): when the workflow defines two or more stages, the engine picks the current stage each turn from that workflow's own stage ids and scores the user's sentiment from -1 (furious) to 1 (delighted) in the same Jev request. sentiment < … conditions in the workflow's escalation rules now compare against that score; before, the engine used a constant 0.
Error Handling
Errors return a flat JSON body, { error, code }. Branch on code; the message is for people.
- 400
- invalid_json · invalid_request
- WhenMalformed JSON, missing message, missing botId/groupId, a bad field shape, or an unsupported channel.
- 401
- missing_api_key · …
- WhenMissing or invalid API key.
- 403
- insufficient_scope · key_scope_mismatch · org_suspended
- WhenThe key lacks the scope, is bound to a different bot, or the org is suspended.
- 404
- bot_not_found · group_not_found
- WhenNo such bot or agent group in this key's environment.
- 405
- method_not_allowed
- WhenWrong HTTP verb; the Allow header lists the right ones.
- 409
- bot_not_runnable
- WhenThe bot is a draft or archived. Activate it in Dashboard → Bots.
- 409
- conversation_busy
- WhenThe same conversation is still answering an earlier message. Retry after Retry-After.
- 422 · 424
- provider_key_unavailable
- WhenThe workspace's AI key (its included replies, or its own key) cannot answer: rejected, out of credit, included replies used up, or missing. reason says which; buy a reply pack or upgrade in Billing, or fix the key in Settings → LLM Providers.
- 429
- rate_limited
- WhenPer-key or per-address rate limit exceeded. Wait for Retry-After.
- 502 · 503
- engine_unreachable · engine_not_ready · feature_disabled
- WhenThe runtime engine could not be reached, is not configured, or is temporarily disabled.
Engine-side failures (e.g. a provider key that cannot answer) pass through the engine's status code with its own code / error.
// Error response format
{
"error": "One of `botId` or `groupId` is required.",
"code": "invalid_request"
}Multi-Turn Example
Keep a stable sessionId and pass the running transcript in conversationHistory so the bot has context.
Turn 1 - User reports issue
curl -X POST https://rylvo.com/api/v1/bot-run \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"botId":"bot_abc123","sessionId":"conv_001","message":"My subscription renewal failed."}'Turn 2 - User provides order number (include prior turns)
curl -X POST https://rylvo.com/api/v1/bot-run \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"botId":"bot_abc123","sessionId":"conv_001","message":"My order is ORD-98765-XYZ","conversationHistory":[{"role":"user","content":"My subscription renewal failed."},{"role":"assistant","content":"I can help — what is your order number?"}]}'Turn 3 - User wants escalation
curl -X POST https://rylvo.com/api/v1/bot-run \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"botId":"bot_abc123","sessionId":"conv_001","message":"I want to talk to a real person."}'Webhooks
/api/v1/bot-run is synchronous — the turn result is returned in the response. For async notifications (escalations, stage changes, verification failures, tool results), register an Event Connector (Dashboard → Connectors, or via the MCP surface). Rylvo POSTs each subscribed event to your endpoint with the auth method and HMAC signing secret you configure on the connector. Subscribable event types are listed under Connectors.
Rate Limits
Every public endpoint is rate-limited per API key, with its own bucket per route, so one endpoint cannot drain another's budget. A key's own limit (Dashboard → API Keys) replaces the default on every route. A per-address ceiling before authentication and a tighter one on failed authentications stop floods and key guessing; a working integration never reaches them.
- /api/v1/bot-run
- 60/min
- /api/v1/kb/query
- 60/min
- /api/v1/kb/documents (POST and DELETE)
- 20/min, each request can embed up to 100 documents
- /api/v1/sessions…
- 60/min
- /api/v1/state/…
- 120/min
- /api/v1/memory/…
- 60/min
- /api/v1/tests/gate
- 30/min
Bot chat launched from the dashboard and the platform AI features (Agent Evolution, Self-Improving Prompts, Red Team) spend your plan's included AI replies or run on your own key, and are not rate-limited by Rylvo; see pricing. Fair-use volume per plan:
| Plan | Monthly | Fair-use volume (with your own AI key) |
|---|---|---|
| Free | $0 | Fair use |
| Lite | $40 | Fair use |
| Pro | $100 | Fair use · guide ≈ 100K/mo |
| Enterprise | Custom | Set in your contract |
The AI replies a plan includes are the number that counts on the AI Rylvo provides; this volume matters when replies run on your own AI key. It is fair use: nothing meters or charges it per plan, and the figures above are guides, not limits.
Rate-limit headers on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After on 429.
Billing & Usage
Rylvo's billing model is simple: a monthly subscription plan covers platform capacity (bots, prompts, guardrails, KB sources, connectors, observability) and includes AI replies every billing cycle; your own LLM key is optional. Extra replies are sold as one-time reply packs.
Included AI replies · your own key optional
AI on every paid plan
About 650 AI replies a month on Starter, 1,300 on Lite and 2,650 on Pro, counted on the default model; extra replies are 1,000 for $5. Bot chat, Workspace Architect, Agent Evolution, Self-Improving Prompts, Edge Case Engine, Red Team and broadcasts spend the same replies, or run on your own provider key if you add one (your included replies pause until you remove it). Knowledge-base indexing is included up to your plan's allowance. During the Pro trial, about 1,300 AI replies are included on the same key (once your email is verified); a paid plan funds it from then on. Free has no AI after the trial.
Prepaid wallet (optional)
Conversation-storage overage
A prepaid USD wallet covers only conversation-storage overage beyond your plan's included pool and wallet-funded retention add-ons. Dodo charges plan subscriptions separately. Top up from $5 at Dashboard → Billing. AI features never draw from it; extra AI replies are reply packs, bought separately.
Subscription plans
| Plan | Price | Headline limits | Notes |
|---|---|---|---|
| Free | $0 | 1 bot · 7-day trace retention | No AI after the trial (the agent takes messages) unless you add your own AI key; bot replies are fair use |
| Lite | $40 | 3 bots · 14-day trace retention | About 1,300 AI replies a month included; solo builder toolkit; no Advanced AI suite or Broadcasts |
| Pro | $100 | 25 bots · 90-day trace retention | Advanced AI suite + Broadcasts |
| Enterprise | Custom | Negotiated | Custom DPA, security review, named contact (next business day, not an SLA) |
Advanced AI suite (Pro+): Agent Evolution, Self-Improving Prompts, Edge Case Engine, Red Team, Mission Control, Audit Log Export, Custom Policy Blocks. Broadcasts (Pro+): multi-channel outbound campaigns. Lite keeps Advanced Analytics, BYODB, Test Suites, MCP Hub, Webhooks, and Build Intelligence. Seats (Pro+): Pro includes your seat; each extra teammate is $40/seat/month ($32 on annual billing), up to 100 seats in all.
Trial, refunds and tax
- Trial. Every new workspace starts on Pro for 7 days (7 more the first time a customer talks to an agent) with about 1,300 AI replies (granted once your email is verified), no card. When it ends the workspace moves to Free (1 agent) unless you upgrade, and the AI usage included with the trial ends with it: pick a paid plan and your agent keeps answering with the replies it includes, or add your own provider key. With more than one agent you get 7 days to choose which one to keep (or to upgrade); after that the extras are paused, never deleted, and when you upgrade they switch back on if they all fit your new plan's agent limit (otherwise you choose which ones run). Demo agents you have not made your own are removed at trial end; one you changed, deployed or used with real people is yours to keep.
- Refunds. Email contact@rylvo.com within 14 days of your first payment on a paid plan (monthly or annual) and we refund it in full through Dodo Payments, once per customer, unless the account was suspended for violating the Terms. Renewals, seats, other add-ons and wallet top-ups bought later are non-refundable, except where the law requires or under Dodo Payments' buyer terms. Terms: Billing & Payment.
- Currency and tax. Prices are in USD. Dodo Payments is the merchant of record and India GST is added at checkout.
- Billing interval. Monthly or annual on Lite and Pro (annual is about 20% lower). Starter is monthly only.
Token cost (informational)
Bot turns spend your plan's included AI replies or run on your own provider key, so Rylvo does not bill per token: included replies are counted on the Rylvo-managed key, and on your own key you pay your LLM provider directly. Each turn still records its token cost on the trace for observability and per-bot budget tracking:
trace.cost_usd = (input_tokens × model.price_per_input_token)
+ (output_tokens × model.price_per_output_token)Response headers on /api/v1/bot-run
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | The key's per-minute request capacity |
| X-RateLimit-Remaining | Requests left in the current rate-limit window |
| X-RateLimit-Reset | Unix seconds when the window resets |
| Retry-After | Seconds to wait before retrying (on 429) |
| Idempotent-Replay | true when a stored idempotent response is replayed |
Subscription state Dashboard-only
The billing subscription is a singleton document in Firestore. State transitions are driven by provider webhooks plus an hourly lifecycle cron. Only the downgraded status turns paid features off. Legacy plan ids (starter is an old alias of Pro, plus growth and scale) are migrated at read-time; today's Starter plan has the id solo.
Plan gates
requireFeature— feature locked or downgradedrequireQuota— usage ≥ plan caprequireProviderKey— AI feature needs an AI key to run on: the plan's included replies or your own LLM keyrequireStorageEventsBudget— storage pool exhausted- Returns
PlanAccessErrorwithupgradeTarget
Durable outbox architecture
- API routes publish to a durable
billingOutboxbefore Pub/Sub - Cloud Function
billingOutboxWorkeris the only account writer - Atomic transactions with idempotency + negative clamp
- Daily
billingReconciliationruns ledger integrity checks - Port-based design: all billing code depends on abstract interfaces
Per-bot budget cap
Each bot can carry a monthly spend cap. The gate sums the bot's observed (BYOK) cost from the canonical observability store via sum_cost_by_bot and pauses the bot when the cap is exceeded. Set caps in the bot settings.
Top-up & ledger Dashboard-only
The prepaid wallet (conversation-storage overage + retention add-ons) tops up in any amount from $5 to $10,000 at Dashboard → Billing. Every debit and credit is recorded in an immutable transactions ledger you can review and export from the Billing page (per-bot breakdown, model breakdown, date range, CSV).
Bot turns never draw from the wallet — /api/v1/bot-run spends your plan's included AI replies or runs on your own key; it does not draw from the prepaid wallet or return 402 for balance. The wallet only covers conversation-storage overage and wallet-funded retention add-ons; extra AI replies are reply packs (1,000 for $5), a separate purchase, and Dodo charges the plan separately.
Traces & Analytics
Every decision is traced to a single canonical store — Postgres rylvo-obs (observability_traces → observations → scores). The legacy Firestore chatTraces dual-write was retired. You can replay any past turn, list every run in a session, and pull rollup analytics per company from the dashboard. The engine endpoints below back those views — they are internal (dashboard / MCP), not part of the public REST surface.
Internal endpoints (power the dashboard)
| Method | Path | Description |
|---|---|---|
| GET | /v1/traces/{trace_id}/replay | Full replay payload for one trace (prompt stack, guardrails, tool calls, per-stage timings) |
| GET | /v1/sessions/{session_id}/traces?limit=50 | List every run in a session, newest first |
| GET | /v1/analytics/companies/{company_id}/overview?limit=500&top_n=10 | Escalation rate, avg latency, and token/cost rollups over the window |
| GET | /v1/analytics/companies/{company_id}/runs?limit=100 | Recent individual runs for a company |
Write paths
- Engine:
make_observability_ingest_hook(live channels) - Playground / Architect: adapters →
POST /v1/observability/ingest - Rich operator context on
metadata.turn_context - Hierarchical observations: spans, generations, tools, guardrails, retriever, agent
Read paths
- Dashboard traces: canonical-backed projectors
- Analytics:
analytics-rowsPostgres aggregates - Billing:
sum_cost_by_bot(per-bot cap) - Audience / GDPR: canonical customer rows
Typed decisions (TypeSafe Jev)
Some decisions inside a turn only pick a label, so the engine asks them as typed questions of TypeSafe Jev (“System One” by TypeSafe AI) — a decisions-only model that picks one of N options, answers yes/no, or places text on an ordered scale, with a calibrated probability, and never writes text. Every site keeps its previous implementation as an automatic fallback when Jev cannot answer, and a circuit breaker makes that fallback immediate during an outage. Jev runs on Rylvo's own TypeSafe key, not your BYOK provider key; the fallback uses your key as before.
- Guardrails: custom-evaluation rules on the same text, in one request
- Flows: intent transitions; bot workflow stage + sentiment
- Agent Groups: intent-only router dispatch; fan-out
vote - Knowledge Base: Self-RAG relevance grading
- Mission Control: the conversation risk signal
Each Jev request is a generation observation on the trace — named like jev-guardrail-check, jev-workflow-stage, jev-kb-relevance, or jev-flow-intent — with model typesafe/jev-latest, tokens, cost, latency, and every question with its answer and probability. It is priced like any other generation and counts toward the trace total. Question text can quote your customer, so it is stored only when the bot captures inputs. When Jev did not answer, the step records the error and that the previous implementation decided. The risk signal is not a trace step; it appears with the conversation's risk signals in Mission Control. Organizations can opt out of Jev in Settings, and every decision then uses its previous implementation.
Datetime trap: observability started_at columns are TIMESTAMP WITHOUT TIME ZONE. Always use naive UTC at the repo boundary; tz-aware datetimes are rejected by asyncpg.
Replay example
curl https://rylvo.com/api/v1/traces/tr_def456/replay \
-H "X-API-Key: YOUR_API_KEY"AnalyticsDashboard-only
Charts on every reply your bots send, read from the canonical observability store (Postgres) — the same replies the Traces page lists. Every part has its own page under Dashboard → Analytics: rooms (each room, its settings and each widget), the widget library, templates, alerts and shared links.
Rooms
A named grid of widgets with its own range and bot.
- Last hour, 24 hours, 7, 30 or 90 days, all time, or custom days in the workspace time zone
- The range and bot live in the URL, so a link opens the same view
- Click a point, bar or slice to open those replies in Traces
- Test and Production each have their own rooms; releases don't carry them
Widgets
What to count, the measure, how to split it, and the chart.
- Count replies, tool calls or paid replies
- Replies, people reached, conversations, cost, tokens, response time, pass / fail / warning / blocked / error rate
- Over time, or by bot, model, channel, outcome or end user — as a number, line, columns, bars, donut, distribution or table
- A widget can narrow the room's range or bot, never widen it; number tiles compare with the period before
Library & templates
- One widget library for Test and Production
- Adding a library widget to a room places a copy — changing the library doesn't change rooms
- 10 templates — Overview, Right now, Quality, Speed, Cost, Channels, Customers, Bots compared, Tools, Models — previewed on your live numbers
- An empty workspace starts with an Overview room on the last 7 days
Alerts
- Error rate, warning rate, response time (p95), cost per reply or daily spend at or over a line
- One bot or every bot; Production, Test or both
- Checked about every 5 minutes; when one fires, every member gets an in-app notification, then it waits its cool-down
- The form shows what the number is right now
Sharing, events & export
- A share link is a snapshot — numbers as they were, never reply text; end users appear as “Customer 1, 2…”
- Links expire (the workspace default, up to its maximum) and can be switched off
- Events mark a launch or an incident on a room's time charts
- Export a room's widget numbers, or the replies behind them, as CSV or JSON
How much is read
- Up to 20,000 of the newest replies in the range, 2,000 per page
- When a range holds more, the room says which days its numbers cover
- Replies still running and Workspace Architect turns are left out
Roles and plan
Advanced Analytics is Lite and up; Free workspaces see an upgrade prompt. Viewers see every room and can export; operators create rooms, edit widgets, save to the library and add events; admins delete rooms, manage alerts, make share links and delete library widgets.
Analytics referenceDashboard-only
The shapes and internal endpoints behind Analytics. Rooms are read from Firestore in real time and written only through the engine, which checks the org, plan and role and writes an audit entry. None of these endpoints are public REST.
Internal endpoints (engine)
- GET /v1/analytics-rooms/{company_id} — list rooms
- GET /v1/analytics-rooms/{company_id}/{room_id} — one room (404 if missing)
- POST /v1/analytics-rooms/{company_id} — create (operators+; 201, { room_id, ok })
- PUT /v1/analytics-rooms/{company_id}/{room_id} — change name, filters or charts (operators+)
- DELETE /v1/analytics-rooms/{company_id}/{room_id} — delete (admins; idempotent)
- GET /v1/observability/orgs/{org_id}/analytics-rows — replies for charts, newest first, ≤ 2,000 per call
- POST /v1/observability/orgs/{org_id}/alerts — create, or update when an id is sent (admins)
- POST /v1/observability/orgs/{org_id}/alerts/check — an alert's number right now (any member)
Room changes are audited (analytics_room_created / updated / deleted), and so are share links (analytics.share_created / analytics.share_revoked).
Alerts
metric: error_rate, warning_rate, p95_latency_ms, avg_cost_usd, daily_spendenvironment: production, test, or null for both;botIdnull = every bot- Rates are stored as fractions (0.05 = 5%); the form works in percent
- Fires at or over the threshold with at least
minTracesreplies, then waitscooldownMinutes
Roles
analytics.view— vieweranalytics.edit,analytics.annotate— operatoranalytics.manage,analytics.share— admin- Library widgets: operators write, admins delete; events and share links are server-only
Firestore shape
{envRoot}/analyticsRooms/{roomId} (Test and Production each have their own)
|- name (1-200), createdBy, createdAt, updatedAt
|- filters: { botId, env, dateRange } (the room's own range and bot)
+- charts: [{ id, type, position, title?, width?, height?, color?,
customWidget?: WidgetConfig }]
WidgetConfig:
view: traces (replies) | tool_calls | cost (paid replies)
metric: count | total_cost | p95_latency | error_rate | ... (20)
breakdown: none | time | bot | model | status | user | channel | ...
chartType: big_number | line | bar_v | bar_h | pie | histogram | pivot
filters: [{ id, column, op, value }], dateRange (narrows only), topN? (10)
{orgRoot}/analyticsWidgets/{widgetId} library (Test + Production)
{orgRoot}/analyticsAnnotations/{id} events (server-written)
analyticsShares/{token} share links + snapshot (server-only)SDKs & Libraries
Python
import requests
resp = requests.post(
"https://rylvo.com/api/v1/bot-run",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"botId": "bot_abc123def456",
"sessionId": "sess_001",
"message": "I can't access my account.",
},
)
data = resp.json()
print(data["response"])
print(f"run {data['runId']} · {data['tokens']['total']} tokens")JavaScript / Node.js
const res = await fetch("https://rylvo.com/api/v1/bot-run", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
},
body: JSON.stringify({
botId: "bot_abc123def456",
sessionId: "sess_001",
message: "I can't access my account.",
}),
});
const data = await res.json();
console.log(data.response);
console.log(data.runId, data.tokens.total, "tokens");PromptsDashboard-only
Prompts are the instructions your agents follow at runtime. Create them from the Prompts dashboard, assign them to bots, and optionally enable self-improving optimization.
Key Concepts
Agent Categories
9 categories: System, Response Composer, Stage Classifier, Action Selector, Escalation Classifier, Session Summarizer, Verifier, Retrieval, Custom
Placeholders
Use {{key}} syntax for dynamic values resolved at runtime (company name, tone, language, etc.)
Self-Improving
Turn on self-improvement to have Rylvo fix what went wrong in a prompt's replies — each fix proven on replayed conversations first
Bot Assignment
Assign prompts to specific bots, or leave shared across all bots
Creating a Prompt
Choose an agent category
Select what type of agent this prompt controls (e.g., Response Composer, Verifier).
Write your prompt content
Use {{placeholder_key}} syntax for dynamic values. Templates are provided for each category.
Add placeholders
Define keys, labels, default values, and whether they're required. Use the template library for common ones.
Assign to a bot (optional)
Link the prompt to a specific bot, or leave it shared. Tag requests with prompt_id in the API.
Enable self-improving (optional)
Toggle auto-optimization in the prompt detail panel. Choose a strategy, metric, and frequency.
Placeholder Syntax
Placeholders use double-brace syntax: {{key}}. At runtime, they are resolved with values from the API request or defaults.
You are a support agent for {{company_name}}.
Greet the user as {{user_name}} in a {{tone}} tone.
Respond in {{language}}. Keep replies under {{max_length}} tokens.
{{context}}Built-in Placeholder Templates
| Key | Default | Description |
|---|---|---|
| {{company_name}} | Acme Corp | The customer's company name |
| {{user_name}} | John | The end user's display name |
| {{product_name}} | Widget Pro | The product being discussed |
| {{industry}} | Technology | The customer's industry vertical |
| {{tone}} | professional | Response tone (formal, casual, empathetic) |
| {{language}} | English | Response language |
| {{max_length}} | 256 | Maximum response length in tokens |
| {{context}} | - | Additional context for the prompt |
Version History
Every edit to a prompt creates a new version. Versions are tracked as manual or auto_optimized. You can view, compare, and promote any version to active from the prompt detail panel.
Prompt inheritance
Fork a prompt by setting a parentPromptId. The child inherits the base template and can add its own overrides while keeping the lineage tracked in version history. This is useful for per-bot or per-group variations of a shared prompt.
Dependency graph
The Prompts dashboard has an interactive SVG graph showing how prompts, bots, and agent groups relate to each other.
Graph layout
- Bots on the left → Prompts in the center → Agent groups on the right
- Edges show bot prompt assignments via
prompt.botId - Org-level prompts (botId = null) connect to an org virtual node
- Parent → child inheritance drawn within the prompt column
- Group-shared prompts connect to their agent group
Interactions
- Click a prompt → open prompt detail
- Click a bot → open bot page
- Hover any node → tooltip with full name and metadata
- Scroll/pinch to zoom, drag to pan
- Zoom/fit buttons for quick navigation
Prompt usage analytics
The prompt detail panel shows real-time usage metrics from the canonical trace store: trace volume, cost, latency, and A/B run history. Use this to decide which version is performing best before promoting it.
Resource VersioningDashboard-only
Every runtime-affecting resource is versioned - not just prompts. Prompts, guardrails, connectors, evolution rules, and KB blueprints all track an immutable version history plus the source of each edit. You can diff, preview, promote, and rollback from the dashboard.
Rules and scoring too. The Edge Case detection rules (with the AI review's criteria), test scoring and the release gate each keep a version per save — who saved it, when, the note, how many things changed — listed under History on its page, on every plan. On Enterprise, Restore puts an earlier version back: it's saved as a new version (the history keeps both), checked like any save — a plan limit or a rule that no longer exists stops it and says why — and written to the audit log.
As code. Each of the three is one JSON document: the field detection, scoring or criteria of its GET, which its PUT takes back with base_version (a stale one is refused) and an optional change_note — so a pipeline can keep them in git. On Enterprise, Export downloads the saved version as that JSON, and Import puts a file — an export, or a saved API response — on the page as unsaved changes to check and save. Settings the page doesn't have are left out and named. Over MCP (Build Intelligence), the same three are edge_cases.get/set_detection_rules, tests.get/set_scoring and tests.get/set_release_gate, with workspace.restore_config_version to put one back — saving is admins and owners, and the history names the person (“Alex over MCP”).
Edit sources
humanManual edit by a teammate from the dashboard
architectApplied via Workspace Architect (conversational setup / edit mode)
auto_generatedProduced by the Self-Improving optimizer or Agent Evolution rule generator
fix_proposalAccepted from an Edge Case Engine fix proposal
systemInternal migration or default seed
red_teamCreated in response to a red-team finding
What's versioned
What you can do from the dashboard
- View the full edit history for any resource (who, what, when, why)
- Diff any two versions side by side
- Preview a version before promoting it to active
- Promote any past version back to active in one click (rollback)
- Filter history by source - manual, architect, auto-generated, etc.
Every runtime decision records which version was active when it ran, so you can correlate performance changes with specific edits - not just which resource was used, but which version of it.
Self-Improving PromptsDashboard-only
Self-improvement checks a prompt's recent replies, finds the ones that went wrong, and writes small fixes for what the wording can fix. Every fix is proven on real conversations — replayed on your bot in Test with today's text and with the fix — before it's offered, and it reaches customers only when you release it.
How a check works
The last 14 days of replies that used the prompt (Production, Test or both). A reply went wrong on Edge Cases' evidence — the engine's verdict, a guardrail block, the customer's thumbs-down — or when an AI review against the prompt's goal and your Edge Cases review standards says it missed.
What the wrong replies have in common, and which of it the wording can fix. A failing tool or a fact missing from the knowledge base is named with where to fix it — never "fixed" by rewording.
Up to 3 small fixes, each a few exact edits to today's text. Placeholders are kept, existing rules aren't weakened, and nothing else moves — a fix reads in seconds.
Those conversations run again on the bot in Test, with today's text and with each fix — tools off, or only the bot's read-only tools if you turn that on (never a send, a booking or a save). The best fix is then tried on replies it never saw.
An AI judge reads each pair blind. The pairs that decide are read twice, the fix on each side, and count only when both readings agree.
A fix is offered only when it wins clearly (a one-sided sign test, p ≤ 0.10), solved at least one reply that went wrong, and made no reply worse. Too few replays to tell is shown as "possible fix, not proven".
"Put it in use in Test" makes the fix a new version of the prompt. Customers get it when you release. You can let clear wins go in use in Test by themselves.
What it never does
- Change Production. A fix goes in use in Test; customers get it only through a release.
- Keep a fix that made a reply worse, or count a win the replays can't tell from chance.
- Invent facts — prices, policies, names or links — or copy one customer's details into the prompt.
- Send anything during a replay: tools are off, and replays never show up as conversations, traces or edge cases.
- Clutter your versions: a fix becomes a version only when it's put in use.
Settings
| Setting | Default | What it does |
|---|---|---|
| How often it checks | Every day | Every hour, day or week, or only when you start one. A scheduled check stops after reading when nothing new went wrong. |
| Learns from | Production and Test replies | Which replies a check reads |
| What counts as better | Solves what the customer asked | Or: follows its rules, leaves the customer happy, short and to the point, or your own goal in words |
| Replay with the bot's read-only tools | Off | Replays call only tools that read — in Test, under its egress rules — so fixes about looking things up can be proven |
| Put clear wins in use by themselves | Off | Only high-confidence fixes that made nothing worse — and only in Test |
Turning it on
Open the prompt
Prompts → pick the prompt → the Self-improvement tab. Switch to Test first: Production is read-only.
Turn on, or check now
Turn on runs a check on its schedule; Check now runs one straight away — it takes a minute or two.
Review a fix
When a fix is ready, open it to see the edits and every replayed conversation side by side, then put it in use in Test or set it aside.
Release
Release to Production to give the fix to customers. Switch back any time from Versions.
Prompt API Usage
Prompts are assigned to a bot in the dashboard (or via the MCP surface), versioned, and resolved automatically when the bot runs. /api/v1/bot-run does not accept a prompt_id orprompt_overrides — to change which prompt a bot uses, update its prompt assignment.
How prompts resolve at runtime
Resolve
The bot's assigned prompts load their active versions.
Substitute
All {{placeholder}} values are filled from bot/org defaults.
Inject
The resolved text becomes part of the system prompt for the turn.
Track
The trace records which prompt versions were active (drives analytics + Self-Improving Prompts).
Change or A/B a prompt
- Update a bot's prompt assignment in Dashboard → Bots (or the Prompts page).
- Use Self-Improving Prompts to A/B variants and auto-promote winners.
- Every turn's trace records the resolved prompt version for analytics and optimization.
Edge Case Engine Dashboard-only
Automatically detect, classify, and fix bot failure modes
The Edge Case Engine scans your bot traces and files what they actually recorded into 15 categories, with the traces as evidence. It works in four stages: Observe → Detect → Classify → Triage, and a resolved case reopens by itself if the problem comes back. Manage from Dashboard → Edge Cases. Pro+ plan feature.
3 detection mechanisms
- Trace scan —
POST /v1/edge-cases/{org}/scanfiles what each trace recorded (failure verdicts and knowledge gaps), one case per signal per bot, with the traces as evidence. 10 scans/min per org - AI review — optional: a model you choose reads the real conversations and may only report defects visible in the reply, citing the trace. Uses your included AI replies or your own key
- Red Team adversarial testing — 13 built-in strategies with static + LLM-generated inputs, runs synchronously on Cloud Run with per-result checkpointing
16 edge case categories
- Hallucination — response not grounded in KB evidence
- Policy Violation — broke company/workflow policy
- Missed Escalation — should have escalated but didn't
- Wrong Tool — selected incorrect tool
- Missing Tool Call — should have called tool but skipped
- Wrong Stage — misidentified workflow stage
- Stale Memory — used outdated session facts
- Unknown Intent — intent not covered by workflow
- Tone Violation — doesn't match brand guidelines
- PII Leak — exposed sensitive personal info
- Loop Detected — bot stuck in repetitive pattern
- Execution Failure — the turn did not complete (model error, empty reply, refusal or budget stop)
- Integration Failure — a tool, connector, knowledge base, guardrail judge or attachment failed
- Knowledge Gap — the knowledge base had nothing relevant and it answered anyway
- Unhappy Customer — the customer rated the reply down
- Custom — user-defined category
Status lifecycle & severity
5 severity levels (critical=5, high=4, medium=3, low=2, info=1) sorted by weight.
Status flow:
open → acknowledged → fix_proposed → fix_applied → resolvedAlternative: dismissed (false positive) or deleted (permanent removal).
Fixes
Suggest fixes on an edge case (or on Fixes) gives Rylvo's fixes for that kind of problem, plus up to three the AI writes for the exact conversation on your model key. Each is one of four kinds:
- Guardrail — added in Test in one click (or edited first); a release puts it live
- Prompt — text to add to the bot's prompt: add it, mark it done
- Knowledge — an answer to add to a knowledge base, then mark it done
- Setting — steps to check, with a link to the place
A fix changes the bot's setup, so it is made in Test: each fix's button opens the exact place there — the bot's prompt, the connector whose tool failed, its knowledge base — even from a Production case, and a release puts it live. Fix with Architect opens the Architect over that page in Test: it makes the change (you approve it first), checks it by replaying the case's message to the bot in Test, and marks the fix done. A check whose replay couldn't use the tool the case is about — Test replies may not call that connector — says it isn't a full check, and why. Fixes can also be posted through the API (POST /v1/red-team/{org}/fix-proposals).
Lifecycle: to do → done / dismissed
14 Red Team strategies
- policy_probe, hallucination_bait, tool_confusion, escalation_boundary
- injection_attempt, context_overflow, mcp_abuse, pii_extraction
- multi_turn_coercion, jailbreak_dan, function_leak, billing_bypass, kb_poisoning
- encoding_obfuscation (base64, ROT13, leetspeak, hex, reversed text)
Pick the judge and the attack writer from any model your bots can run. Attacks are written for the bot; multi-turn ones adapt to each reply.
Tuning: 240s run budget, 45s per-turn timeout, 6 concurrent, 25 tests/strategy max. Guardrails fire as in production; billing/governance skipped (synthetic runs free).
Deduplication & RBAC
Deterministic ID from SHA256(botId::category::title). Duplicate scans increment occurrenceCount.
edgeCases.view— viewer+edgeCases.manage— admin+guardrails.view— viewer+guardrails.manage— admin+redTeam.view— viewer+redTeam.run— admin+
4 dashboard tabs
Edge Cases
Filter by status/category/severity/bot, search, create/edit/resolve/dismiss/delete, assign
Red Team
Create runs, select strategies, configure, execute synchronously, view results, create edge cases from failures
Guardrails
View/create/edit/toggle/delete, conditions, actions, priorities, trigger stats, version history
Fix Proposals
View/create/apply/reject/revert with regression test linking
Firestore shape
{envRoot}/edgeCases/{edgeCaseId}
|- title, description, category, severity, status
|- source: trace_mining / red_team / manual / guardrail_trigger
|- botId, botName, traceIds[], occurrenceCount
|- sampleInput, sampleOutput, expectedBehavior
|- fixProposalId, guardrailId, tags, assignedTo
+- firstSeenAt, lastSeenAt, resolvedBy, resolvedAt
{envRoot}/fixProposals/{proposalId}
|- edgeCaseId, fixType, title, description
|- impact, confidence, status
|- details: { guardrailConfig?, promptChanges?, thresholdChanges?, customSteps? }
|- regressionTestIds[]
+- appliedBy, appliedAt, createdBy, createdAt
{envRoot}/redTeamRuns/{runId}
|- name, botId, strategies[], status
|- config: { testsPerStrategy, maxConcurrent, timeoutMs, ... }
|- results: { totalTests, passedTests, failedTests, edgeCasesFound }
+- edgeCaseIds[], startedAt, completedAt
{envRoot}/redTeamRuns/{runId}/results/{resultId}
|- strategy, testInput, botResponse, passed
|- failureCategory, failureReason, severity, edgeCaseId
|- guardrailResults[], toolCalls[], traceId, latencyMs
+- model, tokens, createdAtGuardrails Dashboard-only
Programmable safety rules that run on every bot response
Guardrails are runtime rules that check bot inputs/outputs and take action when conditions are met. They can be created manually or auto-suggested by the Edge Case Engine when it detects failure patterns.
Guardrail Types
- Input Filter - Validates user input before processing
- Output Filter - Validates bot response before delivery
- Fact Check - Verifies claims against knowledge base
- Policy Check - Ensures compliance with company policies
- PII Detection - Detects and redacts sensitive data
- Tone Check - Validates tone matches brand
- Loop Breaker - Breaks repetitive conversation patterns
- Escalation Override - Forces escalation on conditions
- Tool Gate - Controls tool access in specific contexts
Actions
- Block - Prevent response, return fallback message
- Warn - Flag for review but allow response through
- Rewrite - Auto-modify response to comply
- Escalate - Trigger human handoff immediately
- Log - Record for monitoring, no action taken
Each guardrail has conditions (field + operator + value) and a fallback message shown when triggered.
Conditions & evaluation
A guardrail condition is built from a trace/runtime field, an operator, and a value. Examples:verification.status == fail,output.pii_detected == true, orloop.count > 3. Guardrails are evaluated in priority order; block and escalate actions short-circuit the rest.
Custom evaluation (custom_eval) conditions take a rule in plain language. Every custom rule that checks the same text is judged in one TypeSafe Jev request rather than one LLM call per rule, and the reason carries the probability, e.g. Violates "Never promise a refund" (p=0.94). If Jev cannot answer, the LLM judge runs on your key; the fail-closed policy is unchanged — if no judge can answer, the rule counts as violated.
Lifecycle & audit
Versioned
Every edit is a new version tagged manual, fix_proposal, red_team, system, or auto_generated
Experiment-gated
Risky changes can be deployed behind a flag before full promotion
Trace audit
Every guardrail decision is recorded in the trace observations
Guardrail Audit
Scheduled automation task reviews effectiveness and suggests tuning
Red Team Testing Dashboard-only
Proactively discover vulnerabilities with adversarial tests
Red Team runs generate adversarial inputs against your bot to find failures before users do. Select a bot, choose attack strategies, and the engine generates test cases automatically. Results are converted into edge cases with severity levels.
14 built-in attack strategies
- Policy Probe - Tests policy boundary conditions with edge-case inputs
- Hallucination Bait - Questions with no KB answer to test grounding
- Tool Confusion / MCP Abuse - Inputs that trigger wrong or unsafe tool selection
- Escalation Boundary - Pressure to decide what only a person may, or to skip the hand-off
- Injection Attempt / Jailbreak / DAN - Prompt injection and jailbreak attempts
- Context Overflow - Long conversations that stress memory limits
- PII Extraction / Function Leak - Attempts to surface private data or system internals
- Multi-Turn Coercion, Billing Bypass, KB Poisoning
- Disguised Instructions - A forbidden request hidden in Base64, ROT13, leetspeak, hex or reversed text
Automation & Reports Dashboard-only
Schedule scans, connect channels, and generate automated reports
The Automation page at /dashboard/automation lets you set up recurring jobs, notification channels, and automated analytics reports. Everything runs on your chosen schedule — no manual intervention needed after setup. Every part has its own page: Overview, Tasks (each with its runs and settings), Reports (each with its history and settings), Generated reports, and Channels. You edit automations in Test; the released copy runs and sends in Production, while Test runs are saved on each task page and never sent.
10 scheduled task templates
Cron jobs that run automatically via Cloud Function (every 5 min):
- trace_scan — auto-scan traces for edge cases
- red_team_run — periodic adversarial testing
- guardrail_audit — review guardrail effectiveness
- complaint_watch — monitor complaint-risk conversations
- dev_review — review failed runs & patterns
- conversation_quality — sample conversations for quality review
- cost_usage_watch — review recorded token spend & cost
- kb_gap_analysis — find knowledge gaps in trace outcomes
- connector_health — audit connector/MCP health
- test_suite_run — run a test suite when the engine integration is configured
9 cadences: hourly → monthly. Rich schedule config (interval/weekly/monthly with IANA timezone). Max 25 tasks/invocation, 3 concurrent/org, 90s timeout. Selected workers can add optional BYOK analysis; reports are configured separately.
5 notification channels
Where alerts and reports get sent. Delivery via durable outbox with exponential backoff retry:
- Slack — webhook integration
- Email — direct to team inboxes
- Discord — webhook integration
- Microsoft Teams — webhook integration
- Custom Webhook — any HTTPS endpoint
Events: edge_case.created, red_team.completed, report.generated, etc. Scope: global or linked to specific bots.
13 report sections
- executive_summary, edge_cases_overview, edge_cases_by_category/severity
- guardrail_performance, red_team_results, fix_proposals_summary
- improvements_timeline, bot_comparison, complaints_and_escalations
- developer_followups, automation_coverage, recommendations (AI)
13 data sources, 5 working output formats (html_email, slack_blocks, teams_card, discord_embed, markdown). 5 recipient filters (all_members, admins_only, owners_only, operators_only, custom). Optional LLM formatting with custom model, system prompt, temperature, max tokens. The reserved PDF option does not currently generate a PDF file.
RBAC & plan limits
automation.view— viewer+automation.generate_report— operator+automation.manage_tasks— admin+automation.manage_channels— admin+automation.manage_reports— admin+
Free: 0ch, 0tasks, 0configs, 0reports/mo / Starter: 2ch, 0tasks, 0configs, 0reports/mo / Lite: 10ch, 10tasks, 2configs, 25reports/mo / Pro: 25ch, 25tasks, 5configs, 100reports/mo / Enterprise: unlimited.
Firestore shape
{envRoot}/scheduledTasks/{taskId}
|- name, type, cadence, enabled, botId
|- config: { traceLimit?, redTeamStrategies?, aiConfig?, scheduleConfig? }
|- notificationChannelIds[], lastRunAt, lastRunStatus, nextRunAt
+- runCount, failCount
{envRoot}/notificationChannels/{channelId}
|- name, type, enabled, config, events[], botIds[], scope
+- lastUsedAt, lastStatus
{envRoot}/reportConfigs/{configId}
|- name, cadence, sections[], dataSources[], filters
|- recipientFilter, customRecipientEmails[], notificationChannelIds[]
|- aiConfig?, outputFormats[], scheduleConfig?
+- lastGeneratedAt, nextGenerateAt
{envRoot}/reports/{reportId}
|- configId, status, sections[], data, distributedTo[]
|- llmFormattedContent?, pdfUrl?, tokenUsage?
+- periodStart, periodEnd, generationDurationMs
{envRoot}/scheduledTaskRuns/{runId}
|- taskId, taskType, status, summary, details
+- startedAt, completedAtAgent Evolution Dashboard-only
Finds what keeps going wrong in a bot's replies and fixes it where the cause is — every change shown, and undoable
Agent Evolution watches one bot's replies, finds the problems that keep coming back, and fixes them. It is the system that improves the bot — it never answers customers itself. What it changes is the bot: a rule the bot follows, a setting in the Bot Hub, or a guardrail. Each change is shown with what it was before, where it lives and a way back. Edge Cases files individual failures; Agent Evolution works on the ones that repeat, read the same way (one detector for both). It uses your plan's included AI replies or your own key; it is part of the Advanced AI suite (Pro and higher) and works for a bot once its Agent Evolution switch is on.
Overview
What the bot is learning, what needs you, and whether a review is running
Replies
Every reply the bot gave, from the trace store; a failed one is flagged with the same reading Edge Cases uses
Reviews
Four AI reviewers read the latest replies and write findings — on demand, on a schedule, or after a run of failures
Findings
What the reviewers found, with the replies behind it; draft a rule from one, or dismiss it
Repeated failures
The same failure coming back, spotted after every reply with no AI involved; each has its cause read from the traces, its fix, how it was checked in Test, and what it changed
Rules
What the bot was taught: on, waiting for approval, off or rolled back — with each rule's track record
Settings
Which replies it learns from (Test, Production or both), what it does when a failure repeats, automatic reviews, approval mode, rollback, reviewer briefs
Personalization
Remember each customer's preferences within a conversation
How a rule changes the bot
Rules are followed by your bot, not by Agent Evolution — and only while they are On. A rule waiting for approval does nothing. An On rule reaches the bot in two ways:
1 · As text the bot reads
On every reply, each On rule is added to the bot's instructions under LEARNED RULES, grouped by when it applies (behaviour, before acting on the message, when calling tools, before sending the reply). The model is told to follow them strictly — but it is still a model reading text, so it can miss one.
2 · As a check Rylvo enforces in code
Some rules also get a hard check the model can't skip: a Message check can turn away a message, a Reply check can replace a reply that uses a forbidden term, and a Tool check can stop a call to a named tool or a call missing a required field. A rule's page lists exactly what is enforced under What Rylvo enforces; anything not listed there is text only.
- Kinds: Instruction (added to the instructions on every reply), Message check, Reply check, Tool check.
- Where: an On rule applies to the bot's Test and Production replies at once — rules are not part of a release.
- Approval: with Approval Required (the default) a drafted rule waits for an admin; with Auto Apply it turns on only after its check passes.
- Rollback: once a rule has been used 5 times, it is rolled back if more than 20% of those replies failed (the threshold is in Settings).
- Track record: a reply counts as worked when it finished without an error and the failure the rule was made for didn't come back.
Checking a rule before it goes on
Check replays up to five past conversations the rule's finding names — once without the rule and once with it — and the review model judges each pair. Replays run with tools off, so nothing is booked, ordered or sent. That is also why a Tool check rule shows “Can't be checked by replay”: it only acts when the bot calls a tool, and in a replay the bot calls none, so the two runs can't differ. It is not a sign the rule is wrong — read what it enforces, and watch its track record after you turn it on.
How a repeated failure is fixed
A repeated failure's page reads its cause from the failing replies' traces — every failed tool call with its kind and status code, the limits each reply ran with, how many tool calls it tried, how large the model's context got — never from the failure's title. It quotes what the engine recorded and says how sure the reading is. Then it fixes the place the cause is, in Test, and checks the fix by replaying the failing messages.
| The cause | What the fix changes (in Test) |
|---|---|
| Stopped by the limit on tool calls per reply | Bot Hub › Budget › Tool calls per reply, sized from the most calls a reply tried — only as far as the tool answers fit in what the model can read, with a rule to work in batches when they don't |
| Runs out of steps before it finishes | Bot Hub › Budget › Steps per reply — and Time per reply, when the extra steps need it |
| Stops at its time or cost limit | That limit, in Bot Hub › Budget › Per-reply limits |
| A tool's service doesn't answer in time | That connector's time limit (Connection › Time limit and retries) — and Time per reply if it would no longer fit |
| A tool's service is rate-limiting it, or failing (429 / 5xx) | That connector's retries, and the codes it retries on |
| Conversation too long for the model | Bot Hub › Sessions › Context: turns on Summarize older messages and sets a history token budget |
| A rejected key, a wrong URL, rejected values, a tool it doesn't have | Nothing Rylvo changes by itself — the page opens that exact connector page in Test and, where it can make the change, offers Fix with Architect |
| A guardrail keeps blocking replies | That guardrail, from Block to Warn — said first, in amber, because it loosens it |
| Empty, made-up or repeated replies | A rule in the bot's instructions |
- Fix in Test and check: one click makes the change on the Test copy, then replays the failing customer messages on the Test bot — tools on, its own limits — and reads each new reply with the detector that filed the failure. A replay counts as fixed only if the same failure doesn't happen again; one that failed another way says so. Each replay links to its own trace in Test.
- Test must be able to call the tools: a replay runs the bot's tools in Test, and Test calls a tool outside Rylvo only when Allow verified Test deliveries is on (Settings → Organization) and an owner or admin has confirmed the connector's Test destination on its Test tab. If Test refuses a tool the failing replies used, the check runs nothing and shows each refused tool, why, and a link to the exact place to allow it. A call Test refused during a replay makes that replay inconclusive — never “fixed”.
- Tools that change things (a connector that POSTs, a message sender, an MCP tool that isn't a read) run in a check only after you allow them. A tool Test refuses can't change anything, so you aren't asked about it.
- What changed: each change with where it lives, old → new, the environment it was written to, and a button that opens that exact control in Test, highlighted.
- Release to Production opens the release for that bot only — Production changes only through a release. Rules are the exception: a rule applies to Test and Production at once.
- Undo puts back every value the fix changed; a value someone changed since is left as they set it, and you are told.
- Back after fix: if the failure happens again after its fix, it reopens, the team is notified, and the page offers the next step.
When a failure repeats: Ask me, or Fix in Test by itself
In Settings, Ask me (the default) diagnoses and prepares the fix; you click Fix in Test. Fix in Test by itself does that on its own when the cause is a setting it read for certain — tool calls, steps, time, a connector's time limit or retries: it makes the change in Test, runs the check, keeps the change only if the replays come back fixed, and otherwise undoes it and tells you. You release it. It never makes a rule, loosens a guardrail or touches credentials by itself; it runs one fix per bot at a time, at most five a day, and tries a failure once.
Per-reply limits when a bot doesn't set its own: 2 steps, 60 seconds, $0.50 and 2 tool calls per tool it has (at least 8) per reply (automations get more steps and time). The Budget tab shows the value in effect and whether it is the bot's own or the platform default.
What each reviewer looks for
Four AI reviewers read a bot's latest replies — the pattern, speed, answer-quality and input reviewers — and each works from a brief. In Agent Evolution → Settings → Reviews you can change a reviewer's brief for the bot: the things it looks for, one per line, and for two of them a number — how many replies a pattern needs before it is reported (2 to start), and how long a step can take before it counts as slow (2,000 ms to start). How a reviewer reports what it finds stays fixed: your brief is handed to it beside the replies, never as its instructions. A pattern that cites fewer replies than its brief asks for is set aside, and the speed reviewer sees each step's time. Only what you change is saved, so Use the shipped brief brings back Rylvo's own. Every review — started from the dashboard, after a run of failures, or after a chat on the bot's page — runs on Rylvo's servers, on your included AI replies or your own key.
Self-Improving Prompts
A focused Agent Evolution workflow for prompts. It analyzes prompt-version performance from live traces, generates proposed revisions with explanations, evaluates them against held-out traces, and publishes winning versions as new prompt versions (not live until you promote them). It uses your plan's included AI replies, or your own key.
Agent Skills Dashboard-only
Reusable capability packages that extend your bots
Skills are reusable, versioned instructions a bot follows only when a customer's message calls for them. A skill fires when the message contains one of its words or one of its phrases as written (or on every reply, when it has neither), and its instructions are added to the bot's system prompt for that reply. Skills are part of Pro and higher, and run for a bot once its Skills switch is on. Write your own, add one from the library, import them, or review the ones suggested from what Agent Evolution learned. Manage from Dashboard → Agent Skills.
Skills in production
- Reusable instructions — guide the agent when a skill activates
- Words and phrases — decide which messages they apply to
- Bot or org scope — control where a skill applies
- Versions and telemetry — review changes and live usage
Trigger matching (deterministic, no LLM)
- A word matches anywhere in the message, even inside a longer word
- A phrase matches as written — its quoted part, or each part between commas (5+ characters)
- One word or one phrase clears the default minimum (0.25); at most 8 skills per reply
- Common words (“can”, “about”, “they” …) are never triggers — they're dropped and ignored
- Optional matching by meaning: embedding similarity at weight 0.3
- No words and no phrases: added to every reply, first
6 skill sources
- manual — operator creates via dashboard
- generated_from_rules — auto-promoted from rule clusters (opt-in)
- imported — imported from another bot/org
- architect — created by Workspace Architect
- reviewer_suggested — suggested by reviewer engine
- prebuilt — installed from the Skill Library catalog
Runtime injection & safety
- Matched skills added to
BotPromptInputs.skill_instructions - Merged into system prompt under "## ACTIVATED SKILLS"
- Wording that tries to override the bot's instructions is refused on save
- Only the instructions (and tool hints) are sent — never the name or description
- Usage recorded post-turn via SkillUsageEventDoc
- Confidence: score × 0.9 (success) or × 0.2 (failure) minus guardrail penalty
Scoping & lifecycle
- Bot-scoped — botId = specific bot, only that bot loads it
- Every bot — botId = null, every bot loads it
- Runtime loads bot-scoped first (priority), then org-level
- Status: draft → active → disabled → archived
- Only a skill that's on is used; Production uses the released copies
Versioning, rollback & auto-promotion
- Every change creates a SkillVersionDoc (7 change types)
- Putting a version back restores its text and triggers; on/off stays as it is; counters restart
- Auto-rollback switches off a failing skill and holds it in Test and Production until an admin releases it
- Suggestions from learned rules: opt-in per bot, after every completed review (cluster ≥ 3, configurable 2–10), always as drafts
- Effectiveness: usageCount, successCount, avgConfidence, lastUsedAt
RBAC & plan limits
evolution.edit_config— admin+ (manage skills)- Viewers can see but not create/edit/delete/status/rollback
Pro and Enterprise: unlimited skills · Free, Starter and Lite: not included (existing skills are kept)
Dashboard pages
- All skills — who uses each one, what fires it, how it's doing
- Each skill — overview, instructions, triggers, versions, settings
- Try a message — which skills a message fires, and what the model receives
- Library — 50 ready-made skills across 15 categories
- Settings — each bot's Skills switch, matching, suggestions, auto-rollback
Switch skills on for a bot in Skills → Settings.
Skill Library (Prebuilt Catalog)
A curated catalog of 50 ready-made skills across 15 categories covering both single-agent and multi-agent bot templates (Customer Support, Sales, Compliance, Data Collection, Conversation Design, Knowledge & Escalation, E-commerce, Healthcare, HR & Internal, Finance & Insurance, IT & Technical, Multi-Agent, Content & Marketing, Real Estate & Education, Utilities). Browse in the Skills → Library and add a copy to one bot or to every bot.
Fork model
- Installing creates a copy you own (
source: "prebuilt") - No auto-updates — edit freely after install
- As a
draftor turned on — you choose - For one bot or for every bot — you choose
- Fires on the catalog's phrases (short ones like “vip” also become words)
Guardrails
- Each library skill can be added once per bot and once for every bot
- Add several at once — to one bot or every bot, skipping ones already there
- Installed skills are normal skills — edit, clone, delete, rollback
Firestore shape
{envRoot}/agentSkills/{skillId}
|- skillId, orgId, botId (null = org-level), botName
|- name, slug, description, skillType, source, status
|- systemInstructions (max 8000), triggerConditions[], triggerKeywords[]
|- requiredTools[], toolChain[], generatedFromRuleIds[]
|- version, previousVersionId
|- usageCount, successCount, failureCount, avgConfidence, lastUsedAt
+- tags, metadata, createdBy, createdAt, updatedAt
{envRoot}/agentSkills/{skillId}/versions/{versionId}
|- version, changeType, previousInstructions, newInstructions
|- previousStatus, newStatus, changeReason
|- previous/newTriggerConditions, previous/newTriggerKeywords
+- usageCountAtChange, changedBy, createdAt
organizations/{org}/skillSafetyHolds/{skillId}
+- active, reason, failureRate, usageCount, createdAt, releasedAt?
{envRoot}/agentSkills/{skillId}/usageEvents/{eventId}
|- eventId (turnId:skillId), turnId, outcome, confidence, score
+- createdAt, aggregatedMission Control Dashboard-only
Live human oversight for every production conversation
Mission Control is the live operations surface at /dashboard/mission-control. Operators see every active conversation in real time, can intervene at any level, and the system keeps an immutable audit trail that satisfies EU AI Act Article 14 (human oversight) requirements. Real-time via Firestore onSnapshot listeners (no WebSocket/SSE).
6 intervention types
- Whisper — inject system instruction (customer doesn't see), injected into prompt via
fetch_active_whispers - Takeover — operator becomes respondent, bot paused
- Pause — freeze the bot, customer sees wait message
- Kill — terminate session immediately, send fallback (irreversible)
- Resume — resume a paused/taken-over conversation
- Flag — flag for review without interrupting
Blocking interventions (pause/takeover/kill) trigger the Python engine pre-gate (evaluate_mission_control_gate) which blocks the bot from responding. Rationale required for pause/takeover/kill.
Approvals & SLAs
3 urgency tiers with timeouts:
- immediate — 15s timeout (low-risk informational)
- standard — 120s (data access, PII-related)
- extended — 900s (financial, legal, compliance)
Lifecycle: pending → approved / denied / expired / auto_denied. ExpiresAt computed server-side. Decisions attached to the trace.
11 alert triggers
Per-conversation (inline after each bot turn):
- risk_score_above, guardrail_blocked, guardrail_triggered_n_times
- conversation_duration_above, no_operator_monitoring, approval_queue_size_above
- pattern_detected (regex), budget_threshold_crossed
Server-tick (scheduled job every minute):
- bot_turn_failed_n_in_window, byok_key_unhealthy, wallet_balance_below
Severity: critical/high/medium/low. Cooldown (default 300s). Suppression: snooze + quiet hours (IANA timezone). Alert instances idempotent via groupKey (ruleId:conversationId).
Operator presence
- 4 states: online / away / busy / offline
- 30s heartbeat, stale after 3 min → auto-offline
- Shift tracking: shiftStart / shiftEnd
- Capacity: maxConcurrentMonitors (default 5)
- Stats: totalInterventions, totalApprovals, avgResponseTimeMs
- Cross-tab localStorage leader election for sweep
Risk scoring & compliance
- Risk score 0–100, 5 levels: critical / high / medium / low / minimal
- Fixed weights: guardrail 30, pattern 25, sentiment 20 (English keyword lists), topic 15, duration 10
- Plus, on live channel turns, a
customsignal (weight 10) from TypeSafe Jev: frustration, urgency and cancellation-threat probabilities over the last 5 user turns, not limited to English. It can add risk, never lower it - Risk signals: source, name, score, details, timestamp
- Compliance modes: standard / eu_ai_act / soc2 / hipaa / custom
- Append-only oversight audit log (every operator action)
- Compliance export (CSV/JSON) with signed URLs
- Retention: plan-based (7d/30d/90d/unlimited), overridable
RBAC
missionControl.view— viewer+missionControl.intervene— operator+missionControl.resolve_approval— operator+missionControl.ack_alert— operator+missionControl.manage_rules— admin+missionControl.edit_settings— admin+missionControl.delete_conversation— admin+
7 dashboard tabs
Live Feed
Real-time conversation list (max 100), detail panel with transcript + interventions + risk signals, quick actions, assign operator
Alerts
Active (bulk ack, snooze, resolve), snoozed, history, rules CRUD with evidence chips
Channels
Per-channel connectivity health, error rates, retry queue
Analytics
KPIs, charts by type/severity/status, operator leaderboard (7d/30d/90d)
Audit Log
Append-only event log, filters, compliance export (CSV/JSON)
Operators
Team roster with status, role, shift indicator, stats
Settings
Enable/disable, approval urgency, auto-monitor, compliance mode, retention, messages
API endpoints
- POST /api/mission-control/intervene — create intervention (operator+)
- POST /api/mission-control/revert — revert intervention (operator+)
- POST /api/mission-control/alert-rules — create/update alert rule (admin+)
- POST /api/mission-control/dispatch — push operator message to channel (operator+)
- POST /api/mission-control/delete-conversation — hard-delete + cascade (admin+)
Firestore shape
{envRoot}/liveConversations/{conversationId}
|- botId, conversationId, status, riskScore, riskLevel
|- riskSignals[], messageCount, durationMs, lastMessagePreview
|- guardrailTriggeredCount, assignedOperatorId, monitoringOperatorIds[]
|- channel, isProduction, tags, flaggedReason
+- startedAt, lastMessageAt, endedAt
{envRoot}/operators/{uid}
|- status: online/away/busy/offline, maxConcurrentMonitors
|- totalInterventions, totalApprovals, avgResponseTimeMs
+- shiftStart, shiftEnd, lastActiveAt
{envRoot}/interventions/{interventionId}
|- type, operatorId, rationale, payload, outcome
|- riskScoreAtTime, messageCountAtTime, idempotencyKey
+- createdAt, resolvedAt
{envRoot}/approvalRequests/{requestId}
|- actionType, urgency, timeoutSeconds, status
|- riskScoreAtTime, riskSignals[], conversationContext
+- requestedAt, expiresAt, resolvedBy, resolvedAt
{envRoot}/alertRules/{ruleId}
|- trigger, severity, config, botId, notificationChannelIds[]
|- cooldownSeconds, snoozedUntil, quietHours
+- lastTriggeredAt, triggerCount
{envRoot}/alertInstances/{alertId}
|- ruleId, status, groupKey, fireCount, evidence[]
+- firstFiredAt, lastFiredAt, acknowledgedAt, resolvedAt
{envRoot}/oversightAudit/{entryId}
|- eventType, operatorId, conversationId, botId
+- details, riskScoreAtTime, timestamp
{envRoot}/missionControl/config
|- enabled, defaultApprovalUrgency, autoMonitorHighRisk
|- complianceMode, auditRetentionDays, maxOperatorsPerConversation
+- pauseMessage, takeoverMessageFlows
Guided/strict conversation graphs that steer a bot through a sequence of steps — each step carries a goal (injected into the system prompt), data to collect, an allowed-tools scope, and transitions the engine advances as the conversation progresses. Flows are org-scoped, attached to a bot via bot.flowId or an agent group via group.flowId, evaluated per turn by the engine, and not part of the /api/v1/bot-run request or response. On every plan — Free includes 1 flow, Lite 10, Pro and up unlimited.
Flow document (FlowDoc)
name,descriptionmode: guided | strictstart_step_id: entry step (must be defined)steps: FlowStep[]enabled: boolean
Step structure (FlowStep)
id(unique),namegoal: injected into the system prompt for this stepcollect: information to ask for before advancing — the flow keeps what the bot's data collection can't saveallowed_tools: string[] | "all" | "none" — enforced in strict mode, guidance in guidedallowed_agent_id: sub-agent for this step (groups)terminal: ends the flowwait_for,actions: what the step does itself before the model replies — see Flow actions
Transition
to: target step idkind: always | data_complete | intent | condition | tool_resultintent(kind=intent),expr(kind=condition; it can read the results of the step's actions andattempts)tool(kind=tool_result): fires when it ran successfully this turn
Runtime state (FlowState)
flow_id,current_step_idvisited: step ids seen this sessiondone: flow reached a terminal stepdata: answers the flow kept (masked in responses)turns,step_turns: turns in the flow / on this stepattempts,nudges,outcomes: failed tries, nudges and each action's results on the current step (flow actions)- One FlowState per session, advanced each turn; removed after 90 idle days
Graph validation
- At least one step; step ids unique
- start_step_id must be a defined step
- Every transition target must exist
- intent / condition / tool_result carry their field
- All steps reachable from start (BFS)
- Actions: unique IDs, real Go to targets, conditions that parse, the right members for each type
Bot & group attachment
- Bot:
bots/{botId}.flowId - Group:
agentGroups/{groupId}.flowId - Attach via
/attachso the field is not dropped by the model write-path - Engine reads flowId off the raw doc per turn
Runtime execution (per turn)
- 1. Read flowId + load the flow (flow_loader.load_flow)
- 2. Resolve the session's FlowState (start on first turn)
- 3. Run the step's Wait for and actions (if any), then inject the step goal and what it still needs; strict mode scopes allowed_tools
- 4. Save each answer — to the profile, or kept by the flow when the bot can't save it
- 5. advance() evaluates transitions and moves to the next step
- 6. A terminal step marks the flow done
Versioning
- Each update snapshots the prior revision
GET .../versionslists prior revisions- Restore = load a revision into the editor and Save
- Best-effort — a snapshot failure never blocks the save
Plan limits
- Every plan has flows — only new ones are capped (
max_flows) - Free: 1 flow · Starter: 3 · Lite: 10
- Pro / Enterprise: unlimited
- Editing an existing flow is never blocked
RBAC
- Read: any org member
- Create / Update / Delete / Attach: requires the flows feature
- All endpoints run authorize_org (org membership)
- Written only via engineFetch — never Firestore directly
API endpoints (Python FastAPI, internal)
- POST /v1/flows/{company_id} — create flow (validates the graph)
- GET /v1/flows/{company_id} — list ({ flows, total })
- GET /v1/flows/{company_id}/{flow_id} — get single
- PUT /v1/flows/{company_id}/{flow_id} — update (snapshots prior revision)
- GET /v1/flows/{company_id}/{flow_id}/versions — list revisions
- DELETE /v1/flows/{company_id}/{flow_id} — delete
- POST /v1/flows/{company_id}/{flow_id}/attach — bind to bot or group
- POST /v1/flows/{company_id}/detach — unbind from bot or group
All endpoints require authorize_org(request, company_id). Mutations require an admin or owner; creates count against max_flows. Internal (dashboard-managed), not public REST; the MCP flows.* tools write the same documents.
Firestore shape
{envRoot}/flows/{flowId}
|- name, description
|- mode: guided | strict
|- start_step_id: string
|- steps: [{ id, name, goal, collect[],
| allowed_tools, allowed_agent_id?,
| transitions: [{ to, kind, intent?, expr?, tool? }],
| wait_for?, actions?[],
| terminal }]
+- enabled: bool
{envRoot}/bots/{botId}
+- flowId: string | null
{envRoot}/agentGroups/{groupId}
+- flowId: string | nullFlow actions
Without actions a flow steers the model: each step has a goal, and the model decides what to say and which tools to call. Actions are the other half — things a step does itself, in order, on every message, before the model replies: wait for a photo, read it, call your own API, set a tracked detail, send a fixed reply, hand the conversation to a person, move to another step. Nothing waits for the model to decide, and a fixed reply makes no model call at all.
Actions are part of Flows, so they are on every plan; reading a photo uses the media allowance (one image per read, see Image & Voice Intake). Find them on a flow's Steps tab, in each step's Before the bot replies section. The Map tab shows them on the step cards, and the Simulate tab runs a conversation through them with no model, no photo and no API call: you say which files the customer sent and how each action goes, and it shows what would be sent and where the conversation moves.
What happens on each message
- Your input guardrails run first, so safety still applies. A fixed reply from a flow is not a guardrail block and is not counted as one.
- Wait for: if the step needs a file and the message has none, the customer gets the nudge and the message ends here.
- Actions run top to bottom. Each can be skipped with Only when, and says what happens if it fails.
- The step's rules are tried with the actions' results available. A rule that fires moves the conversation, and the new step's own Wait for and actions run in the same message.
- The model replies, unless a fixed reply already did. It is told what the actions did.
Wait for
Holds the step until the customer sends a file. A message with no matching file gets the nudge — plain text you write, up to 500 characters, with no model call and no cost — instead of reaching the model.
| Wait for | Which files satisfy it |
|---|---|
| Nothing | The step runs on any message. |
| A photo | A photo or screenshot. |
| A voice note | A voice note or other audio. |
| A document | A PDF or other document. |
| A document or other file | A document or any other file; a photo or voice note alone does not count. |
| Any attachment | A photo, voice note, document or file: anything the customer attaches. |
- Nudge up to sets how many nudges in a row (0 to 20, 3 when you do not say). After that the model answers and the step's actions are skipped, so nobody is stuck; a rule that reads
nudgescan still send them elsewhere. A matching file puts the count back to 0. - A step that waits for a file should leave through a condition rule that reads a result (
validate_serial.ok), not an “after the bot replies” rule, which also fires after a nudge and would move the conversation on without the file. The editor warns you. - A file that Rylvo refused on the way in (too big, a format it does not take, a failed security check) is not an attachment, so it does not satisfy a Wait for.
The actions
Add an action offers six. Every action has an ID — lowercase letters, digits and underscores, starting with a letter, up to 32 characters, unique across the whole flow — that names its results in conditions and messages (read_label.ok). Rename it in the card and everything that read the old name follows. Drag the cards, or use the arrows, to change the order; duplicate and delete are in each card's menu, and deleting asks first only when something reads its results.
| Action | Type | What it does | What it leaves behind |
|---|---|---|---|
| Read a photo or document | read | Reads what a reading profile asks for from the file in this message and saves each value that has a “Save into a tracked detail” setting. The bot must have the profile. | ok, reason, confidence, docType, missing, invalid, fields.<key>, saveErrors, error, unavailable |
| Call an API | call | Calls one of the bot's connector tools itself, with arguments built from the conversation, and judges the answer with “Counts as passed when”. | ok, status, response.<field>, error, unavailable |
| Set a detail | set | Changes tracked details: Set to (replace), Add (increment) or Append. Up to 10 changes in one action. | ok, error, saveErrors |
| Reply | reply | Sends fixed text with no model call, or tells the model what to say. | ok |
| Hand off to a person | handoff | Asks a member of your team to look at the conversation, with a note. The customer is told nothing by it. With “Stop the bot answering until a person takes over” on it also holds the conversation for a person. | ok, id, held, error |
| Go to a step | goto | Moves the conversation to another step, or ends the flow, right away. | ok |
| Run code | code | Runs one of the bot's “Flow step code” stages (your server or your JavaScript on Rylvo) with the message, the files, the tracked details and where the flow is, and acts on its answer: pass or fail, data, details to save, a reply, a move, a hand-off. | ok, data.<key>, error, unavailable |
Every action also leaves <id>.skipped, which is true when its Only when was false. A skipped action is not a failure.
Read a photo or document
Reads with one of the bot's reading profiles (the profile lives on the bot; the action names it) the first file in the message that is a kind the profile reads. Each field with a Save into a tracked detail setting is written only when the read is OK, replacing what was there, so a clearer second photo replaces the first serial. A value the tracked detail refuses is reported in saveErrors and makes the action fail. The action is OK only for a read that came out OK: its reason is one of the reasons in Image & Voice Intake. fields.<key> holds the values that are not sensitive; a sensitive value goes only to its tracked detail, so use {{state.<detail>}} for it.
A file answers one step. Once a step's Read has used a photo, a later step reached in the same message is offered only the files no earlier step read, so its Wait for nudges and its Read fails with no_attachment. “Send the front” and then “send the back” are two photos, and one photo is never read twice by two steps. If the bot has already read the photo with the same profile (its Use for every image profile) the action reuses that read at no extra cost.
Call an API
Calls one of the bot's connector tools — pick it from the bot's tools. It runs the way the model's own tool calls do: the connector's sign-in, retries, journaling, outbound-call rules and the test-mode gate all apply. It is put through the bot's tool-call guardrails first, as the model's own calls are: a guardrail that blocks or rewrites it fails the action, and the connector is not called. Arguments are a name and a value each, up to 30; a value is fixed text or a template such as {{state.serial}} (a value that is exactly one name keeps its type, so a number stays a number). A connector that needs a person's approval cannot be used: a flow does not approve for anyone, so the action fails. A call is never made with a hole in it: an argument that comes out empty because a name has no value fails the action, names the argument, and the connector is not called. Once a call has gone through it stands: if saving its answer into tracked details then fails, that is reported but never turns the call into a failure, so a step does not make a refund or a booking twice.
Counts as passed when
HTTP 200 does not mean valid. By default a call passes when the connector answers with any success status (2xx). Many systems answer 200 with a body that says no — {"valid": false} — and by default that would count as a pass, the serial would be called valid, and the flow would move on. Counts as passed when adds a check on the answer: response.valid == true. It reads response.<field> (a dot walks down the answer, up to 8 levels; list items cannot be addressed), status and ok, and anything else a condition reads. If the call itself failed (it timed out, the connector errored, the argument was empty) the check is not asked. The connector's own “Save into tracked details” mappings are applied only when the action passes, so the fields of an answer that said invalid are not saved. Always set it when your system's answer carries a verdict.
When the reader or your system is down
A Read, a Call and a Run code also leave <id>.unavailable. It is true when the action could not give a verdict on what the customer sent, so ok is false for a reason that is not their file or their answer: a read whose reason is error (the provider or your media allowance), not_configured or no_attachment, or whose values could not be saved; a call that timed out, was blocked (a guardrail, the egress policy), is not connected or needs approval, whose argument came out empty, or that answered with a server error (5xx) or 401, 403, 407, 408 or 429. It is false when the action looked and said no: an unclear photo, a wrong kind of document, a 200 that says valid: false, a 404 for a serial that does not exist. Put a fixed reply for read_label.unavailable OR validate_serial.unavailable before the “clearer photo” and “isn't valid” replies, or a customer is told their serial is wrong while your system is down. attempts still counts a failure of ours, so a system that stays down ends in a hand-over rather than an endless loop; the hand-off note can say why with {{read_label.error}} and {{validate_serial.error}}.
In Test, a Call goes out only for a connector you have verified. A reply in the Test environment calls a connector only when the workspace allows Test deliveries (Allow verified Test deliveries, Settings → Organization) and an owner or admin has verified that connector for Test on its Test tab (Test destination): they type its host, and for a call that changes data they say it points at a sandbox or test copy, never your live system. The call must go to the path and query that were verified, and changing the connector's address or sign-in takes the verification off. Otherwise a Test chat shows the Call as unavailable (“Connector call blocked by workspace egress policy” on the trace). Try the branches of a flow in the Simulate tab, which lets you say how each action goes and never calls anything; Production always calls the real connector.
Set a detail, Reply, Go to
- Set a detail writes tracked details the same way everything else does, with that detail's own rules. Set to replaces, Add adds a number (it can only be used on a number), Append adds to a list. A value that is a template which came out empty because a name has no value is refused, not saved as blank; the other changes of the action still go through and the action fails.
- Reply · Say this exactly sends your text (a template is filled in) as the whole reply, with no model call, and ends the message: actions below it do not run. A reply that fills in to nothing is not sent. Tell the model what to say adds your text to what the model is told, and the model writes the reply. Whatever the actions, the model is also shown a short block of what each one did — whether it worked and the non-sensitive values it read or saved — and text that came from the customer's file or your API reaches it as quoted data, never as instructions. A reply cannot fail, so it has no failure setting.
- Go to a step moves the conversation there right away, or ends the flow, and ends this step's list. The new step's own Wait for and actions run in the same message, up to 5 moves a message; a step never runs twice in one message. A Go to cannot fail either.
Run code
For logic the other actions cannot say. Run code runs one of the bot's code stages of kind Flow step code and acts on what it answers. Make the stage on the bot's Code tab (up to 25 per bot, edited in Test and released with the bot; each needs a name, which is what a step picks it by), then choose it in the step. It runs on your server — a signed call to your HTTPS endpoint, as for every code stage — or on Rylvo: your JavaScript in a sandbox that may fetch only the hosts you allow, with your secrets as ctx.secrets.NAME. The code is sent the customer's words, the files (ids and kinds) and what the reading profile read from them (the value of a private field is never sent), the tracked details (private ones masked), where the flow is (the step, attempts, nudges) and the results of the actions above it. It answers JSON; every member is optional:
| Member | What it does |
|---|---|
| ok | Its verdict: true (or left out) = it passed, false = it did not. A failed action counts an attempt and follows “When this fails”. |
| error | Why it did not pass (up to 300 characters), read as <id>.error. |
| unavailable | true = “I could not check” (your system is down). The action fails, and <id>.unavailable is true so a rule can apologise instead of blaming the customer. |
| data | An object up to 16 KB, read as <id>.data.<key> by conditions and messages (a dot walks down it; list items cannot be addressed). |
| state | Tracked-detail values to save, {key: value}. Saved the way a Set action saves, with each detail's own rules, whatever the verdict. |
| reply | Text sent as the whole reply with no model call (up to 4,000 characters). Used only when the action passed. |
| goto | A step id, or "__end__": moves the flow. Used only when the action passed; with a reply, the customer reads the reply and the flow is already on the next step. |
| handoff | true or {"note": "…"}: asks a person to look, exactly as a Hand off action does. Made whatever the verdict; if nobody could be paged the action fails. |
- The action leaves
<id>.ok,<id>.unavailable,<id>.errorand<id>.data.<key>, so a rule can readcheck.data.model == "X1". Only the members ofdatathe flow reads are kept with the conversation; the rest is used for that message and dropped. - It fails like any other action. If the code says
ok: falseorunavailable: true, does not answer in time, crashes, answers something that is not valid, or names a step the flow does not have, the action fails, counts an attempt and does what When this fails says. The last three, and a stage that is missing or turned off, count asunavailable: nothing was said about what the customer sent. An invalid answer applies nothing. Areplyorgotofrom code that failed is not used — write the failure reply in When this fails, or in a Reply action that reads<id>.error. - A run waits at most the stage's time limit (500 ms to 10 s, default 5 s) and a webhook is retried up to twice on network errors,
429and5xx, all inside the flow's 25 seconds. A retry can repeat a side effect: dedupe onevent.deliveryId. - In Test, a stage that can reach another system does not run. Any webhook, and hosted code with at least one allowed host, is blocked in the Test environment until its destination is verified for Test (nothing can do that yet), so a Test chat shows the action as unavailable with “Not run: blocked in Test”. Hosted code with no allowed hosts cannot send anything out, so it runs in Test too. Try the flow in the Simulate tab, where you write the answer the code would give (Simulate does not run your code); Production runs it.
Only when, and the condition builder
Only when skips the action unless a condition is true. The same builder writes a rule's condition and a call's Counts as passed when. Each row is a variable, an operator and a value — attempts is at least 3 — and rows join into groups: all of these are true, any of these is true, not all of these are true, none of these is true. The operators are has a value, has no value, equals, does not equal, is more than, is at least, is less than, is at most (and “is yes” / “is no” for a yes-or-no value). Advanced: edit as text shows the same condition as text, and it is what is stored:
read_label.ok
validate_serial.response.valid == true
attempts >= 3 AND NOT validate_serial.ok
state.issue_type == "Refund" OR message_length > 400- Compare with
==and!=(and>>=<<=on numbers), combine withANDORNOT; text goes in quotes. A name on its own means it has a value, andNOT namemeans it does not. - A name that leads nowhere is empty, never an error, and ordering a value that is not there yet is false. A condition is at most 500 characters, and it cannot call functions.
- Opening a condition never rewrites it. One the builder cannot show as rows (arithmetic, for instance) stays in the text box. A half-written row makes the condition invalid and the save is refused; it never quietly becomes a shorter condition that matches more.
When this fails, and attempts
Read, Call, Set, Hand off and Run code can fail (an action fails when its result is not OK, it raises, or it times out). When this fails says what then happens:
| Choice | What happens |
|---|---|
| Carry on | The next action runs as if nothing had happened. The failure still counts as an attempt. |
| Reply and stay | The customer gets the text you wrote, with no model call, and the conversation stays on the step. |
| Go to a step | The conversation moves there and that step's own actions run in the same message (at most 5 moves a message). |
| Hand off to a person | A person is asked to look, and the customer reads your text (or a standard line if you left it empty). The bot is not paused. |
attemptsis the number of failed messages on this step. It goes up by one the moment the first action fails in a message, so the actions below it already see the new number: a ruleattempts >= 3fires on the third failed message, not the fourth. A skipped action is not a failure.attemptsis not reset by staying on the step or by looping back to it; it starts again from 0 only when the conversation enters a different step.nudgescounts the nudges in a row on a step the same way. The results of a step's actions are cleared whenever the conversation reaches the step, so a rule never reads an answer left over from an earlier visit.- A failed action is a warning on the trace, not an error: an invalid serial is the flow doing its job and does not count as an outage.
Results, variables and templates
A condition or a message can use the results of the actions above it by their ID — read_label.ok, read_label.reason, read_label.confidence, validate_serial.status, validate_serial.response.model — and the rest of what a flow knows: state.<tracked detail>, a collected field by name, attempts, nudges, step_turns, turn_count, tool_calls, message_length and guardrail_triggered. The editor lists them as chips you click, and offers only what that place can see (a rule sees every result of its step; an action sees the actions above it).
- A template is text with a name in double braces:
The serial {{state.serial}} isn't valid.It takes a plain name, never a calculation, and never runs code. A filled-in value is flattened to one line and cut at 1,000 characters (the whole text at 4,000). A name with no value renders as nothing in a message; the editor tells you live which names will always be empty. - An ID cannot be one of these words, because they already mean something:
state, collected, response, status, ok, attempts, nudges, intent, turn_count, step_turns, tool_calls, message_length, guardrail_triggered, true, false, null, none— nor a Python keyword, nor the name of a field the flow collects. - Results outlive the step they were left on, except that the results of a step's own actions are cleared when the conversation enters it. They are stored with the flow's position for 90 idle days; the full answer of a connector is not stored, only the members the flow itself reads afterwards.
See how it is doing, test it, keep a record
Analytics. A flow whose steps wait for a file or run actions shows a second block on Flows → Analytics: how each action did (passed, said no, or couldn't be used — failures on your side are counted apart from the customer's), why reads failed (unreadable, wrong type, missing fields, unclear), how many failed tries conversations had on each step, how many hand-offs there were, and the step each conversation was last seen on. Only counts and reasons are kept — never a value a photo yielded. Replies from before the feature have no numbers. Tests. A saved test can send photos and expect the tracked details the bot must have saved and the step the conversation must end on, so a photo flow can sit in a test set and in the release gate (see Bot Tests). Your own database. A tracked detail a conversation changes can be sent to your conversation storage as a state_changed event — which detail, its scope, the new and previous value ([sensitive] for a sensitive detail), and what wrote it (flow:<action id>, pre_pass:<profile id>, a connector or a code stage). It is off until you tick it on a connection; the “Tracked Details Log” template maps it to a table.
Worked example: verify a product by photo
A customer sends a photo of the label on a product. The bot reads the serial number, checks it against your own system, and — if it is valid — shares the model and the warranty date; if not, it says so and asks again, and after three tries it hands the conversation to a person. Flows → New flow → Verify a product by photo builds this step, with a short Confirm the product and Wrap up after it, and a With a person step the conversation moves to once a person has been asked. It is written against these, which the bot needs first:
- Tracked details
serial,product_modelandwarranty_until(Bots → your bot → Memory). - A connector tool named
validate_serialthat takes aserialand answers with a verdict, for instance{"valid": true, "model": "X1", "warranty_until": "2027-03-01"}, with the mappingsmodel→product_modelandwarranty_until→warranty_untilunder Save into tracked details. It must not require approval. - A reading profile on the bot that reads the serial and saves it into
serial— start from the Product label / serial number template — and Accept images switched on. The new-flow page asks which of the bot's profiles reads the label and points the Read action at it.
The first step, Check the serial, waits for a photo (nudge: “Please send a photo of the label on the product, with the serial number in view.”, up to 3 times) and runs these actions:
| # | ID | Action | Only when | What it does |
|---|---|---|---|---|
| 1 | read_label | Read a photo or document | — | Reads the label with the Product label profile and saves the serial into serial. |
| 2 | validate_serial | Call an API | read_label.ok | Calls validate_serial with serial = {{state.serial}}. Counts as passed when response.valid == true. |
| 3 | hand_over | Hand off to a person | attempts >= 3 AND NOT validate_serial.ok | Note: “The customer could not get a serial verified after three tries. Last serial read: {{state.serial}}. Why the last try failed: {{read_label.error}}{{validate_serial.error}}” Stop the bot answering until a person takes over is on, with the line “Thank you for waiting. A member of our team has your conversation and will reply here as soon as they can.” for the customer: the bot stops answering until a person has the conversation. |
| 4 | say_hand_over | Reply · say this exactly | attempts >= 3 AND NOT validate_serial.ok AND hand_over.ok | “I can’t verify this one myself, so I’m passing you to a member of our team. They’ll pick it up from here.” |
| 5 | say_unavailable | Reply · say this exactly | read_label.unavailable OR validate_serial.unavailable | “I can’t check this right now, and it isn’t anything you did. Please try again in a few minutes.” |
| 6 | say_unreadable | Reply · say this exactly | NOT read_label.ok | “I couldn’t read a serial number from that photo. Please send a clearer, well-lit photo of the label.” |
| 7 | say_invalid | Reply · say this exactly | NOT validate_serial.ok | “The serial {{state.serial}} isn’t valid. Please check the label and send another photo.” |
| 8 | say_result | Reply · tell the model what to say | — | “The serial is valid. Tell the customer the product model ({{state.product_model}}) and that the warranty runs until {{state.warranty_until}}.” |
A rule on the step — when validate_serial.ok, go to Confirm the product — moves the conversation on once the serial has checked out. A second rule — when hand_over.ok, go to With a person — moves it to a step of its own once a person has been asked, so the bot does not ask for the label again once the hold ends (Stop the bot answering until a person takes over holds the conversation for a person, but when the hold ends the bot answers again, and a step that stays would ask again on the next message). Read it as the five things that can happen to a message:
- A clear label with a valid serial. Read finds the serial and saves it; the call goes out and the answer is
valid: true, so it passes and its mappings saveproduct_modelandwarranty_until. The three fixed replies are skipped because their conditions are false. The model is told to share the model and the warranty, and the rule moves the conversation to Confirm the product in the same message. - A message with no photo. The customer gets the nudge, with no model call. After three in a row the model answers instead and the actions are skipped.
- A photo that cannot be read (blurry, the wrong picture, no serial). Read fails, so
attemptsbecomes 1 and the call is skipped. Actions 3, 4 and 5 are skipped and action 6 applies: the customer reads the “clearer photo” reply, and the conversation stays on the step. A skipped action leaves nothing inok, soNOT validate_serial.okis true here too — which is whysay_unreadablecomes beforesay_invalid: the first fixed reply that applies ends the message. - The reader or your system is down. The media allowance is spent, the connector times out, answers with a server error or refuses us. That action leaves
unavailabletrue, so action 5 applies — “I can’t check this right now, and it isn’t anything you did” — and not the “clearer photo” or “isn’t valid” replies, which would blame the customer.attemptsstill goes up, so if it stays down the third message ends in the hand-off, whose note carries the reason. - A serial your system says is not valid. Your API answers
200withvalid: false. Because of Counts as passed when the call fails,attemptsgoes up, and the customer reads that the serial isn't valid. On the third failed messageattemptsreaches 3 the moment the first action fails, so the hand-off (3) runs, the team is paged, the bot is paused (on a plan with Mission Control), and the fixed hand-over reply (4) is sent — and only if the hand-off worked, so nobody is told a person was asked when none was. The customer's next message is stored and shown to your team, and gets the hold line once; after that the bot stays silent until a teammate takes over or replies, the alert is resolved, or 24 hours pass. The order matters: the hand-over and the failure replies come first, each guarded by its own condition, and the model-written reply comes last.
As stored — the step you would send over the API or MCP. rp_productlabel is the starter's own profile id; the new-flow page replaces it with the id of your bot's profile.
{
"id": "check_serial",
"name": "Check the serial",
"goal": "Get a photo of the product label with the serial number on it. A photo that arrives is read and checked automatically, and the result is handed to you, so never say a serial is valid unless the check said so. If the customer cannot send a photo, help them find the label (usually on the back or underneath) and keep asking.",
"collect": [],
"allowed_tools": "none",
"wait_for": { "kind": "image", "nudge": "Please send a photo of the label on the product, with the serial number in view.", "max_nudges": 3 },
"actions": [
{ "id": "read_label", "type": "read", "profile_id": "rp_productlabel" },
{ "id": "validate_serial", "type": "call", "connector_tool": "validate_serial",
"args": { "serial": "{{state.serial}}" }, "when": "read_label.ok", "passes_when": "response.valid == true" },
{ "id": "hand_over", "type": "handoff", "when": "attempts >= 3 AND NOT validate_serial.ok",
"text": "The customer could not get a serial verified after three tries. Last serial read: {{state.serial}}. Why the last try failed: {{read_label.error}}{{validate_serial.error}}",
"pause_bot": true, "hold_reply": "Thank you for waiting. A member of our team has your conversation and will reply here as soon as they can." },
{ "id": "say_hand_over", "type": "reply", "mode": "fixed",
"when": "attempts >= 3 AND NOT validate_serial.ok AND hand_over.ok", "text": "I can't verify this one myself, so I'm passing you to a member of our team. They'll pick it up from here." },
{ "id": "say_unavailable", "type": "reply", "mode": "fixed", "when": "read_label.unavailable OR validate_serial.unavailable",
"text": "I can't check this right now, and it isn't anything you did. Please try again in a few minutes." },
{ "id": "say_unreadable", "type": "reply", "mode": "fixed", "when": "NOT read_label.ok",
"text": "I couldn't read a serial number from that photo. Please send a clearer, well-lit photo of the label." },
{ "id": "say_invalid", "type": "reply", "mode": "fixed", "when": "NOT validate_serial.ok",
"text": "The serial {{state.serial}} isn't valid. Please check the label and send another photo." },
{ "id": "say_result", "type": "reply", "mode": "instruct",
"text": "The serial {{state.serial}} is valid. Tell the customer the product model ({{state.product_model}}) and that the warranty runs until {{state.warranty_until}}." }
],
"transitions": [
{ "to": "confirm_product", "kind": "condition", "expr": "validate_serial.ok" },
{ "to": "with_a_person", "kind": "condition", "expr": "hand_over.ok" }
]
}What a hand off does, and does not do
- It does raise an in-app notification for the workspace's members and an alert in Mission Control → Alerts, named “Flow hand-off: <step>”, with your note (sensitive values masked). It is the same Alerts list a guardrail escalation lands in, not a second queue, and it is worded as a flow step asking for a person, not as a guardrail. On live traffic the team is paged as the hand off is made; if neither the notification nor the alert could be written the hand off fails, so a flow never tells a customer a person was asked when nobody was (a hand off set under When this fails then lets the model answer).
- It does not tell the customer anything — follow it with a Reply, and give the Reply
<id>.okas its Only when so the customer is told only when it worked. A hand off on a When this fails setting does reply, with your text or a standard line. - It does not pause the bot unless you turn on Stop the bot answering until a person takes over: the bot keeps answering, and while the customer stays on the step a rule such as
attempts >= 3keeps holding, so the hand off runs again on every later message. On live traffic a repeat updates the one open alert (a fire count and the latest evidence) instead of paging again, and an alert someone has acknowledged stays acknowledged; once the alert is resolved the next hand off is a new alert. - With “Stop the bot answering until a person takes over” on it holds the conversation for a person. From the moment the team has been paged, the customer's later messages are stored and shown in Mission Control but the bot does not answer them. The line you wrote under While it is held, tell the customer goes out once; after that the bot stays silent. The hold ends when a teammate takes over or replies in Mission Control, when the alert is resolved, or after 24 hours, so a forgotten alert never mutes a customer for good. When it ends the bot answers again, so still move the flow to a step of its own after the hand off.
<id>.heldis true when the conversation was held. If the team was paged but the hold could not be written, the hand off fails like one nobody could be paged for. A test run holds nothing. - A test run pages nobody. Try it and the test chat record the request on the trace and say so; Simulate may show the same hand off each time. The alert itself can be checked only on live traffic.
Where actions run, and where they do not
- A flow that follows a single bot runs its actions. A flow that an agent group follows runs without them: a team's steps do not wait for a file, and nothing is read, called, set, handed off or sent as a fixed reply — the agents just answer. A group conversation has no per-bot files or tracked details to act on. The editor says so on the flow, the Simulate tab and the link dialog, and linking such a flow to a team shows a warning. Attach a flow with actions to a single bot. (A member bot's own flow still runs its actions.)
- Test and Production. Flows and reading profiles are edited in Test and go to Production in a release, like the rest of the bot (see Environments & Releases). In Production a flow is view-only: every control is locked except looking (Open all, Close all), changing and linking explain why and offer Edit in Test, and the engine runs the released copy of both. A Call cannot go out from Test yet(see When the reader or your system is down above): try a flow in Simulate, and expect the real call to run in Production.
- Time. The actions of one message share 25 seconds; a Read gets at most 20 of them and a Call as long as its connector allows. An action that times out, or starts after the time is spent, fails and its When this fails applies. A Reply and a Go to cost nothing, so a fixed reply is still sent. This time counts toward the turn's own wall-clock limit.
- Never a failed turn. If the engine hits a bug in actions it records it on the trace and the model answers as if the step had none.
- A fixed reply skips the strict collection gate, the output guardrails that a model judges, and the model call. It does not skip the deterministic output guardrails, the stored conversation, the trace, billing and metering.
- Each action is its own span on the trace (type, ID, status, time, masked inputs and outputs, cost), under one
run-flow-actionsspan.
Build it with the Architect, or over MCP
The Workspace Architect builds this from a sentence:
When a customer sends a photo of the product label, read the serial number, check it with our Validate Serial connector, tell them the model and warranty, otherwise say the serial isn't valid and ask again, and after three tries hand the conversation to a person.
It builds in the order the pieces depend on each other: the tracked details, the connector (with its “Save into tracked details” mappings), the reading profile on the bot, then the flow, which it creates and attaches to a single bot, and it reads everything back. It asks for your API's address and the fields it answers with rather than guessing. It does not call a photo flow tested until a saved test that sends a photo has run and passed — its own test chat sends text only — and tells you what to try with a real photo: a clear label, a wrong picture, a wrong serial, three failures. It cannot make a photo up, so add the photo tests yourself in Tests (see Bot Tests).
Over MCP, flows.create and flows.update take wait_for and actions in the snake_case shown above (a waitFor or passesWhen is refused by name, not dropped), run the same checks as the editor and refuse a flow with every problem listed; flows.attach warns about a reading profile the bot lacks or a flow a team would run without its actions. bots.update takes media_profiles and media_default_profile_id, and a setting is cleared by naming it in clear_fields — never by sending null.
Limits
| Limit | Value |
|---|---|
| Actions in one step | 12 |
| Actions in one flow | 200 |
| Changes in one Set action | 10 |
| Arguments of one Call action | 30 (and 8,000 characters of values together) |
| Text of a reply, a hand-off note or a failure reply | 1,500 characters |
| A nudge | 500 characters, plain text |
| Nudges before the model answers | 0 to 20 (3 when you do not say) |
| A condition (“Only when”, “Counts as passed when”) | 500 characters |
| An action's ID | 32 characters: lowercase letters, digits and underscores, starting with a letter |
| Moves between steps in one message | 5 |
| Time the actions of one message share | 25 seconds (a Read gets at most 20 of them) |
Every change is checked as you edit and again on save, and a flow the engine would refuse cannot be saved: a missing Go to target, an action ID used twice, a condition that does not parse, a Call without a tool. Things that are probably mistakes are saved with a warning instead — a result nothing produces, a reading profile the bot does not have, actions on a step that ends the flow (they never run), a Run code action.
Tracked details (state)
Typed details a bot remembers and keeps up to date while it talks — set them up under Bots → your bot → Memory. Each detail is remembered for this conversation, this person (across all their conversations) or everyone (one shared value). The bot sees them in its prompt and changes them with its update_state tool; prompts use {{state.key}}; your systems read and change them with the API below. Every change is a revision you can restore. The schema is edited in Test and released to Production like the rest of the bot; values are runtime data in each environment.
Types and update behavior
- text, number, boolean, date (ISO 8601), choice, list (of text, numbers or objects), object
replace,keep_first— any typeincrement,max,min— numbers (max/min also dates)append,append_unique— listsmerge— objects (RFC 7396: a null removes a key)- Optional rules: number range, text length and pattern, list size, JSON Schema (Draft 2020-12) for objects
Control and privacy
- Who may change each detail: the bot, the API, teammates
- A connector tool can save values from its answer into details (Connector → Config → Save into tracked details) — they count as coming from the API
- Flow rules can branch on details:
state.issue_type == "Refund" - Hide a value from the bot (it can still set it)
- Sensitive: masked in prompts, traces, the widget and API responses; admins reveal it, and each reveal is audited
- Forget after N days (person and everyone details)
- Conversation details follow your conversation retention; person details are erased with the person
API
Use an API key with the state:read or state:write scope. The key's organization and environment apply; a key restricted to one bot reaches only that bot. The subject is a conversation id (session), your end-user id (person) or shared (bot).
| GET | /api/v1/state/{botId}/config | The bot's tracked details |
| GET | /api/v1/state/{botId}/records?scope=&limit= | Recently changed records |
| GET | /api/v1/state/{botId}/records/{scope}/{subjectId} | One record's values |
| PATCH | /api/v1/state/{botId}/records/{scope}/{subjectId} | Change values (atomic; all or nothing) |
| GET | /api/v1/state/{botId}/records/{scope}/{subjectId}/revisions | History, newest first |
| POST | /api/v1/state/{botId}/records/{scope}/{subjectId}/restore | Restore a revision (as a new one) |
| DELETE | /api/v1/state/{botId}/records/{scope}/{subjectId} | Delete a record and its history |
| PUT | /api/v1/state/{botId}/config | Replace the schema (Test keys) |
curl -X PATCH https://rylvo.com/api/v1/state/bot_123/records/person/user_42 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-shipped-9921" \
-d '{
"ops": [
{ "field": "plan", "op": "replace", "value": "pro" },
{ "field": "orders", "op": "update", "value": 1 },
{ "field": "coupon", "op": "clear" }
],
"expectedRevision": 7
}'update applies the detail's update behavior, replace sets the exact value, clear removes it. values is shorthand for one update per key. expectedRevision makes the write fail with 409 (and the current revision) if anything changed since you read it; a refused value is a 422 with a reason per field. Bot-run responses include the turn's state and stateEvents when the key has a state scope.
Conversations: rules and carry-over
Start a new conversation when…
- A rule watches a conversation or person detail: it becomes a value, changes, is set or is cleared
- It fires once, on the change — not while the value stays the same
- Changed by the bot: the conversation ends after its reply (the bot is told, so it wraps up)
- Changed by your systems or a teammate: the person's open conversation ends; the response says how many (
sessionsEnded) - The person's next message starts a new conversation; traces show the rule
Carry into the next conversation
- Conversation details start empty in every new conversation
- Mark one to carry over and the next conversation starts with its last value (e.g. the order being handled)
- Copied once, before the first reply, as its own revision — never over a value already there
- Person details are always kept across conversations
Memory beyond the last messages
Under Bots → your bot → Sessions, the memory window sets how many recent messages a reply carries. A token budget also keeps them within that many tokens, newest first, so a few long messages can't crowd out the rest. Summarize older messages folds messages that leave the window into a running summary the bot sees on every turn — updated after replies, every few messages, on the bot's own model. Traces show when a reply used the summary or the budget left messages out.
Several messages at once (double texting)
Under Bots → your bot → Sessions, choose what happens when someone sends another message while the bot is still answering:
- Answer in order (default) — one reply at a time; the next message is answered after the reply before it, with it in mind
- Wait and answer together — waits a moment (1–15 s) after the last message and answers quick messages in one reply; photos and voice notes are never merged (on the API and Beam, messages are answered in order)
- Answer only the first — messages sent mid-reply get a short notice on channels; the API answers
409 conversation_busywithRetry-After - Answer each at once — no coordination; replies can overlap
Coordination is per end user and conversation, across every server. It never loses a message: a channel message that has waited 45 seconds is answered anyway, and an API call waits up to 25 seconds before conversation_busy. Calls without endUserExternalId aren't coordinated.
Run context
Send facts your app knows with a message — the person's plan, the page they're on — as context on bot-run (a JSON object, up to 16 KB). The bot sees it for that message only, prompts use {{context.plan}} or {{context.account.tier}}, and nothing is stored — traces keep the key names only. Set a JSON Schema under Memory → Run context and a request that doesn't match gets a 422 with the reasons in details.problems, before the bot runs. Context sent from the widget is ignored.
curl -X POST https://rylvo.com/api/v1/bot-run \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"botId": "bot_123",
"endUserExternalId": "user_42",
"message": "Can I add a seat?",
"context": { "plan": "pro", "seats": 4, "page": "/billing" }
}'Long-term memory
Tracked details are fields you define. Long-term memory is everything else worth knowing next time — a person's preferences, their situation, what happened — kept as short sentences the bot reads when they matter. Turn it on in the bot's Memory tab (Test, then release).
- About each person — kept across all of their conversations with the bot (needs
endUserExternalId). Shared — true for everyone, like a team notebook; new shared memories the bot saves can wait for a teammate's review. - How they're made — the bot saves and corrects them as it talks (its
rememberandforgettools), and after a conversation ends an AI reads it and saves what's worth remembering, following your instructions. Your app and teammates can add them too. - How they're used — on every message the bot is shown the memories closest in meaning to it (pinned ones first), up to the number you choose; it can search the rest.
- Housekeeping — a new memory that says what an existing one says updates it instead; a person's memories can be forgotten after days unused; erasing a person deletes theirs everywhere.
| GET | /api/v1/memory/{botId}/memories?scope=person&subjectId=… | A person's memories (or scope=shared) |
| POST | /api/v1/memory/{botId}/memories | Remember something |
| PATCH | /api/v1/memory/{botId}/memories/{memoryId} | Correct, pin, tag or approve |
| DELETE | /api/v1/memory/{botId}/memories/{memoryId} | Delete one |
| POST | /api/v1/memory/{botId}/search | Search by meaning |
| DELETE | /api/v1/memory/{botId}/people/{subjectId} | Forget everything about a person |
# Tell the bot something about a customer, from your backend
curl -X POST https://rylvo.com/api/v1/memory/bot_123/memories \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"scope": "person", "subjectId": "user_42", "text": "Upgraded to the Pro plan on 3 Oct 2026.", "kind": "event"}'
# What does the bot remember about their billing?
curl -X POST https://rylvo.com/api/v1/memory/bot_123/search \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"query": "billing and plan", "subjectId": "user_42"}'Use a key with memory:read or memory:write. With memory:read, bot-run replies also carry memory: the memories the bot was shown and what it changed. A full space answers 409; when long-term memory is off, writes answer 422.
Custom code
Run your own code at five points of every conversation — and, with a flow's Run code action, at any step of a flow (see Flow actions) — from the bot's Code tab (Test, then release): on your server — Rylvo POSTs JSON to your HTTPS endpoint, signed — or on Rylvo — you write a JavaScript module and Rylvo runs it in a sandbox (fresh per call, your time limit, 32 MB, fetch only to hosts you allow, secrets as ctx.secrets.NAME). Either way Rylvo uses what you answer. Every field of an answer is optional — an empty {} changes nothing.
| Stage | When | You may answer |
|---|---|---|
| on_session_start | First message of a conversation | context, instructions, state |
| before_turn | Every message, before the model | context, instructions, state, reply, block |
| retrieve | Every message, alongside the knowledge base | passages |
| after_turn | After the bot replies, before it's sent | reply, state, endConversation |
| on_session_end | A conversation ended (retried) | — (answer ignored) |
| flow_action | A flow step's “Run code” action (any number of these) | ok, error, unavailable, data, state, reply, goto, handoff |
context— facts the bot sees for this message (joins the run context);instructions— extra rules for this reply.state— tracked-detail values to save, as your systems (the API writer), e.g.{"plan": "pro"}.reply— answer yourself (no model call) or, after the turn, replace the bot's reply;block— refuse with your message.passages— up to 10{title, text, url?, score?}the bot grounds its answer on, cited like knowledge-base excerpts.endConversation—trueor{"reason": "…"}: the person's next message starts a new conversation.
// What your endpoint receives (before_turn)
{
"stage": "before_turn", "deliveryId": "msg_…", "test": false,
"bot": { "id": "bot_123", "name": "Support" }, "environment": "production",
"conversation": { "id": "conv_8f2a91", "channel": "widget" },
"person": { "id": "user_42" },
"message": { "text": "Where is my order A-1042?" },
"transcript": [{ "role": "user", "text": "Hi" }, { "role": "assistant", "text": "Hello!" }],
"state": { "session": { "order_id": null }, "person": { "plan": "free" } },
"context": { "page": "/orders" }
}Calls are signed with the bot's signing secret (one per environment, on the Code tab) using the Standard Webhooks scheme — webhook-id, webhook-timestamp, webhook-signature — so any Standard Webhooks library verifies them. Answer within the stage's time limit (500 ms–10 s); when your endpoint fails, the bot carries on without it, or — if you chose so for before/after — sends your fallback message. Internal addresses are never called. Every call shows as a “Your code” step in the trace.
// On Rylvo: the whole stage is this module
export default async function (event, ctx) {
const r = await fetch("https://api.yourshop.com/orders?person=" + event.person?.id, {
headers: { authorization: "Bearer " + ctx.secrets.SHOP_KEY },
});
const [order] = await r.json();
return order ? { context: { order_status: order.status, eta: order.eta } } : {};
}On your server, verify the signature first:
import { Webhook } from "standardwebhooks";
const wh = new Webhook(process.env.RYLVO_SIGNING_SECRET); // whsec_…
app.post("/rylvo/stage", express.raw({ type: "application/json" }), (req, res) => {
const event = wh.verify(req.body, req.headers); // throws if forged or stale
if (event.stage === "before_turn" && /order/i.test(event.message.text)) {
const order = lookUpOrder(event.person?.id);
return res.json({ context: { order_status: order.status, eta: order.eta } });
}
res.json({});
});Sessions API
A bot's conversations, for your backend: list and search them — by person, by whether they've ended, or by their tracked details — read one with its transcript, end one, or fork one into a copy to continue from. Use an API key with the sessions:read or sessions:write scope; a key restricted to one bot reaches only that bot.
| GET | /api/v1/sessions?botId=… | Newest first; endUserExternalId, status=open|ended, state.<key>=<value>, limit, before |
| GET | /api/v1/sessions/{sessionId}?botId=… | The conversation and its transcript |
| POST | /api/v1/sessions/{sessionId}/end | End it; the person's next message starts a new one |
| POST | /api/v1/sessions/{sessionId}/fork | A copy with the transcript and tracked details |
# Open conversations about a refund
curl "https://rylvo.com/api/v1/sessions?botId=bot_123&status=open&state.issue_type=Refund" \
-H "Authorization: Bearer YOUR_API_KEY"
# End one, leaving a note the next conversation can carry
curl -X POST https://rylvo.com/api/v1/sessions/conv_8f2a91/end \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"botId": "bot_123", "note": "Refund issued; tracking number sent."}'
# Fork it from an earlier point to try a different reply
curl -X POST https://rylvo.com/api/v1/sessions/conv_8f2a91/fork \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"botId": "bot_123", "throughMessageId": "m_41", "stateRevision": 3}'A fork has no channel of its own, so nothing reaches anyone until you send a message to it with bot-run and its sessionId — with the same end user it then becomes their current conversation. Ending is idempotent; the note becomes the close summary, carried into the next conversation when the bot's continuity is "profile + summary".
DatasetsDashboard-only
Datasets are curated collections of traces or end-user profiles for analysis, review, and team collaboration. Manage from Dashboard → Datasets.
Trace datasets
Pin canonical traces into a shared collection for debugging, regression testing, or qualitative review.
- Pin from the Traces page or browse unpinned traces inside the dataset
- Trace source:
canonical,legacy, ordashboard - Inline trace replay + detail drawer
- Shared comment thread with the Traces page
- Soft-archive or hard-delete a dataset
People datasets
Group end-user profiles for segmentation, cohort review, or export.
- Collect end-user profiles from Audience
- Read-only detail view per profile
- Reuse for broadcast audience targeting
Retention & quotas
| Plan | Max datasets | Max preserved traces |
|---|---|---|
| Free | 1 | 50 |
| Starter | 1 | 200 |
| Lite | 10 | 5,000 |
| Pro | 50 | 25,000 |
| Enterprise | ∞ | ∞ |
Permissions
- Viewer+ — view datasets
- Operator+ — create, edit, archive, pin/unpin traces
- Admin — hard-delete dataset and all pinned items
Deleting a dataset removes the pins and the dataset doc. Pinned traces themselves are then subject to the normal org retention policy, so delete carefully.
Email DeliveryDashboard-only
Rylvo handles its own transactional emails (welcome, team invites, scheduled reports, operational alerts) automatically. Templates are branded and theme-aware - there is nothing for you to set up.
To send your own emails on workflow events (e.g. notify a human when a session escalates), use an Event Connector or add an Email channel in Automation.
OAuth ClientsDashboard-only
Server-to-server OAuth 2.1 authorization server for MCP (Model Context Protocol) client authentication. Enables AI editors (Claude Code, Cursor, Windsurf, Zed) to authenticate with Rylvo and access the MCP tools API. Implements RFC 6749, 7636 (PKCE), 7591 (DCR), 7009 (revocation), 7662 (introspection), 8414 (metadata), 8707 (audience binding), 9728 (protected resource). Manage from Dashboard → Integrations.
Client registry document
clientId: "client_" + 12 random base64url charsclientName(1-200),redirectUris[]grantTypes: authorization_code, refresh_tokentokenEndpointAuthMethod: none | client_secret_postclientSecretHash: SHA-256 hash (null for public clients)- Global collection (not org-scoped); plaintext secret never persisted
Client types & secret management
- Public (PKCE-only): no secret issued,
authMethod="none" - Confidential: 32-byte random base64url secret,
authMethod="client_secret_post" - Secret returned ONCE at DCR response; only SHA-256 hash stored
- Constant-time comparison (
timingSafeEqual) prevents timing attacks
Grant types & token flow
- Authorization Code (PKCE required): authorize → consent → token exchange
- Refresh Token Rotation: atomic Firestore transaction (revoke old, issue new)
- Org ID embedded in self-describing token:
rfr_{base64url(orgId)}~{random} - CSRF protection: HMAC-SHA256 on consent form
Token lifetimes
- Access token: 24 hours (RS256 JWT, aud-bound to
https://rylvo.com/mcp) - Refresh token: 30 days sliding window (rotated on each use)
- Refresh token family ceiling: 365 days absolute
- Authorization code: 10 minutes
Scopes (3)
rylvo:read— view bots, analytics, conversations, KBrylvo:write— create/update bots, prompts, knowledge, settingsrylvo:admin— manage org settings, members, integrations- Default: "rylvo:read rylvo:write"
Security features
- RS256 JWT signing with key versioning (OAUTH_JWT_PRIVATE_KEY_PEM in prod)
- PKCE S256 required (plain rejected in production)
- Audience binding (RFC 8707) prevents confused-deputy attacks
- Environment binding: a grant authorizes one environment, chosen at consent and carried in the token; refresh cannot re-negotiate it
- Headers: HSTS, X-Frame-Options DENY (widget excepted), CSP report-only
- Revoked JTI tracking: Firestore + in-memory LRU (max 10k)
Caching strategy
- Client metadata: 5 min TTL, max 5,000 entries
- JWT validation: negative (5s spam) + positive (2s revocation-aware), max 10k each
- Firebase session: 30s TTL, max 2,000 entries
- JTI revocation: in-memory LRU, max 10,000 entries
RBAC & plan limits
oauthClients.view— viewer+ (all members)oauthClients.revoke— admin+ (admin or owner)- OAuth collections are server-only (Admin SDK writes)
- NOT plan-gated — available to all plans (free → enterprise)
- Revocation filters
oauthRefreshTokens.clientIdper collection — automatic single-field index covers it
API endpoints (OAuth 2.1 standard)
- GET /.well-known/oauth-authorization-server — RFC 8414 metadata (30/min per IP)
- GET /.well-known/jwks.json — RFC 7517 JWKS
- GET /oauth/authorize — authorization endpoint (consent HTML, 30/min per IP)
- POST /oauth/authorize/consent — consent submission (15/min per user)
- POST /oauth/token — token endpoint (10/min per client_id)
- POST /oauth/register — Dynamic Client Registration (5/min per IP)
- POST /oauth/revoke — token revocation (10/min per IP)
- POST /oauth/introspect — token introspection (30/min per IP)
Dashboard: GET /api/v1/oauth-clients/{orgId} (list), POST /api/v1/oauth-clients/{orgId}/{clientId}/revoke (admin+).
Firestore shape
oauthClients/{clientId} (global, not org-scoped)
|- clientId, clientName (1-200), redirectUris[]
|- grantTypes[], tokenEndpointAuthMethod, scope
|- clientSecretHash (SHA-256 | null for public)
+- createdAt: number (unix seconds)
oauthAuthCodes/{codeHash} (keyed by SHA-256 hash)
|- orgId, userId, clientId, redirectUri, scope
|- codeChallenge, codeChallengeMethod
|- expiresAt (10 min TTL), used, consumedAt?
+- createdAt
environmentRoot(orgId, environment)/oauthRefreshTokens/{tokenHash}
organizations/{orgId}/oauthRefreshTokens/{tokenHash} (unbound legacy)
|- userId, clientId, scope
|- environment: test | production | null (grant binding)
|- expiresAt (30d sliding), familyMaxExpiresAt (365d ceiling)
|- revoked, revokedAt?
+- createdAt
Token format: rfr_{base64url({o:orgId,e:environment})}~{random}
organizations/{orgId}/oauthRevokedJtis/{jti}
|- revokedAt
+- expiresAt (24h, access token TTL)
TTL policies REQUIRED: authCodes (10m), refreshTokens (30d), revokedJtis (24h)Webhook Connectors
Connectors let Rylvo call your systems during workflow execution. Register webhook endpoints for tool calls, state sync, or event notifications - Rylvo handles auth, retry, and signing.
Three connector types
Tool
Execute actions on your systems (create case, look up order, check inventory)
State Sync
Read/write workflow state from your DB before and after decisions
Event
Receive notifications on escalation, stage change, verification failure
Register a tool connector
curl -X POST https://rylvo.com/api/v1/connectors \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{
"company_id": "comp_001",
"connector_type": "tool",
"name": "Salesforce Case Creator",
"auth": {
"auth_type": "api_key",
"api_key_header": "X-Salesforce-Key",
"api_key_value": "your_salesforce_api_key"
},
"tool_config": {
"tool_name": "create_salesforce_case",
"tool_description": "Create a case in Salesforce",
"input_schema": { "type": "object", "properties": { "issue_summary": { "type": "string" } } }
},
"endpoint": { "url": "https://your-app.com/rylvo/tools/create-case", "method": "POST" }
}'API endpoints
| Method | Path | Description |
|---|---|---|
| POST | /v1/connectors | Create connector |
| GET | /v1/connectors/{company_id} | List connectors |
| GET | /v1/connectors/{company_id}/{id} | Get detail |
| PATCH | /v1/connectors/{company_id}/{id} | Update (422 if it would leave an active connector unfinished) |
| DELETE | /v1/connectors/{company_id}/{id} | Delete |
| POST | .../{id}/activate | Activate (422 connector_setup_incomplete until its endpoint and key are set) |
| POST | .../{id}/deactivate | Deactivate |
| POST | .../{id}/test | Test endpoint |
| POST | /v1/connectors/generate-secret | Generate HMAC secret |
| GET | /v1/connectors/{company_id}/tools/available | List webhook tools |
7 authentication methods
11 subscribable event types
Send every lead to your CRM
When an assistant captures an email address or phone number, Rylvo records the lead, emails the workspace owners, and fires lead.captured to every event connector subscribed to it. Create an Event connector, tick Lead Captured, and paste the URL of a Zapier “Catch Hook”, a Make custom webhook, an n8n Webhook node or a GoHighLevel inbound-webhook trigger. Map the fields once; every new lead lands there as a contact.
{
"event_id": "evt_lead_…", // stable per lead — dedupe on it
"event_type": "lead.captured",
"bot_id": "…",
"data": {
"lead_id": "…",
"email": "casey@example.com",
"phone": null,
"name": "Casey Morgan",
"fields": { "email": "…", "full_name": "…", "need": "…" },
"first_message": "Do you do implants?",
"bot_name": "Acme Dental Assistant",
"channel": "widget",
"conversation_id": "…",
"lead_url": "https://rylvo.com/dashboard/leads",
"captured_at": "2026-09-23T10:00:00.000Z"
}
}Deliveries are signed (Standard Webhooks), retried, and replayable from the connector’s delivery log. Leads captured in the Test environment are never delivered.
Connector Python SDK
Typed convenience methods for all connector operations. Sync and async variants included.
from core.connectors.sdk import ConnectorSDK
sdk = ConnectorSDK(base_url="https://rylvo.com", api_key="rylv_...")
# Register a tool connector
connector = sdk.create_tool_connector(
company_id="comp_001",
name="Salesforce Case Creator",
endpoint_url="https://your-app.com/rylvo/tools/create-case",
tool_name="create_salesforce_case",
tool_description="Create a case in Salesforce",
auth_type="api_key",
api_key_header="X-Salesforce-Key",
api_key_value="your_salesforce_api_key",
)
# Test + activate
test = sdk.test_connector("comp_001", connector["connector_id"])
if test["success"]:
sdk.activate("comp_001", connector["connector_id"])
# List available tools
tools = sdk.list_available_tools("comp_001")
print(f"{tools['total']} webhook tools available")Async variant
from core.connectors.sdk import AsyncConnectorSDK
async with AsyncConnectorSDK(base_url="...", api_key="...") as sdk:
connector = await sdk.create_event_connector(
company_id="comp_001",
name="Slack Alerts",
endpoint_url="https://hooks.slack.com/...",
event_types=["workflow.escalation.triggered"],
)
await sdk.activate("comp_001", connector["connector_id"])Error handling
ConnectorNotFoundError(404)Connector does not existConnectorAuthError(401/403)Invalid or missing API keyConnectorValidationError(422)Invalid connector configurationConnectorSDKError(5xx)Base class for all SDK errorsChannelsDashboard-only
Multi-channel bot deployment configuration. 14 channel types supported — deploy your bot to website widgets, Beam links, WhatsApp, Slack, Telegram, Discord, MS Teams, Messenger, Instagram, SMS, LINE, Email, or custom webhooks. Multiple configs per bot are allowed, but only one enabled per channel type (a bot can have several live Beams). Includes health monitoring, secret encryption, webhook idempotency, and race-condition protection. Manage from Dashboard → Deploy. To share a bot as a private link with nothing to install, see Beam.
14 channel types
- widget — Website chat (origins, accent color, greeting, position, branding)
- whatsapp — Meta Cloud API (phoneNumberId, verifyToken)
- slack — (teamId, botUserId, signingSecret, channels[])
- telegram — (botId, webhookSecret, allowedChatIds, collectFeedback)
- discord — (applicationId, publicKey, guildId, commandName)
- msteams — (appId, appPasswordPrefix, tenantId)
- messenger — (pageId, verifyToken, appSecretPrefix)
- instagram — (igUserId, verifyToken, appSecretPrefix)
- sms_twilio — (accountSid, fromNumber, messagingServiceSid?)
- whatsapp_twilio — (same as SMS, connector adds whatsapp: prefix)
- line — (channelId, channelSecret, channelAccessToken, botUserId)
- email_inbound — (inboxAddress, fromAddress, replyMode, Resend)
- custom — (inboundSecret, label?)
- beam — a private chat link (see Beam)
Setup status state machine
- needs_setup → verified, deprecated (incomplete; cannot enable)
- verified → live, deprecated (test passed; can enable)
- live → verified, deprecated (enabled and receiving)
- deprecated → verified, needs_setup (restorable)
enabledonly allowed when setupStatus in [verified, live]- First successful test auto-promotes to live (if no sibling enabled)
One-enabled-per-type rule
- Enforced at API layer via Firestore transactions (
runTransaction) - On create/patch with enabled=true: query for existing enabled config with same botId + channelType
- Returns 409 Conflict if duplicate found
- Firestore rules enforce immutability of
botIdandchannelType
Health monitoring
- Status:
ok|error|idle - 3+ consecutive errors flips status to "error"
- Notification fanout on first error and at 3-in-a-row; 15-min cooldown
- Append-only event log (last 10 events, ring buffer) eliminates RMW hotspot
- Tracks inboundCount, outboundCount, errorCount, consecutiveErrors
Secret storage & redaction
- Full tokens in env vars (e.g.
TELEGRAM_BOT_TOKEN_{prefix}) - Encrypted tokens in Firestore as AES-256-GCM
v1:blobs - Token prefixes (first 8 chars) stored in plaintext for display
- GET responses strip encrypted fields before sending to client
- Resolution order: env var → encrypted Firestore → legacy plaintext
Webhook idempotency
- 24-hour fingerprint cache at
/dedup/{fingerprint} - Format:
{channel}:{platform_id}(e.g. telegram:12345) - Platform retries are safe — duplicates silently ack'd
- TTL: 24 hours (Firestore TTL policy)
Inbound webhook flow (14 steps)
- 1-4: Buffer body, parse, early ack, pre-config signature check
- 5-8: Kill switch, channel lookup, org suspension, per-org rate limit (60 cap / 120/min)
- 9-12: Post-config ack, parse to NormalizedInbound, session resolution, dedup check
- 13-14: Record inbound, execute bot turn + send reply (3-retry) + record outbound/error
- All synchronous within webhook request (15s timeout)
- Discord special case: returns type:5 (thinking) immediately, runs in background
RBAC & plan limits
channels.view— viewer+ (read)channels.manage— admin+ (create/update/delete)channels.test— operator+ (test connection)channels.rotate_secret— admin+ (rotate secrets)- No per-plan channel limits — unlimited per plan
- Health subcollection is read-only for clients (server-only writes)
API endpoints (BFF Next.js)
- POST /api/channels — create channel config (admin)
- GET /api/channels?orgId=…&botId=…&channelType=…&enabled=… — list (viewer)
- GET /api/channels/{configId} — get single (viewer)
- PATCH /api/channels/{configId} — update (admin)
- DELETE /api/channels/{configId} — delete (admin)
- POST /api/channels/test — test connection (operator)
Webhook endpoints: /api/channels/{telegram,whatsapp,slack,discord,sms,whatsapp_twilio,line,messenger,instagram,msteams,email_inbound,custom}
Firestore shape
{envRoot}/botChannelConfigs/{configId}
|- botId (immutable), botName, channelType (immutable)
|- enabled, requireExplicitConsent, defaultConsentScope
|- config: <channel-specific config object>
|- setupStatus: needs_setup | verified | live | deprecated
|- lastTestedAt?, lastVerifiedAt?, apiKeyId?
|- createdBy, createdAt, updatedAt
{envRoot}/botChannelConfigs/{configId}/health/main
|- status: ok | error | idle
|- lastInboundAt, lastOutboundAt, lastErrorAt
|- lastErrorMessage (500 chars max)
|- inboundCount, outboundCount, errorCount, consecutiveErrors
|- recentEvents[]: { ts, kind: inbound|outbound|error, summary } (last 10)
|- updatedAt, lastNotifiedAt?
{envRoot}/botChannelConfigs/{configId}/dedup/{fingerprint}
|- createdAt, expireAt (24h TTL)
{envRoot}/botChannelConfigs/{configId}/health/events/log/{docId}
|- (append-only event log, eliminates RMW hotspot)
{envRoot}/channelMediaAssets/{assetId}
|- expiresAt (max 30 days), GCS blob referenceBeam — share your bot as a linkDashboard-only
A Beam is your bot's own chat window at a private link, styled as your brand. There is nothing to install and no account to connect: send the link by email, put the QR code on a counter or a flyer, or hand it to a client to review the assistant you built for them. A Beam is a deployment channel, so it sits in Dashboard → Deploy beside the website widget and the messaging channels, and a bot can have several (one per client, campaign or event).
Create a Beam
- In Deploy, choose Add channel → Beam (or Add Beam under Setup guides).
- Pick the bot, give the Beam a name your team will recognise ("Acme — review", "Spring flyer"), and choose which version people talk to.
- Choose who can open it: anyone with the link, a passcode, or members only. The choice is saved before the link is shown, so a Members-only Beam is never open to the public.
- Choose a form to ask before the chat, from a template or none.
- It is live at once: copy the link from its Overview, or download the QR code. A new Beam that nobody has opened yet shows a short setup checklist there.
Test or Production
Every Beam serves one version of the bot. A Test Beam talks to the latest draft, so a client can try changes before you release them; it does not use one of your plan's places to deploy. A Production Beam talks to what customers get, the version you last released. You can move a Beam between the two later; the link stays the same.
Each Beam's pages
| Page | What you set there |
|---|---|
| Overview | The link and its QR code, how the Beam is set up in one line, whether it works and what to fix if not, and how it is being used. |
| Access | Who can open it (anyone with the link, a passcode, or members only), who can join a Members-only Beam, how people sign in, how long the link lives, the limits and message tiers, and what members can do for themselves. See Who can open it below. |
| Members, People or Visitors (route visitors) | Everyone who opened the link, with their answers, device, conversations, ratings and feedback. On a Members-only Beam this tab is named Members and also holds invites, access requests and access codes. Export them as CSV, or block someone. |
| Design | Title and subtitle, logo, brand colour, light / dark / automatic theme, font, corners, a window or full-screen layout, the backdrop (plain, tint, gradient or an image), the avatar, the greeting, up to 4 suggested questions, a header button ("Book a call") and a footer line with a link. The preview is exactly what visitors see. |
| Form (route intake) | The form before the chat (named Member form on a Members-only Beam, where it is the profile a member fills in once): required, optional (visitors may skip it) or off. Start from a template (Name & email, Client review, Lead capture, Beta tester, Event or QR code, Support) or build your own with up to 25 fields. See The intake form below. |
| Uploads (route attachments) | Whether visitors may send photos, voice notes and documents, the largest file (up to 20 MB), how many per message, the longest voice note, and whether the team keeps the files. See Image & Voice Intake. |
| Activity | Messages received, replies sent, errors, and messages dropped while it was switched off. |
| Settings | The internal name, the version that answers, alerts and leads, when to ask for feedback, resetting the link and deleting the Beam. |
The intake form
- Fields: short and long text, email, phone, number, web address, date, a dropdown, single and multiple choice, yes / no, a tick box, a hidden value, and an information block.
- Each field is required or optional on its own, and can have limits, a pattern (
ACME-####), its own error message and a default. - Show a field only when an earlier answer matches (for example, "Order number" only when the topic is Billing).
- Fill fields from the link:
?email=jane@acme.com&utm_source=flyerprefills the field with that key, and a hidden field records it. - The bot gets the answers as context, so it greets the person by name and does not ask again for what they typed. Link a question to one of the bot's Data Collection fields to save the answer there.
- A visitor who filled in the form can be saved to your Audience, and a form with an email or phone becomes a lead (Leads page and lead alerts).
- A browser that filled in the form before is welcomed back ("Continuing as Jane"): its earlier choices, numbers and dates are reused, and its name, email and phone are filled in to confirm.
- Save a form to reuse it on other Beams. Try as a visitor fills the form with sample answers and chats with the Test version, without touching your Audience or sending a lead alert.
Who can open it
The link is the key, so treat it like one. It carries only a random token: nothing about your workspace or bot. Under Access you choose who can open it:
- Anyone with the link: anyone with the link can chat, with no sign-in.
- Passcode: people type one shared passcode to chat. Share it apart from the link.
- Members only: only people you let in can chat. They sign in with their email. You turn on one or more rules for who can join: invited people, people who ask for access, email domains, access codes, or open sign-up.
The other pages of Access follow the same order. Sign-in sets how people sign in (an email sign-in code, Google, passkeys) and how long they stay signed in; on a link or passcode Beam it can also let guests sign in to keep their chats. Limits caps the people, the messages one person may send and the messages the Beam takes per day, and holds message tiers. Features sets what a signed-in person can do for themselves. The link can also end: set Link life to never, or to a date up to five years ahead, after which the link shows a closed page.
Under Settings you name the Beam for your team, choose the version that answers, choose your alerts, and reset the link whenever it has gone somewhere it shouldn't: the old one stops working at once. Changes on Access and on Settings are saved with each tab's Save button.
Feedback (under Settings) chooses when "How was your chat?" (1 to 5) appears: when the chat winds down (the visitor says thanks or goodbye, or goes quiet after a reply; the default), after a set number of messages, or never. A low score can ask what could have been better. 👍 / 👎 can sit on the latest reply, on every reply, or be off.
A visitor sees a closed page when the Beam is switched off, past its expiry, full (people already in can continue), or when its bot cannot answer. On the Free plan the window carries "Powered by Rylvo"; on paid plans it shows only your brand.
Its replies in Traces
Every reply is in Traces under the version the Beam talks to: a Test Beam's in Test, a Production Beam's in Production. A visitor's 👍 or 👎 shows as Helpful or Not helpful on the reply in the list and on its Overview; the whole-chat rating is on the visitor, under Visitors.
Plan limits
Each Production Beam counts as one place to deploy, like the website widget or a messaging channel (Free 2, Starter 3, Lite 5, Pro 50, Enterprise unlimited). Test Beams are free.
Image & Voice IntakeDashboard-only
Customers can send photos, screenshots, documents and voice notes, and the bot reads and hears them. Extraction uses your plan's included AI replies or your own LLM key, like the rest of the intelligence layer — there is no extra charge beyond them.
A photo is either described as plain text, which is what you get when you switch images on, or read with a reading profile: you say which details to pull out of it — a serial number, a total, a date — Rylvo checks each one, and a flow can act on the result. See Reading profiles below and Flow actions.
Turning it on
It is off by default on every new bot. Open Bots → your bot → Media Input and switch on Accept images (the bot needs a model that can see images — its own, or one you pick as the vision model — and a key for it) and Accept audio / voice notes. Documents have no switch of their own: a bot accepts them whenever it accepts images. Set workspace-wide rules in Settings → Media Intake: which attachment types are allowed at all, the largest attachment and the longest recording, how hard personal data is scrubbed from extracted text (Standard, Strict or None), and Never store customer files. A bot can narrow what the workspace allows, never widen it.
Where it works
Every deployed channel — Telegram, WhatsApp (Cloud API and Twilio), Slack, Discord, MS Teams, Messenger, Instagram, LINE, SMS/MMS and inbound Email — plus the website widget, the dashboard chat, Beam links, and the attachments parameter on /v1/bot-run.
How each type is read
- Images and screenshots — a vision model transcribes visible text and describes what is in the picture. With a reading profile it returns the details the profile asks for instead.
- Voice notes — transcribed to text, then handled like any other message. Replies are text; the bot does not speak back. No reading profile reads a voice note.
- Documents — PDFs, Word, PowerPoint and spreadsheets are read from their own text layer, which is exact and needs no model. A scanned PDF has no text layer; see Formats and orientation below. A reading profile reads PDFs too, once Documents (PDF) is ticked under More options.
What each channel does
Every channel runs the same checks first (type from the file's own bytes, size, a security scan, location and device metadata removed). They differ in how the file arrives and whether Rylvo keeps a copy a flow can read again later.
| Where | How the file arrives | Kept so a flow can read it again? |
|---|---|---|
| Messaging channels (Telegram, WhatsApp, Slack, Discord, MS Teams, Messenger, Instagram, LINE, SMS/MMS, Email) | Rylvo downloads it from the platform. | Yes: stored before the bot's turn starts, for your plan's window (see below). |
| Website widget and /v1/bot-run | The bytes arrive in the request, as base64. Web links are never fetched. Up to 10 files of 25 MB each. On /v1/bot-run each file says what it is with a kind of "image", "audio", "document", "file" (a PDF is a document or a file). The kind is a hint: the type is read from the file's own bytes, and a file of a type Rylvo does not read is refused whatever its kind says. | Only when the bot has at least one reading profile, never with Never store customer files, and while the workspace is inside its daily allowance of kept files: the file is then written down once it has been read, the way a messaging channel's file is. The allowance grows with the plan, one conversation can take only a share of it, Settings → Media shows Photos kept today, admins are told once when a day's allowance first turns a file away, and it starts over at midnight UTC. Otherwise only the profile switched on as Use for every image can read it, because that read happens while the file is in hand. |
| Beam links | Read when the visitor uploads it, not when they press send, so the bot's reply does not wait for it. | Kept for the team unless the Beam or the workspace says not to. A file the visitor has not sent is discarded after a day. A Beam with no vision model it can reach reads the text in a picture by OCR instead; a reading profile needs the model. |
| Dashboard test chat | The file goes through the same checks and the same read. | Yes: written down before the read, exactly as a messaging channel's file is, in the Test environment. |
| Try it (profile editor) | The sample goes up with the request. | No: it is read from memory and never written down. |
Reading profiles
A reading profile is a named, reusable instruction for one kind of photo: what it should show, which details to pull out, and how sure the reader must be. It belongs to the bot — Bots → your bot → Media Input → Reading profiles, shown while Accept images is on — so it is released with the bot. A bot can have up to 10 profiles. Profiles are changed in Test and released to Production like the rest of the bot (Production shows them read-only), and only admins and owners can change them.
| Setting | What it does |
|---|---|
| Name | What you pick it by in a flow. Up to 60 characters. |
| What the photo should show | Tell the reader what to expect: where the number is, which one to use. Up to 2,000 characters. |
| Accept only if it is | A document-type check, such as “a product label or sticker”. The reader first judges whether the file is this kind of thing; anything else is turned away as wrong_type. Empty reads any file. Up to 200 characters. |
| What to read | One card per detail, up to 20, in the order the reader is asked. With none, the profile reads the text only. |
| How sure must the reader be? | A bar from 0 to 100% in steps of 5, with shortcuts Lenient (40%), Balanced (60%, the default) and Strict (85%). A read below the bar is unclear and hands back nothing. |
| If it can’t be read, say | What the customer is told when the photo is the wrong kind, unclear or missing something required (up to 300 characters). Left empty, the standard reply is used. The bot says it; a flow's own Reply action is fixed text. |
| Use for every image | A switch on each profile, one profile at a time. Every photo the bot receives is read with it instead of being described, and a photo that is not what Accept only if it is says is turned away. A flow can still read with any profile. |
| More options | Which kinds of file it reads (Photos by default, and Documents (PDF)); the model (Automatic is the bot's vision model, then its main model if it can see, then a vision model one of your keys can run); and Also keep everything printed on it, which hands the bot the full text as well as your fields (on by default). |
What to read: the fields
Each field has a label (its key follows it), a type, an optional Where to look clue (up to 300 characters, like “10 characters after S/N”), a save target, and two switches. A value that does not fit its type, or its pattern, is not accepted. Required makes the read not OK when the field cannot be read. Sensitive keeps the value out of the conversation, traces and transcripts, and the full text of the file is not kept; the value is saved only to its tracked detail. Save into a tracked detail names the bot's tracked detail of the same type that keeps the value, and a detail that is missing or of another type blocks the save. Values are kept exactly as read, even where the workspace hides personal details in other text.
| Field type | What counts as a value |
|---|---|
| text | Words and digits, up to 500 characters. May carry a pattern the whole value must match. |
| number | A number, or a plain numeric string such as 1,234.50. |
| boolean | True or false; yes and no are taken as well. |
| date | A real calendar date, saved as YYYY-MM-DD and nothing looser. |
| choice | One of 2 to 20 options you list, matched without regard to case and saved as you spelled it. |
A pattern (text fields only) is a JavaScript regular expression the whole value must match, up to 256 characters, so [A-Z0-9]{10} and ^[A-Z0-9]{10}$ mean the same. Patterns that can run very long are refused: no backreferences or lookbehind, no repeated group that can match in more than one way, and at most three open-ended repeats (*, +, {n,}).
Templates
A new profile can start from a template: Product label / serial number, Receipt or invoice, ID document (every field sensitive, full text not kept, 80% sure), Meter reading, Damage photo or Error screenshot — or Blank. A template fills in the whole profile and you can change every part of it. It names no tracked detail to save into: a field is pointed at one only where the bot already tracks a detail with the same key and type.
Try it
The profile editor has a Try it panel beside the form (a second tab on a phone). Choose a sample — a JPG, PNG, WebP or HEIC photo, or a PDF when the profile reads documents, up to 12 MB — optionally type the message a customer might send with it, and run it. It reads the sample with the profile as it stands in the form, unsaved, and shows what the file looked like, each field's value, how sure the reader was against your bar, the model, the cost, the time, and why a read was not OK. A try is a real read (on your included replies or your own key): it counts as one image (a repeat of the same sample is free, except for a profile with a sensitive field, which is never cached), and it saves nothing and writes no tracked detail. It works in Test, on a plan with media intake, for a role that can chat with bots.
What a read returns
Every read ends in one of these. When it is not OK the reason is the first of these that applies, in this order.
| Reason | What it means | What it hands back |
|---|---|---|
| ok | The file was read, it is the kind of thing the profile accepts, the reader was sure enough, and every required field was found and valid. | Every valid field. |
| unreadable | Nothing could be made out: the reader says the file is blank, cut off or too blurry, it did not answer in a form Rylvo can use, or your AI key cannot open the file's format (see Formats and orientation). | Nothing. |
| wrong_type | “Accept only if it is” is set and the reader says the file is something else. | Nothing. |
| unclear | The reader was less sure than the bar you set. A reader that reports no confidence counts as 0. | Nothing. |
| missing_fields | A required field was not found, or was found and failed its type or pattern. | The fields that were found, so the bot can say it has the serial and still needs the date. |
A field that was found but fails its type or pattern is dropped and reported; if the field is optional the read can still be OK. A read can also fail without a verdict on the file:
| Reason | What it means |
|---|---|
| declined | The file was refused on the way in: too big, a format Rylvo does not take, a failed security check, or images switched off. |
| no_attachment | A read was asked for and there is no file it can read: none was sent, it was never stored (see What each channel does), or it has expired. |
| not_configured | The profile does not read this kind of file (no profile reads a voice note), or there is no vision model with a key to run it. |
| error | The model provider failed or the period's media allowance is spent. Nothing was read. |
Without a flow step, the bot is given the result for that message inside the same fenced block as any text read from a file — the profile, the outcome and confidence, each field found (a sensitive one shows as withheld), what was not found, and the full text if it is kept — and told to say the profile's message when the read is not OK. The values are also saved: a flow's Read action saves the fields that have a save target, and so does the profile switched on as Use for every image, on any message and with no flow at all, when the read is OK. A clearer second photo replaces the first value; a value the tracked detail refuses is reported and the others are still saved.
Private files. While any profile of a bot has a sensitive field, that bot describes no photo or document in the chat: a plain description would carry the very text you marked private. The file is still received and a flow step can read it with its profile; a read made with any profile of that bot keeps no transcription. A field that saves into a sensitive or hidden tracked detail has to be marked sensitive itself, and a detail shared by everyone (the Everyone scope) is refused as a save target (the editor blocks it and the readiness check flags it): one customer's photo would change what every other conversation sees.
Formats and orientation
- JPEG, PNG, WebP and GIF are read as they come. TIFF and AVIF are converted to JPEG first (PNG where there is transparency).
- HEIC and HEIF — what an iPhone saves by default — are converted by Rylvo to an upright JPEG (the photo's own rotation is applied, and its location and device blocks are left behind) and read on any key, up to 25 megapixels, which covers every default iPhone photo. A larger one (the optional 48 MP “HEIF Max”) is read only when the vision call goes out on a Google AI key (a Gemini model reached through OpenRouter does not count); on any other key the customer is told it is too large. A damaged file is declined and the customer is asked to send it again as a JPG or PNG (on an iPhone: Settings > Camera > Formats > Most Compatible); when the server is busy they are asked to try again. The copy your team sees is the JPEG, not the HEIC. BMP cannot be read.
- Orientation — a phone does not turn the pixels when you hold it sideways; it writes a rotation into the file. Rylvo applies that rotation before the photo is read, then removes the metadata, so a sideways label is read upright.
- Size — the long edge is reduced to 2,576 pixels before a model reads it (a photo already within that is passed through untouched). A picture above 50 megapixels is turned away as too detailed.
- Scanned PDFs — a PDF with a text layer is read from it, with no picture involved. A scan has no text layer: a Google AI key is handed the file itself; on any other key the first 6 pages (fewer when your workspace allows fewer) are read as pictures, in one call, counted as one document of your allowance. Each page's picture is turned the way the page shows it. A scan whose pages hold no picture Rylvo can open (JPEG 2000, for example) is declined, and the customer is asked for a photo or screenshot of the page, as a JPG or PNG. At most 20 pages of a document are read.
- Text found inside a file is treated as data, never as instructions to the bot.
What is stored, and for how long
- Personal data is scrubbed from extracted text before it is stored or sent to a model, at the level set in Settings → Media Intake. Names are not removed — that needs name recognition we do not run. The values of a reading profile's fields are not scrubbed: they are what you asked for by name; mark a field Sensitive to keep it out of the conversation.
- The file — kept for your plan's window (Free 7 days, Lite 14 days, Pro 30 days, Enterprise 30 days), which a workspace can shorten but not lengthen. The window starts when the file is stored; Rylvo's copy and the text cached from it are removed when it ends. A file that arrives in the request itself (the widget, the API, a Beam) is not written down at all when Never store customer files is on: it is read in memory and dropped.
- The reading — cached against the file, the profile and the message typed with it, so the same photo sent again is not read, or charged, twice. Changing a profile's instructions, fields, confidence, model or Also keep everything printed on it reads again; changing its name, a field's save target or the decline message does not. A profile with a sensitive field is never cached, so a re-sent photo is read again.
- The values — saved by a flow's Read action into the tracked details you chose, under that detail's own rules for who may change it, how long it is kept and who sees it (see Tracked details). A sensitive value is masked in prompts, traces, the widget and API responses.
- A flow's record of the read — whether each action worked, its reason and confidence are kept with the flow's position for 90 idle days. The value of a sensitive field is never put there.
- When a person is erased — Audience → Forget or Delete, a Beam visitor's Erase and a GDPR request remove the files that person sent (from every channel), the readings cached from them and the values saved into their tracked details. Their replies in Traces carry the message they typed and the text read from any file. Forget and Delete remove them when Their replies in Traces is ticked in the dialog (it is, by default, in Production and in Test); a reply you keep stays on the person's page until you delete it in Traces. A Beam visitor's Erase and a GDPR request keep the replies and remove who they belonged to: the words in them stay.
Limits
- 25 MB per attachment, 50 megapixels per photo, 20 pages per document and 30 minutes per recording. A workspace can lower each in Settings → Media Intake. Long recordings may be answered in a follow-up message.
- Up to 10 reading profiles per bot and 20 fields per profile. A field's key is lowercase letters, digits and underscores (40 at most); a choice has 2 to 20 options of 60 characters at most; a value read is cut at 500 characters.
What it costs
Each plan includes a monthly allowance of images and voice minutes (see pricing). The extraction itself uses your included AI replies or your own key.
| Plan | Images a month | Voice minutes a month | Files kept for |
|---|---|---|---|
| Free | 100 | 30 | 7 days |
| Lite | 2,000 | 600 | 14 days |
| Pro | 20,000 | 6,000 | 30 days |
| Enterprise | unlimited | unlimited | 30 days |
- A read costs one image, whatever the profile asks for and however many fields it has. A photo and a scanned page each count as one; a document counts as one too, even when it is read from its text layer (that part makes no model call). Audio is billed in whole minutes, rounded up per clip.
- The same file sent twice, with the same profile and message, is only processed once; the repeat costs nothing.
- A bot reads each photo once when it arrives — with the profile switched on as Use for every image, otherwise as plain text — and a flow's Read action reads it again unless it uses that same profile, in which case the first read is reused. Setting the flow's profile as Use for every image makes it one read, and applies it to every image the bot receives.
- When the period's allowance is spent a read ends as
errorand the customer is asked to send text instead. - Each read's model cost is on its trace (Dashboard → Traces).
MCP HubDashboard-only
The MCP Hub is Rylvo's Model Context Protocol registry - a curated catalog of MCP servers your bots can use as tools. Manage from Dashboard → MCP Hub.
What you can do
- Discover & install MCP servers
- Connect external servers with HTTP, SSE, or stdio transports
- Store credentials securely (encrypted at rest)
- Allow specific servers per bot
- See invocation logs & per-server analytics
- Submit your own server for review
Built-in controls
- Approval workflow before a server can be used in production
- Outbound OAuth 2.1 (PKCE + DCR) for user-facing servers
- Cost tiers (low / medium / high) surfaced before invocation
- Health checks & auto-disable on repeated failure
- Resume tokens for long-running tool calls
Build Intelligence: You can also expose the entire Rylvo workspace as an MCP server to Claude Code, Cursor, Windsurf, Zed, or Codex. See the Build Intelligence section below or visit /build-intelligence.
Build IntelligenceDashboard-only
Build Intelligence lets AI editors and agents control Rylvo directly. Connect Claude Code, Cursor, Windsurf, Zed, or Codex CLI via MCP and give them 180+ tools to build bots, prompts, guardrails, skills, knowledge-base connections, connectors, channels, and more. Manage the connection from Dashboard → Build Intelligence or visit /build-intelligence.
Supported clients
- Claude Code — remote HTTP install command + /mcp authorization
- Cursor — mcp.json remote server configuration
- Windsurf — mcp_config.json remote server configuration
- Zed — context_servers settings entry
- Codex CLI — codex mcp add + codex mcp login
- Other Streamable HTTP clients — verify OAuth support with the client
Security model
- OAuth 2.1 with PKCE (S256) — browser flow on first install
- RS256 JWT access tokens, 24-hour TTL
- Refresh tokens rotate on every exchange
- Every call is org-scoped: token org_id must match the resource
- A leaked token can act only in its bound org until expiry or revocation
Install examples
# Claude Code
claude mcp add --transport http rylvo https://rylvo.com/mcp
# Then run /mcp inside Claude Code and authenticate// Cursor — .cursor/mcp.json or ~/.cursor/mcp.json
{
"mcpServers": {
"rylvo": { "url": "https://rylvo.com/mcp" }
}
}// Windsurf — ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"rylvo": { "serverUrl": "https://rylvo.com/mcp" }
}
}// Zed — settings.json
{
"context_servers": {
"rylvo": { "url": "https://rylvo.com/mcp" }
}
}# Codex CLI
codex mcp add rylvo --url https://rylvo.com/mcp
codex mcp login rylvo --scopes rylvo:read,rylvo:writeTool surface
| Resource | Read | Write | Delete |
|---|---|---|---|
| Bots | bots.list, bots.get | bots.create, bots.update | bots.delete |
| Prompts | prompts.list, prompts.get | prompts.create, prompts.update, prompts.set_optimization | prompts.delete |
| Guardrails | guardrails.list, guardrails.get | guardrails.create, guardrails.update | guardrails.delete |
| Tests | tests.list_cases, tests.list_runs, tests.get_run_results | tests.create_case, tests.run_suite | tests.delete_case |
| Connectors | connectors.list, connectors.get, connectors.activity, connectors.versions | connectors.create, connectors.update, connectors.activate, connectors.deactivate, connectors.test | connectors.delete |
| Channels | channels.list, channels.get | channels.create, channels.update, channels.register_webhook | — |
| MCP Servers | mcp_servers.list, mcp_servers.get | mcp_servers.register, mcp_servers.update | mcp_servers.delete |
| Skills | skills.list, skills.get | skills.create, skills.update | skills.delete |
| Knowledge Base | kb.list_connections, kb.get_connection | kb.create_connection, kb.update_connection, kb.add_source | kb.delete_connection |
| Agent Groups | agent_groups.list | agent_groups.create, agent_groups.add_bot | agent_groups.delete |
| Automations | automations.list_tasks, broadcasts.list | automations.create_task, broadcasts.create | automations.delete_task, broadcasts.delete |
Macro tools
scaffold_bot_from_description— create a bot + system prompt + starter guardrail from a briefclone_bot— duplicate a bot and optionally copy linked resourcesattach_mcp_server— register an external MCP server, write its tools, and link it to bots
Entitlements still apply: MCP does not bypass product access or quotas. Each tool action is checked against its scope, workspace permissions, plan availability, validation, and the same limits shown in Billing & Usage.
Workspace ArchitectDashboard-only
The Architect is a conversational setup agent that turns a plain-English brief into a working workspace: bots, prompts, guardrails, connectors, KB connections, evolution rules, and tests. It runs at /dashboard (Architect tab) and also powers natural-language edit mode and bot cloning.
8-phase agent loop
1. Intent
Capture goal, industry, tone, compliance constraints
2. Research
Pull org profile defaults, relevant industry templates, prior sessions
3. Blueprint
Propose bots + workflow + guardrails + KB + connectors
4. Review
User approves / edits the blueprint in natural language
5. Generate
Write prompts, guardrails, connectors, rules, KB stubs
6. Verify
Auto-run bot tests on the new bot(s) and score readiness
7. Apply
Commit as versioned resources, tagged source=architect
8. Handoff
Summarise what was built, link to Mission Control & Playground
Other architect capabilities
- Edit mode - change an existing bot with a sentence ("make it more empathetic, prefer email over phone")
- Bot cloning - duplicate a bot with modifications (industry, language, tone)
- Bot testing - architect can run tests and iterate until a readiness threshold is met
- Industry templates - 29 starting points (SaaS support, fintech KYC, healthcare intake, etc.)
- Org profile prefill - reuses defaults you set once in your organization profile
Knowledge BaseDashboard-only
Connect your data sources to Rylvo for grounded, evidence-backed decisions. The Knowledge Base offers eight available retrieval blueprints, from Classic RAG and Hybrid Search to Self-RAG, CRAG, and Agentic RAG.
How it works
Add a source
Upload documents, connect APIs, or point to URLs. 16 source types supported.
Pick a blueprint
Choose from eight available retrieval strategies, including Hybrid Search, HyDE, and Self-RAG.
Create a connection
A connection links a source to a blueprint with specific pipeline settings.
Query in playground
Test retrieval quality before going live. Tune chunking, reranking, and thresholds.
Built-in blueprints
Dashboard features
Connections
Create, monitor, pause, and delete knowledge base connections
Sources
Manage 16 source types - upload, cloud storage, SaaS, databases, API, web crawl
Blueprints
Pre-built and custom retrieval pipeline configurations
Playground
Test queries, inspect retrieved chunks, tune settings live
Performance
Retrieval quality metrics, latency, and hit rates
Settings
Auto-tune, chunking config, reranking, and threshold tuning
Retrieval stack
Vector store
Qdrant stores chunked embeddings. Keyword + semantic search are combined, then reranked for relevance.
BYOK decryption
If a source or org uses a BYOK provider key, it is decrypted at retrieval time before calling the embedding model.
Retrieval trace
Every KB call is recorded in the canonical observability store as one clean retriever observation per connection, with latency, score, and strategy.
Citations
Grounded answers include source references with chunk IDs so you can audit what the bot actually saw.
Self-RAG grading (opt-in)
TypeSafe Jev grades each retrieved passage relevant or not in one request and drops the rest; if it would reject every passage, all are kept. It adds a network round trip but no longer spends your model tokens. If Jev cannot answer, the LLM grader runs on your OpenAI key.
Conversation StorageDashboard-only
Bring Your Own Database (BYODB). Every conversation event Rylvo captures — each message, collected answer, checkpoint and session summary — is delivered to a database or webhook you own, so your conversations live permanently in infrastructure you control. Events go out on the delivery run every 15 minutes; with no connection yet, up to 500 wait for one. Manage from Dashboard → Conv. Storage.
Connections
Add one or more connections. Each receives the events you choose, from the bots you choose.
- PostgreSQL, Supabase, Neon, PlanetScale
- MySQL, Turso, MongoDB, Redis
- Webhook (none / API key / Bearer / HMAC auth)
- Credentials encrypted at rest; check a saved connection any time
Tables & columns
Each bot writes with a template — its tables, and the column each value goes in.
- Nine templates, or a connection's own columns and custom fields
- See exactly which columns every event writes
- Create the tables in one click, or copy the SQL — Rylvo never alters a table
Live saves, delivery history, failed events
Every conversation event by event, and every delivery with its result.
- Why anything is still waiting, per event
- Webhook retries within a run (0.5 s → 1 s → 2 s), then the next run
- Inspect the exact payload that was sent
- After 10 failed runs, events move to Failed events — replay or discard them
- Test and Production are separate — follow the environment switch
Retention
How long Rylvo keeps its delivery history (each record carries the event's content). Extend it with a retention add-on, or shorten it.
Production / Test isolation
Every storage event carries a source discriminator:channel (live), playground (dashboard chat), or test_suite (automated eval). Live traffic lands in Production and dashboard chats in Test — each with its own connections, queue and history. Every Conversation Storage page follows the environment switch.
Live (channel)
- Deployed-channel traffic: Telegram, WhatsApp, widget, API, etc.
- Writes to base tables (e.g.
rylvo_conversations) - Uses the production circuit-breaker key
- Counted against your plan's storage events
Test (playground)
- Dashboard Bot Chat / Group Chat turns
- Writes to suffixed tables (default
*_test) - Configurable per-target suffix or optional
testDatabaseName - Separate circuit-breaker key — missing test tables never affect live dispatch
- Webhook payloads include
sourceandisTest - Delivered only when Allow verified Test deliveries is on (Settings → Organization) — otherwise held, unbilled
Create the tables first. Rylvo only inserts rows; it never creates tables by itself. Each database connection's Tables tab has the exact statements — for Production, and in Test the matching *_test tables — and runs them with the saved credentials.
Your database is the source of truth. Rylvo's copy is an operational cache — not a backup. Add a connection to keep your conversations permanently in your own database. Extending Rylvo-side retention increases storage costs but does not replace your own database.
Audience HubDashboard-only
The central operator workspace for managing every end-user across every bot in your organization. Replace scattered user lists with a scalable hub: paginated people browsing, saved filter segments, aggregate analytics, consent governance, CSV import/export, and retention policy controls. Manage from Dashboard → Audience.
People
Paginated, server-driven list of end-users with 50-row default and 200-row maximum cursor pages.
- Filter by channel, consent scope, forgotten status, or free-text search
- Bot-scoped filtering with data-collection field predicates
- Full person page with Overview, Sessions, Profiles, Activity, and Audit tabs
- Bulk tags, consent, sessions, removal, export, merge, and eligible broadcast actions
- Anonymous widget captures and test identities stay separate from production People
- Keyboard shortcuts:
/search,j/knavigate,Enterinspect
Audience Rooms
Saved filter presets that act like persistent views. Create rooms for common cohorts and share them with your team.
- Save any filter combination as a named room
- Dirty indicator when current filters diverge
- Pins & Discussion panel per room
- Deep-linkable via
?room=URL param
Segments
Reusable filters that resolve into concrete member lists for broadcasts and exports.
- Basic predicates: all users, active within N days, by channel, min conversations
- Profile predicates: checkpoint achieved, field value, completeness threshold
- Live preview with match count before saving
- One-click link to bot broadcast tab
Insights
Cached aggregate analytics computed from a snapshot (6h TTL). Org-wide or bot-scoped.
- Onboarding funnel, channel mix, consent breakdown
- Engagement depth, activity recency, hour-of-day heatmap
- Field-fill rates, top tags, completeness histogram
- Bot leaderboard (org-wide only)
Imports & Exports
Bring legacy CRM contacts in and export segments for your data warehouse.
- CSV import wizard: upload → map columns → preview → commit (idempotent)
- Segment export to CSV (up to 5,000 rows)
- 15 MB file limit plus a plan-specific row limit
Consent & Privacy
Govern how end-user data is collected and retained.
- Consent scope tiles: none, short_term_only, personalize, full
- GDPR forgotten-users queue with deep-links
- Retention policy: effective days, shorten override, extend add-ons
- The scheduled retention sweep purges expired records
Profiles & Schema
Org-wide field catalog + per-bot schema cards. Spot naming drift before it ruins dashboards.
Settings
Retention policy, add-on tiers, and governance. Admin-only configuration.
People DatasetsDashboard-only
Named collections of end-users (not traces). Stored in the same datasets collection as trace datasets, discriminated by kind === "people". Created from Audience Room pins or directly from the People page. No retention/export-lock machinery (unlike trace datasets). Quota-enforced via maxDatasets plan limit. Manage from Dashboard → Datasets → People.
Dataset document
name(1-200 chars),description(max 2000)kind: "people" (discriminator; legacy docs without kind = "trace")peopleCount: denormalized end-user countretentionPolicy: { mode: "inherit" } (not enforced for people)archived: soft-delete flag
Item document
externalId(1-500 chars, end-user identifier)source: "audience_room" | "people_page"addedBy,addedByName,addedAtsnapshot: channel, displayName, consentScope, turnCount, lastSeenAtMs, firstSeenAtMs- Doc ID = externalId → add/remove is idempotent
Kind discriminator: people vs trace
- people: groups EndUserDoc profiles, no retention enforcement, no export lock
- trace: groups TraceView traces, active retention, export lock
- Both in same Firestore collection (
datasets) - Filtering:
.filter(r => r.data.kind === "people")
3 creation flows
- From Audience Room pins:
createPeopleDatasetFromRoomPins()— fetches all pins, source="audience_room" - From People Datasets page: create empty dataset, add people individually
- From People page:
addPeopleToDataset()bulk add, source="people_page"
Quota enforcement (maxDatasets)
- Free: 1 | Starter: 1 | Lite: 10 | Pro: 50 | Enterprise: unlimited (-1)
- Transactional count check (race-safe inside Firestore transaction)
- Archived datasets excluded from count; only kind="people" counted
- Error:
PlanAccessErrorcode="quota_exceeded", status 429
RBAC
- Read: any org member (viewer+)
- Create: operator+ (must set createdBy = auth.uid, name required)
- Update: operator+ | Archive: operator+
- Delete: admin+ (hard delete + all items in chunks of 500)
- Items: read = member; create = operator+; delete = operator+
Idempotent operations
- Add item: returns
{ added: false }if already exists - Remove item: returns
{ removed: false }if doesn't exist - peopleCount incremented/decremented atomically
- Cannot add people to archived dataset
Relationships & audit
- Audience Rooms: pins → dataset items via createPeopleDatasetFromRoomPins()
- Broadcasts: NOT currently used as broadcast targets (future: "dataset" target type)
- Audit: people_dataset.created / updated / archived / deleted / item_added / item_removed
- Resource type: "people_dataset"
API endpoints (Python FastAPI)
- POST /v1/people-datasets/{company_id} — create dataset (201, quota-checked)
- PUT /v1/people-datasets/{company_id}/{dataset_id} — update name/description
- POST /v1/people-datasets/{company_id}/{dataset_id}/archive — archive (soft-delete)
- DELETE /v1/people-datasets/{company_id}/{dataset_id} — hard delete + all items
- POST /v1/people-datasets/{company_id}/{dataset_id}/items — add person (idempotent)
- POST /v1/people-datasets/{company_id}/{dataset_id}/items/{external_id}/remove — remove person
All require authorize_org. Add item: external_id (1-500), source?, added_by, added_by_name, snapshot?.
Firestore shape
{envRoot}/datasets/{datasetId}
|- name (1-200), description (max 2000)
|- kind: 'people' (discriminator)
|- createdBy, createdByName
|- peopleCount: number (denormalized)
|- traceCount: 0 (not used for people)
|- retentionPolicy: { mode: 'inherit' } (not enforced)
|- tags: [], archived: boolean
+- createdAt, updatedAt: Timestamp
{envRoot}/datasets/{datasetId}/items/{externalId}
|- externalId (1-500), source: audience_room | people_page
|- addedBy, addedByName, addedAt
+- snapshot: { externalId, channel, displayName?,
consentScope, turnCount, lastSeenAtMs?, firstSeenAtMs? }
Quota: maxDatasets (Free: 1 | Starter: 1 | Lite: 10 | Pro: 50 | Enterprise: -1)
Count excludes archived; only kind='people' countedBroadcastsDashboard-only
Outbound multi-channel messaging — send the same campaign to WhatsApp templates, SMS, email, and in-app from one composer. Audience uploads (CSV / XLSX / paste), platform-derived rate caps, per-recipient delivery tracking, and audit-grade history are built in. Manage from Dashboard → Broadcasts.
5-step composer
Audience → Channels → Content → Schedule → Review. Platform rules are surfaced at audience-pick time, never at delivery time.
- 4 audience sources: saved segment, upload, paste, all past chatters
- Toggleable channels with per-channel rule annotation
- Template + LLM-enrichment + per-row variables
- One-time, recurring (hourly → monthly), or "Send now"
12 broadcast channels
Email, in-app, WhatsApp, SMS (Twilio), WhatsApp (Twilio), Telegram, LINE, Slack, Discord, MS Teams, Messenger, Instagram, Web Widget. Each annotated with cold-send verdict and platform cap.
- WhatsApp: approved-template picker synced from Meta Graph
- WhatsApp (Twilio): rides Twilio Programmable Messaging with
whatsapp:E.164 prefix - SMS: opt-in gated, Twilio REST direct from the dispatch route
- LINE: reply/push via LINE Messaging API; channel secret + access token encrypted at rest
- Telegram / Web Widget / Discord: cold-send blocked with explainer
Audience uploads
Server-parsed CSV / XLSX (SheetJS) and paste-list with classifier and dedupe. Up to 50k rows per upload; per-row variable columns merge into the template at send time.
- Auto-detect identifier kind: phone, email, channel id
- Warnings surfaced before commit
- Optional "save to audience" mirror into endUsers
Delivery tracking
Every recipient writes a botBroadcastDeliveries row: queued / sent / failed / skipped, plus provider message ids where available.
- Per-run doc with per-channel sent / failed / skipped counts
- History drawer groups deliveries by channel + status
- Audit log: broadcast.created / scheduled / deleted
Rate caps & safety
Token-bucket rate limiter per channel in the cron runner. Caps mirror documented platform ceilings so a hot run can't suspend the underlying account.
- WhatsApp: 4,800/min (~80/s/number, Meta default)
- SMS: 60/min (Twilio conservative)
- Operators can lower per-broadcast, never raise above platform cap
Capabilities & RBAC
Four capability keys gate the feature, mirroring the rest of the dashboard.
broadcasts.view— viewer+broadcasts.create— operator+broadcasts.send— admin+broadcasts.delete— admin+
API endpoints
- POST /api/bots/broadcasts/dispatch — per-recipient × per-channel dispatch (cron + ID token)
- POST /api/bots/broadcasts/generate-content — LLM enrichment (cron + ID token)
- POST /api/broadcasts/upload — CSV / XLSX / paste-list parser
- POST /api/broadcasts/recipients/save-to-audience — idempotent endUsers mirror
- GET /api/channels/whatsapp/templates?orgId=…&botId=… — Meta-approved template catalog
Firestore shape
{envRoot}/botBroadcasts/{broadcastId}
|- targets.type: "all" | "selected" | "segment" | "uploaded"
|- targets.uploaded.rows: UploadedRecipient[]
|- delivery.channels: BroadcastChannel[]
|- delivery.whatsappTemplate: WhatsAppTemplateRef | null
|- delivery.rateLimitPerMinute: number | null
+- deliveries/{deliveryId}
|- runId, channel, identifier, identifierKind
|- status: "queued" | "sent" | "failed" | "skipped"
|- providerMessageId, error
+- attemptedAt, deliveredAt
{envRoot}/botBroadcastRuns/{runId}
|- status: "success" | "partial" | "failed"
|- perChannelStats: { [channel]: { sent, failed, skipped } }
|- targetCount, sentCount, failedCount, skippedCount
+- generatedContent, errors[]Team & RBACDashboard-only
Role-based access control for every dashboard surface. Four ranked roles, email invitations, join requests, granular page-access grants, and ownership transfer. SSO / SAML and SCIM provisioning are available on Enterprise. Manage from Dashboard → Team.
Role hierarchy (ranked)
Four roles with strict rank-based enforcement. No action can target a member at or above your own rank.
- Owner (rank 3) — full access, billing, transfer ownership
- Admin (rank 2) — manage bots, keys, team, approvals, view audit log
- Operator (rank 1) — run bots, tests, interventions, approve requests
- Viewer (rank 0) — read-only dashboard access
Capability matrix (selected)
team.view— viewer+team.invite— admin+team.remove_member— admin+team.change_role— admin+team.transfer_ownership— owneraudit.view— admin+audit.export— admin+ (+ Pro plan)org.manage_sso— owner (+ Enterprise)
Invitations (email-based)
Admin+ invites by email. Plan limit enforced at invite and acceptance time, counting seats in use: agency delegates work on the agency's seats and are not counted against the client's limit. Deterministic invite ID from SHA256 hash. Rate limit: 10 invites/min.
- Default expiry: 7 days. Status: pending / accepted / expired / cancelled
- Atomic write: invitation + audit log + org usage counter in one transaction
- Acceptance: email must match, plan limit re-checked, member doc created
- Resend / cancel are admin+ actions, both audit-logged
Join requests (cross-org)
Non-members can request to join with a profile (role, workType, interests, useCase). Admins approve or deny with optional reason.
- Profile captures: founder / engineer / PM / designer / ops / analyst / other
- Work type: building agents, integrating API, managing workflows, analyzing data, exploring
- Audit actions: page_access.approved / page_access.denied
Page access grants
Granular elevation for two gated pages: audit_log and billing. Non-admins see a "Request Access" button.
- Request fans out in-app notification to all admins
- Approve → pageId added to member's pageAccessGrants array
- Deny → optional resolverNote. Revoke removes the grant
- Access: role grants capability OR explicit pageAccessGrant
Role change & removal
Cannot change own role, cannot act on same/higher rank, cannot assign above own rank. Removal is soft-delete only.
- Demotion enqueues durable outbox event for side-effects (API key revocation)
- Removal: status → "deactivated", revokes all API keys via outbox
- Ownership transfer: atomic swap, two audit entries, org.ownerId updated
- SSO/SAML: available on Enterprise; domain ownership enforced, break-glass required, enforcement server-side
- SCIM 2.0: user provisioning and deprovisioning; role writes refused, deprovision is a soft delete
API endpoints
- POST /api/team/invite — create email invitation (admin+)
- POST /api/team/invite/accept — accept invitation (any authenticated user)
- POST /api/team/members/{uid}/role — change member role (admin+)
- POST /api/team/transfer-ownership — transfer org ownership (owner only)
Firestore shape
organizations/{orgId}/members/{uid}
|- uid, email, displayName
|- role: owner / admin / operator / viewer
|- status: active / deactivated
|- pageAccessGrants?: ("audit_log" | "billing")[]
|- joinedAt, deactivatedAt?, deactivatedBy?
+- createdAt, updatedAt
organizations/{orgId}/invitations/{inviteId}
|- email, role, status, invitedBy, inviterName
|- expiresAt, acceptedAt?, emailStatus?
organizations/{orgId}/joinRequests/{requestId}
|- userId, userEmail, orgId, status, profile, requestedRole?
|- requestedAt, resolvedAt?, resolvedBy?, denialReason?
organizations/{orgId}/pageAccessRequests/{requestId}
|- pageId, requesterId, requesterEmail, status
|- requestedAt, resolvedAt?, resolvedBy?, resolverNote?Agency & Client WorkspacesDashboard-only
Agencies can operate many client workspaces without turning the agency workspace into one shared tenant. Every client keeps its own owner, team, resources, billing, audit history, and Test/Production environments. The partnership grants approved access; it does not move the client's data. Manage it from Dashboard → Clients & Partners.
Available on Pro and Enterprise
Both the agency workspace and the client workspace need Pro or Enterprise before managed access can become active. An agency on Free, Starter or Lite cannot send a request. A client on those plans can still inspect and decline one, but must upgrade before approving. Viewing, declining, ending, and revoking remain available on every plan.
Free / Starter / Lite agency
View and close records; cannot send requests.
Free / Starter / Lite client
View and decline; cannot approve.
Pro / Enterprise on both
Full request, approval, delegation, switching, and revocation flow.
Why Test and Production show the same page
The agency–client relationship belongs to the whole workspace, so /dashboard/test/clients and /dashboard/production/clients intentionally resolve to one canonical Clients & Partners screen. This does not combine the client's environments. After a delegate opens the client workspace, the environment selector still determines whether they are working with Test or Production resources and runtime data.
1. Client shares its workspace ID
- The client remains a completely separate Rylvo organization
- The workspace ID identifies the destination; it grants no access by itself
- The client owner, direct members, resources, and data do not move
2. Agency requests exact access
- An agency admin selects the exact teammates to delegate
- Each delegate receives admin, operator, or viewer access
- The request can include a note and commercial relationship
3. Client owner approves
- Nothing is granted while the request is pending
- Only the client owner can approve or decline
- Approval rechecks both plans, delegates, and direct-member collisions; it needs no free client seat
4. Delegates work inside the client
- Open client uses the normal workspace switch and hard reload
- Normal client RBAC, plan limits, and environment boundaries still apply
- Every delegated membership records its agency and relationship provenance
Governance stays with the client
- Delegated admins can build and deploy, but cannot govern the client workspace
- Client team, ownership, organization settings, billing, and partnerships are blocked
- Existing direct client memberships are never downgraded or reclassified
Billing and safe revocation
- The client owns its subscription, wallet, transactions, usage, and entitlements
- The commercial mode records the business arrangement; it does not weaken isolation
- Ending the partnership removes delegated access and keys without deleting client data
- Voluntary downgrades below Pro are blocked until live relationships are closed
- Forced entitlement loss auto-ends the link and preserves all client-owned data
Relationship lifecycle
pending_client_approval → active → ended
↘ declined
declined / ended → pending_client_approval (new request revision)
Pro/Enterprise entitlement lost → ended + delegated access revokedDashboard API routes
- GET /api/agency/portfolio?orgId=… — relationship summaries (current-org admin+)
- POST /api/agency/relationships — request access (agency admin+ and Pro/Enterprise)
- POST /api/agency/relationships/{id}/respond — approve (client owner and Pro/Enterprise) or decline (client owner on any plan)
- DELETE /api/agency/relationships/{id} — end and revoke (agency admin+ or client owner)
Control-plane shape
agencyClientRelationships/{sha256(agencyOrgId:clientOrgId)}
|- agencyOrgId, clientOrgId, relationshipId, revision
|- status, delegates[], commercialModel, requestMessage?
|- requestedBy/At, approvedBy/At?, declinedBy/At?, endedBy/At?
+- server-owned: no direct browser reads or writes
organizations/{clientOrgId}/members/{delegateUid}
|- membershipKind: "agency_delegate"
|- agencyOrgId, agencyRelationshipId
|- role: admin | operator | viewer
+- delegatedAt, delegatedByAudit LogDashboard-only
Immutable, tamper-evident audit trail for every material action across the platform. 200+ action types, two-stage outbox write with HMAC-SHA256 integrity signatures, cursor pagination, and CSV export. Manage from Dashboard → Audit Log.
Two-stage write pattern
Every mutation stages an audit event into the outbox in the same Firestore transaction — atomicity is guaranteed. A Cloud Function drains the outbox into the canonical, read-only audit log.
- Stage 1: auditOutbox (transactional, same batch as mutation)
- Stage 2: auditLog (durable, read-only, drained by worker)
- HMAC-SHA256 integrity signature on every outbox doc
- Both web (Admin SDK) and Python API write through the same pipeline
Action catalog (200+)
Covers every material action: team, API keys, org, bots, workflows, prompts, tests, edge cases, guardrails, KB, traces, mission control, evolution, automation, MCP Hub, skills, audience, broadcasts, connectors, auth, and setup sessions.
- 40+ resource types (member, bot, prompt, guardrail, trace, broadcast…)
- Each entry: actor, action, resourceType, resourceId, details, IP, UA, source
- Source discriminator: web / api / mcp / system
Filtering & search
Filter by action, resourceType, resourceId, source, date range, actor email, and actor name. Full-text search across all fields including details JSON.
- Cursor-based pagination (opaque cursor: timestamp + docId)
- Default 25/page, max 500/request
- Rate limit: 120 req/min per IP on the BFF endpoint
Export & compliance
CSV export with all fields. Gated by capability and plan.
- Columns: id, timestamp, actorName, actorEmail, actorId, action, resourceType, resourceId, details
- Requires
audit.export(admin+) AND Pro+ plan - Audit logs are immutable once canonicalized
- Retention follows org-specific policy; GDPR purge via observability endpoints
RBAC
View and export are separately gated. Non-admins can request access via the page-access grant system.
audit.view— admin+ OR pageAccessGrants: ["audit_log"]audit.export— admin+ AND Pro+ plan- Non-admins see "Request Access" on the audit-log page
Integrity & security
HMAC-SHA256 signature on every outbox doc prevents tampering. Firestore rules block direct writes to auditLog.
- Signed fields: idempotencyKey, action, resourceType, resourceId, actor, details, source
- Canonical JSON with sorted keys
- No direct client writes to auditLog — all go through outbox staging
- Reader handles both nested actor objects and flat legacy fields
API endpoint (BFF)
- GET /api/audit?orgId=…&action=…&resourceType=…&startDate=…&endDate=…&q=…&actorEmail=…&actorName=…&cursor=…&limit=… — list audit entries
Auth: Firebase ID token (Bearer). Response: { orgId, total, records[], nextCursor }. Cache-Control: private, max-age=5, stale-while-revalidate=30.
Firestore shape
organizations/{orgId}/auditOutbox/{docId} (transient staging)
|- idempotencyKey, action, resourceType, resourceId
|- actor: { uid, email, displayName }
|- details: { schemaVersion, ...custom }
|- ipAddress, userAgent, source
|- processed: boolean, processedAt, error, retryCount
|- stagedAt, stagedBy, integrity (HMAC-SHA256)
organizations/{orgId}/auditLog/{docId} (canonical, read-only)
|- idempotencyKey, action, resourceType, resourceId
|- actor: { uid, email, displayName }
|- details: { schemaVersion, ...custom }
|- ipAddress, userAgent, source
+- timestamp: Timestamp
Indexes required:
auditOutbox: (processed, stagedAt)
auditLog: (action, timestamp desc), (resourceType, timestamp desc),
(source, timestamp desc), (timestamp desc, __name__ desc)API KeysDashboard-only
Org-level API key generation, management, and revocation with environment scoping, permission scopes, rate limit overrides, and SHA-256 hashing. Keys authenticate external API requests (bot-run, KB query, KB documents). Manage from Dashboard → API Keys.
API key document
name— human-readable labelkeyPrefix— first 12 chars for displaykeyHash— SHA-256 of raw key (never store raw)environment— production | test (legacy staging/development map to test)permissions— API scopes arrayrateLimitOverride— calls/min (null = default 60)botId— optional bot binding
Key generation & hashing
- Format:
rylv_{40 hex chars}(46 chars) - Entropy: 20 bytes = 160 bits (
crypto.getRandomValues) - Hashing: SHA-256 via Web Crypto API
- Only hash persisted; raw key shown once at creation
- Prefix (first 12 chars) stored for display identification
Permission scopes (5 + 2 wildcards)
respond— POST /api/v1/bot-run + widget-pollkb:read— POST /api/v1/kb/querykb:write— POST /api/v1/kb/documentstests:read— POST /api/v1/tests/gatetrace.read— reserved for future*— full access |kb:*— all KB- Normalization drops unrecognized scopes; defaults to ["respond"]
Authentication flow
- Headers:
Authorization: Bearer|X-API-Key|X-Rylvo-Key - SHA-256 hash raw key, collection-group query by keyHash
- Verify status == "active", extract orgId from path
- Async update lastUsedAt (non-fatal if fails)
- Returns AuthIdentity with permissions + rateLimitOverride
CRUD operations
- create: generate + hash + normalize, batch write (doc + counter + audit)
- list: filter by status, ordered by createdAt desc
- update: name, environment, permissions, botId + audit
- revoke: status → "revoked", decrement counter + audit
- revokeAllForMember: bulk revoke on member removal
- hardDelete: physical deletion (provisioning rollback)
Rate limiting
- Default: 60 calls/minute per key
- Override via
rateLimitOverridefield - Token bucket via
consumeTokenUnified() - 429 response with
Retry-Afterheader - Per-route buckets (bot-run, kb/query, etc.)
RBAC & plan limits
apiKeys.view— admin+apiKeys.create— admin+apiKeys.revoke— admin+- Free: 0 | Starter: 0 | Lite: 10 | Pro: 25 | Enterprise: unlimited
- A key a Free workspace already holds keeps working; only creating a new one is refused
- Quota enforced in Firestore rules (
withinApiKeyQuota) - Non-admins see RestrictedPlaceholder
Audit & cleanup
- Events: api_key.created / updated / revoked (with actor, IP, UA)
- Bulk revoke logs { count, memberUid }
- Bot deletion: hard-deletes bound keys, decrements active count only
- Workspace Architect: auto-creates key with default permissions, rollback via hardDelete
- Migration route: normalizeApiKeyPermissions backfill (idempotent)
API endpoints (BFF)
- POST /api/v1/bot-run — execute bot turn (permission: respond, idempotency replay)
- POST /api/v1/kb/query — query KB (permission: kb:read)
- POST /api/v1/kb/documents — upload documents (permission: kb:write, max 100)
- POST /api/v1/tests/gate — release gate for CI (permission: tests:read)
Auth: API key via Bearer / X-API-Key / X-Rylvo-Key header. Rate limited per key.
Firestore shape
{envRoot}/apiKeys/{keyId}
|- name, keyPrefix (12 chars), keyHash (SHA-256)
|- environment: production | test (legacy: staging, development map to test)
|- permissions: string[] (respond, kb:read, kb:write, trace.read, *, kb:*)
|- status: active | revoked
|- rateLimitOverride: number | null (calls/min)
|- botId?, botName?
|- createdBy, createdAt
|- lastUsedAt?, revokedAt?, revokedBy?
Quota: usage.apiKeyCount vs settings.maxApiKeys
Free: 0 | Starter: 0 | Lite: 10 | Pro: 25 | Enterprise: -1 (unlimited)ApprovalsDashboard-only
Human-in-the-loop approval workflow for tool execution. Two systems: connector tool approvals (API-level, for webhook/connector tools with requires_approval flag) and MCP tool approvals (MCP Hub, for tools with require_approval permission). Mission Control adds urgency-based timeouts and risk scoring. State machine: pending → approved / denied / expired.
Connector tool approval
- Triggered when tool has
safety_restrictions.requires_approval = True approval_idformat:aprv_{tool_call_id}- Default TTL: 24 hours (86400s)
- Fire-and-forget: tool returns failure with approval_id immediately
- Bot/frontend polls status separately; no auto re-invoke on approval
MCP tool approval
- Permission levels:
allow|require_approval|deny - Risk-based defaults: low/medium → allow, high/critical → require_approval
- Default TTL: 10 minutes (600,000 ms)
- argsPreview (redacted JSON, max ~2KB) + optional llmRationale
- Real-time Firestore subscriptions for pending approvals
State machine
- pending → approved (via service.approve)
- pending → denied (via service.deny with reason)
- pending → expired (auto-expiry when TTL elapses)
- Only pending → approved/denied allowed (idempotent)
- Double-approve/deny returns None (already resolved)
- Mission Control adds:
auto_deniedstatus
Mission Control urgency levels
- immediate — 15s timeout, low-risk informational
- standard — 120s timeout, data access / PII-related
- extended — 900s timeout, financial / legal / compliance
- Expiry computed server-side (createdAt + timeoutSeconds)
- Includes riskScoreAtTime + riskSignals[] + conversationContext
ApprovalService methods
request_approval()— create pending, persist, log eventapprove()— verify pending, update, log, idempotentdeny()— verify pending, update + reason, log, idempotentlist_pending()— query + filter expired + log stale
Expiration & cloud functions
- cleanupExpiredMcpApprovals — every 5 min, MCP approvals past TTL
- missionControlExpireApprovals — every 2 min, MC approvals past timeout
- Both write audit entries for system-initiated expiry
- Frontend polling: 1-30s exponential backoff, 5-min local timeout
RBAC
- Connector approvals: read = admin+; write = server-only (rules: false)
- MC approvals: read = member; create/update = operator+; delete = admin+
- MCP approvals: read = member; create/update = operator+; delete = admin+
resolve_approvalcapability: operator+ (Mission Control)- MCP Hub Approvals page: admin+ for approve/deny buttons
Audit & analytics
- MC expiry writes audit: eventType "approval_resolved", actor "system_sweep"
- Analytics: MCApprovalResolvedEvent { request_id, bot_id, action_type, resolution, response_time_ms, urgency }
- Audit log: approval.requested / approved / denied / expired / resolved
- Idempotency key on MC approvals for exactly-once semantics
API endpoints (Python FastAPI — connector approvals)
- POST /v1/approvals/{approval_id}/approve — approve (query: approver_email?)
- POST /v1/approvals/{approval_id}/deny — deny (query: reason?, approver_email?)
- GET /v1/approvals/pending?company_id=…&bot_id=…&session_id=… — list pending
GET pending requires authorize_org. 404 if not found or already resolved. MCP approvals managed via dashboard at /dashboard/mcp-hub/approvals.
Firestore shape
{envRoot}/approvalRequests/{approvalId} (connector + Mission Control)
|- approval_id (aprv_{tool_call_id}), tool_call_id, tool_name
|- arguments: dict, status: pending | approved | denied | expired
|- company_id, org_id, bot_id?, session_id, workflow_id?
|- requested_at, expires_at (24h default)
|- resolved_at?, resolved_by?, denial_reason?
|- trace_id, request_id
|- (MC) urgency, timeoutSeconds, riskScoreAtTime, riskSignals[]
|- (MC) conversationContext, idempotencyKey?
+- created_at: Timestamp
{envRoot}/mcpApprovalRequests/{requestId} (MCP Hub)
|- requestId, serverId, serverName, toolId, toolName, toolDisplayName
|- botId, botName, conversationId?, requestedBy, requestedByDisplay?
|- argsPreview (redacted, ~2KB), llmRationale?
|- status: pending | approved | denied | expired
|- reviewedBy?, reviewedByDisplay?, decisionReason?
|- expiresAt (10 min default), reviewedAt?
+- createdAt, updatedAt: TimestampNotificationsDashboard-only
Unified notification system with 60+ types across 8 categories. In-app notifications delivered via real-time Firestore subscriptions; email via Resend; webhook dispatch to Slack/Discord/Teams. Unified inbox hook merges mentions + in-app alerts across all orgs. Manage from Dashboard → Notifications.
In-app notification document
userId(recipient),orgId,typetitle,message,link?data?: Firestore primitives (string | number | boolean)read: boolean,readAt: Timestamp | null
Trace comment mention document
recipientUid,type(trace_mention | comment_reply | room_mention | pin_mention)payload: commentId, entityType, entityId, entityLabel, actorUid, actorName, snippet (~120 chars)- Optional: parentRoomId, traceId, traceSource, traceLabel
77 types across 8 categories
- billing (19): credits_low, quota_exceeded, subscription_*, billing_addon_*, referral_reward
- mission_control (20): alert_rule_triggered, channel_error, byok_unhealthy, approval_requested, bot_budget_*
- team (15): join_request, member_joined, page_access_*, member_role_changed
- system (12): welcome, onboarding_step, kb_indexing_*, bot_deleted, bot_import_completed, bot_import_needs_attention, timezone_unset
- retention (4): retention_warning, retention_deleted, dormancy_*
- edge_cases (4): edge_case_alert, guardrail_triggered, red_team_run_complete, fix_proposal_applied
- broadcasts (2): broadcast, broadcast_failed · evolution (1): evolution_alert
Delivery channels (4)
- In-app: real-time Firestore subscriptions (<100ms)
- Email: Resend (mention emails, welcome; per-member opt-in)
- Webhooks: Slack, Discord, Teams, generic (2 retries, 500ms backoff, 8s timeout)
- Bot tools:
send_notification__{slug}__{id}runtime tools (best-effort)
Real-time unified inbox
useNotificationInbox(): merges mentions + in-app, scoped to the active org- Parallel per-org Firestore subscriptions; other workspaces surface as unread counts + switch affordance
- Exposes: items[], unreadCount, otherOrgUnread[], loading, markItemRead, markAllRead, deleteItems
- Max 100 per org per subscription
Lifecycle & triggers
- Created (read=false) → Mark Read → Delete (hard-delete)
- Mark all read: capped at 200 docs per call
- Triggers: guardrail escalations, degraded attachments, observability alerts, join requests, broadcasts, mentions, welcome
- Engine triggers are fire-and-forget post-hooks (never block bot response)
Notification channels (Mission Control)
- Types: slack, email, webhook, discord, teams
config: webhookUrl?, emails?, headers?events[]: which alert events trigger this channelbotIds?: optional bot linking- lastUsedAt, lastStatus (success | failed)
RBAC & preferences
- In-app: read = userId == auth.uid; update = only read/readAt fields; delete = false (via API)
- Mentions: read = orgMember + recipientUid match; create = actorUid == auth.uid
- Channels: read = member; create/update/delete = admin+
- Dispatch API: operator+ required
- Preferences:
notificationPrefs.mentionEmail(default true)
API endpoints
- POST /api/notifications/create — multi-recipient fan-out (30/min per org, max 500 recipients)
- POST /api/notifications/delete — permanent deletion (max 100 items, ownership verified)
- POST /api/notifications/dispatch — Mission Control webhook dispatch (10/min per org, operator+)
- POST /api/notifications/email — mention emails via Resend
- POST /api/notifications/welcome — one-time welcome + email (transactional guard)
Create: type (registry-validated), title, message, link?, data?, audience (all_members|admins|{userIds}). Dispatch: channels[], alert{ruleName, severity, trigger, message, botName, conversationId, details}.
Firestore shape
organizations/{orgId}/inAppNotifications/{notificationId}
|- userId, orgId, type (from registry)
|- title, message, link?, data?
|- read: boolean, readAt: Timestamp | null
+- createdAt: Timestamp
organizations/{orgId}/notifications/{notifId} (trace comment mentions)
|- recipientUid, type (trace_mention | comment_reply | room_mention | pin_mention)
|- read: boolean
+- payload: { commentId, entityType, entityId, entityLabel,
actorUid, actorName, snippet, parentRoomId?, traceId? }
{envRoot}/notificationChannels/{channelId} (Mission Control)
|- name, type (slack|email|webhook|discord|teams), enabled
|- config: { webhookUrl?, emails?, headers? }
|- events[], botIds?, lastUsedAt, lastStatus
+- createdBy, createdAt, updatedAt
organizations/{orgId}/members/{uid}.notificationPrefs:
{ mentionEmail: boolean (default true) }Ready to integrate?
Create an account, make an API key (Lite and up), and run your first bot turn.
