> ## Documentation Index
> Fetch the complete documentation index at: https://doc.rapida.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Assistants

> Understand what an assistant is, how it is structured, how a live conversation flows through it, and how to iterate safely in production.

An **assistant** is the core unit of Rapida. It packages everything needed to run a production voice AI conversation — the LLM and prompt, experience settings, listen/speak configuration, knowledge sources, tools, and deployment channels — into a single versioned object.

One assistant configuration drives every channel. The same prompt, model, and voice settings that handle your inbound phone calls also power your web widget and WhatsApp deployment. Change something once and it propagates everywhere.

<Info>
  Assistants are **version-controlled**. Every prompt or model change creates a new draft version. Versions must be explicitly released — live deployments are never changed automatically.
</Info>

## Anatomy of an assistant

<CardGroup cols={2}>
  <Card title="Prompt & Model" icon="cpu">
    Define persona and behavior with a system prompt, then choose and tune the LLM model per version.
  </Card>

  <Card title="Configuration" icon="sliders-horizontal" href="/assistants/configuration/experience">
    Tune experience, [Listen](/assistants/configuration/listen), and [Speak](/assistants/configuration/speak) settings per deployment channel.
  </Card>

  <Card title="Knowledge Bases" icon="book-open">
    Attach one or more knowledge bases for retrieval-augmented responses during live calls.
  </Card>

  <Card title="Tools" icon="zap">
    Let the LLM call tools mid-conversation: knowledge, APIs, endpoint prompts, hold, and end session.
  </Card>

  <Card title="Deployments" icon="phone">
    Run the same assistant across phone, web, and WhatsApp with channel-specific voice settings.
  </Card>

  <Card title="Webhooks" icon="activity">
    Stream conversation events, transcripts, and metadata to your external systems in real time.
  </Card>

  <Card title="Post-call Analysis" icon="bar-chart">
    Run post-call analysis for sentiment, intent, compliance, CSAT, and custom metrics.
  </Card>
</CardGroup>

***

## How a voice conversation works

Every conversation follows the same pipeline from audio-in to audio-out. Understanding this flow helps you tune latency, accuracy, and behaviour at each stage.

```mermaid theme={null}
flowchart TD
    A(["🎙 Caller speaks"]) --> B["Voice Activity Detection\nSilero VAD · FireRed VAD"]
    B --> C["Noise Cancellation\nRNNoise — removes background audio before transcription"]
    C --> D["Speech-to-Text\nDeepgram · Azure · AssemblyAI · OpenAI Whisper · Google"]
    D --> E["End-of-Speech Detection\nSilence-Based · Pipecat Smart Turn"]
    E --> F["LLM Inference\nOpenAI · Anthropic · Gemini · Mistral · Bedrock · AgentKit"]
    F --> G{Tool call\nrequested?}
    G -->|Yes| H["Tool Execution\nAPI · Knowledge · Endpoint · Hold"]
    H -->|Result injected back| F
    G -->|No| I["Text-to-Speech\nElevenLabs · Azure · Deepgram · OpenAI · Cartesia"]
    I --> J(["🔊 Caller hears response"])
    J --> K{Conversation\nended?}
    K -->|Next turn| A
    K -->|Session closed| L["Post-call Processing"]
    L --> M["Webhooks\nconversation.completed — transcript, metadata, tool calls"]
    L --> N["Analysis Pipelines\nScoring · Sentiment · Compliance · Custom metrics"]
```

<Note>
  The EOS timeout (default 700ms) is the primary latency control between the caller finishing speaking and the assistant beginning to respond. Reduce it for snappy IVR-style interactions; increase it for conversational use cases where callers pause mid-thought.
</Note>

***

## Deployment channels

The same assistant is deployable across every channel. Each deployment is independently configured for voice settings and conversation experience while sharing the assistant's prompt, model, and tools.

<CardGroup cols={2}>
  <Card title="Phone" icon="phone" href="/voice-deployment-options/phone">
    Inbound and outbound PSTN calls via Twilio, Vonage, Exotel, Asterisk, or SIP.
  </Card>

  <Card title="Web Widget" icon="globe" href="/voice-deployment-options/web-widget">
    Embeddable widget for text and voice on any site with a script tag.
  </Card>

  <Card title="Web App (React SDK)" icon="monitor" href="/voice-deployment-options/web-app">
    Native React SDK integration with direct WebRTC audio streaming.
  </Card>

  <Card title="WhatsApp" icon="message-circle" href="/voice-deployment-options/whatsapp">
    Deploy on WhatsApp Business with multi-turn context across messages.
  </Card>

  <Card title="API / SDK" icon="terminal" href="/api-reference/installation">
    Programmatically create calls, pass variables, stream transcripts, and consume webhooks.
  </Card>

  <Card title="Debugger" icon="activity" href="/assistants/create-assistant">
    Test live conversations in-browser before release, with real-time logs and tool traces.
  </Card>
</CardGroup>

***

## The assistant lifecycle

```mermaid theme={null}
flowchart LR
    A["1. Create\nLLM + prompt\nv1 draft"] --> B["2. Configure\nVoice · Tools\nKnowledge · Deployments"]
    B --> C["3. Test\nDebugger\nlive conversation"]
    C --> D{Ready\nfor prod?}
    D -->|Yes| E["4. Release\nAll deployments\nswitch instantly"]
    D -->|No| B
    E --> F["5. Monitor\nTranscripts · Latency\nWebhooks · Analysis"]
    F --> G["6. Iterate\nNew version\nin draft"]
    G --> C
```

**1. Create** — Define the assistant with an LLM provider and initial system prompt. The first version (`v1`) is created automatically in draft state.

**2. Configure** — Attach knowledge bases, add tools, tune experience/listen/speak settings, and set up deployments. Each deployment channel has its own runtime configuration.

**3. Test** — Use the built-in Debugger deployment to run live conversations before any real traffic hits the assistant. Inspect transcripts, latency breakdowns, and tool invocations.

**4. Release** — Promote a version from draft to live. All active deployments switch to the released version immediately.

**5. Monitor** — Every conversation generates structured logs: full transcript, per-turn latency, tool call results, LLM token usage, and EOS timing. Webhook events and analysis pipeline outputs flow to your downstream systems.

**6. Iterate** — Create a new version with updated prompt or model parameters. Test in the Debugger. Release when confident. Previous versions are preserved and can be re-released for instant rollback.

<Tip>
  Use separate assistants for distinct products or personas rather than a single assistant with complex conditional logic in the prompt. Assistants are cheap to create — isolation keeps prompts focused and version history clean.
</Tip>

***

## In this section

<CardGroup cols={2}>
  <Card title="Create an Assistant" icon="plus" href="/assistants/create-assistant">
    Step-by-step guide through creation, prompt setup, model configuration, runtime configuration, and tools.
  </Card>

  <Card title="Voice Activity Detection" icon="shield" href="/assistants/voice-activity-detection">
    Configure VAD providers (Silero, FireRed) — speech detection sensitivity, barge-in timing, and noise handling.
  </Card>

  <Card title="End of Speech Detection" icon="clock" href="/assistants/end-of-speech">
    Configure EOS providers (Silence-Based, Pipecat Smart Turn) — turn detection, latency tuning, and parameter guidance.
  </Card>

  <Card title="Version Control" icon="git-branch" href="/assistants/create-new-version">
    Create, compare, and release new versions. Roll back instantly if something goes wrong.
  </Card>

  <Card title="Tools" icon="zap" href="/assistants/introduction-to-tools">
    Add knowledge retrieval, API calls, endpoint invocations, hold, and end-of-conversation tools.
  </Card>

  <Card title="Knowledge" icon="book-open" href="/assistants/knowledge/add-knowledge">
    Attach knowledge bases and tune retrieval settings for your use case.
  </Card>

  <Card title="Webhooks" icon="activity" href="/assistants/webhook/overview">
    Configure event-driven delivery of transcripts and call data to external systems.
  </Card>

  <Card title="Logs" icon="list" href="/activity/conversation-logs">
    Browse conversation transcripts, tool call traces, LLM token usage, and latency breakdowns for every session.
  </Card>

  <Card title="Post-call Analysis" icon="bar-chart" href="/assistants/analysis/overview">
    Run LLM-powered analysis pipelines against completed conversations.
  </Card>

  <Card title="AgentKit" icon="cpu" href="/assistants/agentkit">
    Replace Rapida's built-in LLM with your own gRPC backend — LangChain, CrewAI, or custom logic.
  </Card>

  <Card title="Twilio Integration" icon="phone" href="/assistants/twilio-integration">
    Step-by-step guide for connecting a Twilio phone number to your assistant.
  </Card>
</CardGroup>
