Documentation

How avatarx works

avatarx turns a prompt, a face and your own documents into a realtime avatar that talks with visitors on your site — by voice or by typing. This guide covers everything from the first agent to the embed snippet.

Overview

An agent is the unit you build and deploy. It carries a face, a voice, a personality and a prompt, optionally a knowledge base of your own content, and a set of tools it may use mid-conversation. Once it is published you drop one script tag on any page and visitors can talk to it.

PieceWhat it does
AgentFace, voice, language, prompt, model and behaviour rules.
Knowledge baseDocuments, pasted text and crawled pages the agent can quote from.
ToolsActions it can take: capture a lead, book a meeting, hand over to a person, call your webhook.
MediaFlyers, cards or price lists it can put on screen during a conversation.
WidgetThe embeddable launcher, avatar view and chat panel your visitors use.

Two ways to talk to an agent

Visitors can speak to it (microphone in, voice and lip-synced video out) or type in the chat panel. Both run against the same prompt, knowledge base and tools.

Quick start

  1. 1

    Create an agent

    Go to Agents and press New agent, or start from one of the templates (Lila, Alex, Emma, Jack) to pre-fill the wizard.
  2. 2

    Work through the five tabs

    Avatar, Voice, Behavior, Knowledge and Conversation. Only a name and a prompt are required; everything else has a sensible default and stays editable later.
  3. 3

    Try it in the preview

    The right-hand panel talks to the real model with the prompt you are writing, so you can feel the tone before you create anything.
  4. 4

    Create, then copy the embed snippet

    Creating the agent indexes any knowledge you staged and hands you the script tag.
  5. 5

    Test it in the sandbox

    Launch sandbox on the agent card runs the real widget against your agent, so you see exactly what a visitor will get.

Building an agent

The wizard and the agent settings page hold the same fields, so anything you set while creating can be changed afterwards.

Avatar

Name, a short description, and the face. The gallery lists the built-in video avatars; the one you pick streams live and lip-syncs to the agent's speech.

Voice

  • Language — the language the agent speaks.
  • Voice — pick one and press preview to hear it.
  • Pronunciation dictionary — for names, brands and acronyms it gets wrong. Give the word and how to say it (AVAT → ay-vat).

Behavior

  • Agent role and personality — a sentence of context and a tone.
  • Agent prompt — the instructions. Write only the instructions here: role, personality, topics to avoid and the response-length cap are folded in automatically at call time. Use View the composed prompt on the settings page to see the exact text the live agent receives.
  • Creativity — from more predictable to more diverse. It sets the model temperature; the settings page shows the resulting value.
  • Model — GPT-4o, GPT-4o mini, Claude 3.5 Sonnet or Haiku.

Conversation

SettingEffectLimits
GreetingThe first thing the agent says, spoken and in chat.≤ 500 characters
Conversation startersSuggested questions shown as chips when the chat opens.up to 4, ≤ 120 chars each
Topics to avoidThe agent declines these and steers back.up to 20, ≤ 80 chars each
Limit response lengthCaps words per reply — useful for spoken answers.10–500 words
Enable cameraAllows live video input in the widget.—
End-of-call feedbackShows a rating screen when the call ends.—
Agent memoryRecalls a returning visitor's earlier conversations.last ~10 turns
Share memory across agentsWidens that recall to every agent you own.—

Changes apply to the next conversation

Tools and prompts are bound when a session starts, so a call already in progress keeps the settings it began with.

Knowledge base

Give the agent your own content and it answers from that instead of guessing. Everything you add is chunked, embedded and searchable — and stays editable.

Sources

  • Files — PDF, TXT, MD or DOCX, up to 20 MB each.
  • Pasted text — FAQs, policies, price lists. Saved as its own document so you can edit it later.
  • A website — index a single page, or follow links to crawl up to 50 pages, 2 levels deep. Re-crawl any time.

Strict or hybrid

Strict means the agent answers only from the knowledge base and politely declines anything it does not cover — the right setting for support and compliance. Hybrid lets it interpret around the facts conversationally.

Editing what it knows

Open Knowledge, pick an agent, and you can edit any document's text, rename it, re-index it, or delete it. Saving re-chunks and re-embeds that document and removes the old vectors, so a fact you delete stops being retrievable rather than lingering in the index.

Test retrieval before blaming the prompt

The Test retrieval button shows the exact excerpts the agent would receive for a question. If the answer is not in there, the agent never had it — add or edit a document rather than rewriting the prompt.

Tools & capabilities

Tools are real functions, not prompt suggestions. A disabled capability is not merely discouraged — the model has no way to call it.

Always on

ToolWhat it does
end_callEnds the conversation politely and closes the session when the visitor says goodbye.
skip_turnStays silent for a turn when the visitor is still speaking or needs a moment.

Capabilities you switch on per agent

CapabilityFunctionsNotes
Lead capturesave_lead_detailsRecords name, email, phone, company and interest as they come up, merging across the conversation. Leads land in the CRM.
Appointmentscheck_appointment_availability, book_appointment, check_existing_appointment, cancel_appointmentOffers free slots from your business hours, books them, and emails a confirmation.
Human handoffrequest_human_handoffRecords a reason, promotes the lead to qualified and emails you. Needs outbound email configured to actually notify.

Scheduling rules

When appointments are on you set the timezone, appointment length, gap between bookings, earliest bookable time, how far ahead visitors may book, and business hours — including a second window per day for a lunch break. The preview under the form shows the exact slots visitors will be offered, which is the fastest way to catch hours that are too tight.

Connect Google Calendar and every booking gets its own calendar event and a unique Meet link. Without it, bookings reuse the static Meet room you set on the agent.

Custom webhook tools

Under Tools → Custom toolsyou can define an HTTPS endpoint the model may call: give it a snake_case name, a description (this is what the model reads to decide when to call it), the URL and method, an optional JSON Schema for its arguments, and credentials if it needs them. Then attach it to an agent from that agent's Tools tab.

What a custom tool may reach

A tool URL invoked by a model is a server-side request with model-supplied arguments, so it must be public HTTPS. Requests to loopback, private, link-local and CGNAT addresses are refused — in a test run and in a live call alike. Credentials are stored encrypted and never returned by the API, responses are capped, and the timeout is at most 30 seconds.

Media in chat

Agents can show things, not just talk about them. Add a flyer, business card, menu or price list on the agent's Media tab and it appears as a card in the chat panel when it is relevant.

  • Images, PDFs, MP4/WEBM or an external link — up to 25 MB each, 50 per agent.
  • The title and trigger keywords are how the agent decides an item is the right one, so name things the way visitors ask for them.
  • Show at the start puts an item on screen right after the greeting — good for a business card.

Embedding the widget

Copy the snippet from the agent's Embed tab and paste it just before the closing </body> tag.

index.html
<!-- avatarx embeddable widget -->
<script src="https://avatarx.net/components/widget/widget.js" async></script>
<script>
  window.VoiceAgentConfig = {
    agentId: "YOUR_AGENT_ID",
    apiUrl: "https://avatarx.net"
  };
</script>

Options

KeyRequiredDefault
agentIdyes—
apiUrlyes—
bannerTitlenoHello there! Need Help?
bannerCaptionnoHi! I'm here to assist you.
idleVideoUrlnobuilt-in idle loop

What the visitor gets

  • A launcher in the bottom-right that expands into the avatar.
  • Mic and speaker toggles, a chat tab, and an end-call button.
  • A chat panel with live transcripts, your conversation starters, and media cards.
  • A clean end screen when the agent closes the call — plus a star rating when you enable the feedback screen.

Reading the feedback rating

When the feedback screen is on, the widget dispatches a DOM event on the host page. Nothing is stored server-side yet, so capture it yourself if you want to keep it:

host page
window.addEventListener("voiceagent:feedback", (e) => {
  // { agentId, score: 1..5 | null, comment: string | null }
  console.log(e.detail);
});

The agent must be publicly embeddable

The widget reads a public config endpoint that only serves published agents. If the widget says the assistant is unavailable, turn on Publicly embeddableon the agent's Avatar tab — the sandbox offers a one-click fix for this too.

Conversations & CRM

  • Conversations — every session with its transcript.
  • CRM — leads the agent captured and appointments it booked, both editable, with CSV export for leads.
  • Insights — volume, duration and engagement over time.

Account settings

Outbound email

Appointment confirmations and handoff alerts are sent from your own SMTP server, so they come from your domain. Add the host, port and credentials under Settings and send a test — until that test passes, handoffs are recorded but nobody is emailed.

Google Calendar

Connect once for the whole account. Every booking then gets its own calendar event and Meet link.

Security

Sign-in creates a server-side session you can revoke. Under Settings you can see active sessions, sign out other devices, and change your password — which revokes every other session.

Credits

Live conversations consume credit minutes from your account balance. The sidebar shows what is left. When the balance runs out the widget stops connecting new calls and the API answers 402 credits_exhausted, so top up before a launch.

Troubleshooting

SymptomMost likely cause
Widget shows “Assistant unavailable”The agent is not publicly embeddable, or the id in the snippet is wrong.
The launcher opens but nothing connectsMicrophone permission was blocked, or the account is out of credits (402).
The agent refuses to answer things it should knowStrict mode with nothing indexed for that question — check Test retrieval, then add or edit a document.
It answers from old, deleted textThe document was edited but re-indexing is still running; the status pill shows Indexing until it settles.
Handoff or booking emails never arriveOutbound email is not configured or its test has not passed.
Sign in with Google bounces somewhere unexpectedThe OAuth redirect URI on the server still points at an older deployment.
A custom tool always failsNon-HTTPS URL, or a host that resolves to a private address — both are refused by design.

Building against the API instead? The API reference covers authentication and every endpoint.

GET/healthService health check