Viavitna
Documentation

From content to live assistant

Four steps, no build tooling, no SDK. If you can paste a script tag, you can ship Viavitna.

Quick start

1 · Upload → 2 · Test → 3 · Publish → 4 · Embed

  1. Upload your content. In the admin console, pick a tenant name and upload your files — Markdown, HTML, or plain text. This builds a draft: searchable, versioned, and invisible to visitors.
  2. Test the draft. Ask it your customers' real questions. Check the citations. Re-upload and re-test as much as you like; superseded and published drafts remain available in Draft history, and recovery returns them to review without publishing.
  3. Publish. One click promotes the draft to live and mints your keys: a pub_… publishable key (for the widget) and a sec_… secret key (for server-to-server use — store it; it's shown once).
  4. Embed. Paste the snippet before </body> on your site:
<script src="https://viavitna.com/widget.js"
        data-viau-tenant="your-company"
        data-viau-key="pub_..." defer></script>

Then lock the key to your site so it works nowhere else — set your origin allowlist in the console (or ask us to).

Reference

Widget attributes

AttributeRequiredMeaning
data-viau-tenantyesYour tenant id.
data-viau-keyyesYour publishable (pub_…) key. Safe to embed; protect it with the origin allowlist.
data-viau-titlenoPanel title (default "Ask us").
data-viau-langnoen (default) or es — interface and answer language.
data-viau-hostnoOverride the API host (defaults to where the script was loaded from).

Answer API

The widget uses this endpoint; you can call it directly for custom UIs or server-side integration.

POST https://viavitna.com/t/<tenant>/answer
Headers:  content-type: application/json
          x-viau-public-key: pub_...     (browser)   — or —
          x-viau-key: sec_...            (server-to-server)
Body:     {"question": "How do returns work?", "language": "en"}

Response: {
  "ok": true,
  "status": "direct",              // or conditional / insufficient
  "mode": "generated",             // or extractive_fallback
  "answer": "Items can be returned within 30 days…",
  "citations": [{"title": "Returns policy", "url": "https://your-site/returns"}],
  "limitations": [],
  "receipt": {
    "snapshotId": "…",             // binds pack, evidence, validation and model policy
    "packSha256": "…",
    "evidenceIds": [1]
  }
}
ResultMeaning
status: insufficientYour content doesn't cover the question; the answer says so honestly.
mode: generatedA verified, cited answer written from your passages.
mode: extractive_fallbackA verbatim relevant passage — served when generation is unavailable or unverifiable. Still cited, still true.
receipt.snapshotIdA tamper-evident identifier for this answer decision. It binds the serving pack, evidence and validation state; it is not a claim that the customer's source itself is correct.
401 / 403 / 429Bad key / origin not allowed / rate limited.

Read-only MCP

Server-side MCP clients can connect to POST /mcp/<tenant> using Authorization: Bearer sec_... and the stateless MCP 2026-07-28 headers and metadata. The server exposes one tool, viavitna_answer, which returns the same grounded answer, citations, limitations and receipt. Publishable keys are rejected, and there are no upload, draft, publish, tenant-discovery, shell or filesystem tools.

Viavitna never stores the words in widget, API or MCP questions. Its short-lived operational ledger contains only a keyed fingerprint and minimal outcome/evidence fields; raw-question logging cannot be enabled.

Content tips