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

# Introduction

> The simulation and evaluation engine for voice AI

## The Simulation & Evaluation Engine for Voice AI

Roark is the evaluation layer for voice AI agents. Monitor every production call in real-time, run metrics powered by Roark Prism — our purpose-built evaluation model — and stress-test agents with simulations before they reach customers.

<CardGroup cols={3}>
  <Card title="Monitor" icon="chart-line" href="/documentation/observability/overview">
    Every call is transcribed, analyzed for sentiment, emotions, and speech patterns, and made searchable in real-time.
  </Card>

  <Card title="Evaluate" icon="gauge" href="/documentation/metrics/overview">
    Collect metrics automatically — from response time to custom LLM evaluations — with pass/fail thresholds.
  </Card>

  <Card title="Simulate" icon="activity" href="/documentation/simulation-testing/overview">
    Test agents with synthetic callers across personas, accents, and edge cases before deploying.
  </Card>
</CardGroup>

***

## How It Works

<Steps>
  <Step title="Get calls into Roark">
    Connect a voice platform ([Vapi](/documentation/integrations/vapi), [Retell](/documentation/integrations/retell), [ElevenLabs](/documentation/integrations/elevenlabs), [LiveKit](/documentation/integrations/livekit), [others](/documentation/integrations/overview)) and calls sync automatically. Or upload recordings directly via the SDK.
  </Step>

  <Step title="Calls are analyzed automatically">
    Every call is transcribed, then run through Roark's voice analysis models — detecting sentiment, 64+ emotions, interruptions, speech pauses, and vocal cues. Active [metric policies](/documentation/metrics/metric-policies) collect any additional metrics you've configured.
  </Step>

  <Step title="Evaluate with metrics and thresholds">
    Define what good looks like. Use built-in metrics like response time or create custom evaluations with Roark Prism (e.g., *"Did the agent verify the caller's identity?"*). Add [thresholds](/documentation/metrics/thresholds) to turn values into pass/fail outcomes.
  </Step>

  <Step title="Test before you ship">
    Run [simulations](/documentation/simulation-testing/overview) against your agent with synthetic callers. Attach metrics with thresholds to your run plan — if the agent doesn't meet your bar, you know before customers do.
  </Step>
</Steps>

***

## Quick Start

<Tabs>
  <Tab title="Upload a Call">
    Send a call recording and let Roark handle the rest:

    ```typescript theme={null}
    import Roark from '@roarkanalytics/sdk'

    const client = new Roark({
      bearerToken: process.env.ROARK_API_BEARER_TOKEN,
    })

    const call = await client.call.create({
      recordingUrl: 'https://example.com/recording.wav',
      startedAt: '2025-01-15T10:00:00Z',
      interfaceType: 'PHONE',
      callDirection: 'INBOUND',
      agent: { name: 'Support Agent' },
      customer: { phoneNumberE164: '+15551234567' },
    })
    ```

    The call appears in [Call History](/documentation/observability/live-monitoring) with full transcription, sentiment, and emotion analysis. Any active [metric policies](/documentation/metrics/metric-policies) run automatically.
  </Tab>

  <Tab title="Run Metrics on a Call">
    Collect specific metrics against existing calls:

    ```typescript theme={null}
    // Create a custom metric
    const metric = await client.metric.createDefinition({
      name: 'Identity Verified',
      outputType: 'BOOLEAN',
      analysisPackageId: 'your-package-id',
      llmPrompt: 'Did the agent verify the caller identity before proceeding?',
    })

    // Run it against calls
    const job = await client.metricCollectionJob.create({
      callIds: ['call-id-1', 'call-id-2'],
      metrics: [{ id: metric.data.id }],
    })

    // Fetch results
    const results = await client.call.listMetrics('call-id-1')
    ```

    Or test metrics interactively in the [Playground](/documentation/metrics/playground) first.
  </Tab>

  <Tab title="Connect a Platform">
    If you're on Vapi, Retell, ElevenLabs, Leaping, LiveKit, or Pipecat — connect once and calls flow automatically:

    1. Go to **Settings → Integrations** in your Roark dashboard
    2. Select your platform and enter your API key
    3. Choose which agents to sync
    4. Calls start appearing in [Call History](/documentation/observability/live-monitoring)

    See [Integrations](/documentation/integrations/overview) for platform-specific setup guides.
  </Tab>
</Tabs>

***

## Explore the Docs

<CardGroup cols={2}>
  <Card title="Observability" icon="chart-line" href="/documentation/observability/overview">
    Call history, reports, and dashboards
  </Card>

  <Card title="Metrics" icon="gauge" href="/documentation/metrics/overview">
    Definitions, policies, thresholds, and the playground
  </Card>

  <Card title="Simulations" icon="activity" href="/documentation/simulation-testing/overview">
    Personas, scenarios, run plans, and schedules
  </Card>

  <Card title="Integrations" icon="plug" href="/documentation/integrations/overview">
    Vapi, Retell, ElevenLabs, Leaping, LiveKit, Pipecat, and custom
  </Card>

  <Card title="SDKs" icon="braces" href="/documentation/sdks/node-sdk">
    Node.js, Python, and MCP Server
  </Card>

  <Card title="API Reference" icon="terminal" href="/api-reference/introduction">
    REST API documentation
  </Card>
</CardGroup>
