All skills
elevenlabs avatar

/agents

@279173d official
by elevenlabselevenlabs/skills462 stars
74

Build voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice conversation experience, and when configuring an agent's tools, workflows, or procedures, including creating, editing, compiling, and publishing procedure drafts on an agent branch over the SDKs or REST API.

Use this Skill: https://skilld.dev/gh/elevenlabs/skills/agents

This session only. Nothing lands on disk.

referenceswidget-embedding.md

≈2.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Widget Embedding

Add an ElevenLabs agent to any website with the conversation widget.

Basic Embed

<elevenlabs-convai agent-id="your-agent-id"></elevenlabs-convai>
<script src="https://unpkg.com/@elevenlabs/convai-widget-embed" async type="text/javascript"></script>

This creates a floating launcher. Voice-only agents show a call entry point, text-only agents show a message entry point, and multimodal agents show both.

Note: Widgets currently require public agents with authentication disabled. For authenticated flows, use the SDKs.

Widget Attributes

Required

Attribute Description
agent-id Your ElevenLabs agent ID
signed-url Alternative to agent-id when using signed URLs

Appearance

Attribute Description Default
avatar-image-url URL for agent avatar image ElevenLabs logo
avatar-orb-color-1 Primary orb gradient color #2792dc
avatar-orb-color-2 Secondary orb gradient color #9ce6e6

Text Labels

Attribute Description Default
action-text Tooltip when hovering "Talk to AI"
start-call-text Button to start call "Start call"
end-call-text Button to end call "End call"
expand-text Expand chat button "Open"
collapse-text Collapse chat button "Close"
listening-text Listening state label "Listening..."
speaking-text Speaking state label "Assistant speaking"

Behavior

Attribute Description Default
variant Widget style: compact or expanded compact
server-location Server region (us, eu-residency, in-residency, global) us
dismissible Allow the user to minimize the widget false
disable-banner Hide "Powered by ElevenLabs" false
show-resize-button Show the expand and collapse control in the widget header true

Examples

Custom Avatar

<elevenlabs-convai
  agent-id="your-agent-id"
  avatar-image-url="https://example.com/your-avatar.png"
></elevenlabs-convai>

Custom Colors

<elevenlabs-convai
  agent-id="your-agent-id"
  avatar-orb-color-1="#ff6b6b"
  avatar-orb-color-2="#ffd93d"
></elevenlabs-convai>

Custom Text

<elevenlabs-convai
  agent-id="your-agent-id"
  action-text="Chat with our AI assistant"
  start-call-text="Begin conversation"
  end-call-text="Hang up"
></elevenlabs-convai>

Expanded Variant

<elevenlabs-convai
  agent-id="your-agent-id"
  variant="expanded"
></elevenlabs-convai>

File Uploads

Embedded chat widgets can accept image and PDF uploads when the agent uses a multimodal LLM and conversation_config.conversation.file_input.enabled is enabled. Configure max_files_per_conversation to cap uploads per conversation.

Full Customization

<elevenlabs-convai
  agent-id="your-agent-id"
  avatar-image-url="https://example.com/support-agent.png"
  avatar-orb-color-1="#4f46e5"
  avatar-orb-color-2="#818cf8"
  action-text="Talk to Support"
  start-call-text="Start voice chat"
  end-call-text="End conversation"
  expand-text="Open assistant"
  collapse-text="Minimize"
></elevenlabs-convai>

CSS Customization

The widget uses Shadow DOM but exposes CSS custom properties:

elevenlabs-convai {
  --elevenlabs-convai-widget-width: 400px;
  --elevenlabs-convai-widget-height: 600px;
}

Positioning

By default, the widget appears in the bottom-right corner. Override with CSS:

elevenlabs-convai {
  position: fixed;
  bottom: 20px;
  right: 20px;
  /* Or position differently */
  left: 20px;
  right: auto;
}

Z-Index

elevenlabs-convai {
  z-index: 9999;
}

JavaScript Control

Access the widget element to control it programmatically:

<elevenlabs-convai id="my-widget" agent-id="your-agent-id"></elevenlabs-convai>

<script>
  const widget = document.getElementById("my-widget");

  // Start a conversation
  widget.startConversation();

  // End the conversation
  widget.endConversation();

  // Listen for events
  widget.addEventListener("conversationStarted", () => {
    console.log("Conversation started");
  });

  widget.addEventListener("conversationEnded", () => {
    console.log("Conversation ended");
  });
</script>

Custom Trigger Button

Hide the default widget and use your own button:

<style>
  elevenlabs-convai {
    display: none;
  }
</style>

<button onclick="document.getElementById('widget').startConversation()">
  Talk to AI
</button>

<elevenlabs-convai id="widget" agent-id="your-agent-id"></elevenlabs-convai>

Authentication

For agents with authentication enabled, pass a signed URL:

<elevenlabs-convai id="widget" agent-id="your-agent-id"></elevenlabs-convai>

<script>
  async function startAuthenticatedConversation() {
    // Get signed URL from your backend
    const response = await fetch("/api/get-signed-url");
    const { signedUrl } = await response.json();

    const widget = document.getElementById("widget");
    widget.setAttribute("signed-url", signedUrl);
    widget.startConversation();
  }
</script>

Your backend:

@app.get("/api/get-signed-url")
def get_signed_url():
    signed_url = client.conversational_ai.conversations.get_signed_url(
        agent_id="your-agent-id"
    )
    return {"signedUrl": signed_url.signed_url}

Mobile Considerations

Responsive Positioning

/* Desktop: bottom-right */
elevenlabs-convai {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

/* Mobile: full-width bottom */
@media (max-width: 768px) {
  elevenlabs-convai {
    bottom: 0;
    right: 0;
    left: 0;
    --elevenlabs-convai-widget-width: 100%;
  }
}

Touch-Friendly

The widget is touch-optimized by default. For better mobile UX:

@media (max-width: 768px) {
  elevenlabs-convai {
    /* Larger touch target */
    transform: scale(1.1);
    transform-origin: bottom right;
  }
}

Multiple Widgets

You can have multiple widgets for different agents:

<elevenlabs-convai
  agent-id="support-agent-id"
  action-text="Support"
  style="right: 20px"
></elevenlabs-convai>

<elevenlabs-convai
  agent-id="sales-agent-id"
  action-text="Sales"
  style="right: 100px"
></elevenlabs-convai>

Framework Integration

React

function App() {
  useEffect(() => {
    // Load widget script
    const script = document.createElement("script");
    script.src = "https://unpkg.com/@elevenlabs/convai-widget-embed";
    script.async = true;
    document.body.appendChild(script);

    return () => document.body.removeChild(script);
  }, []);

  return (
    <div>
      <elevenlabs-convai agent-id="your-agent-id"></elevenlabs-convai>
    </div>
  );
}

Vue

<template>
  <div>
    <elevenlabs-convai agent-id="your-agent-id"></elevenlabs-convai>
  </div>
</template>

<script setup>
import { onMounted } from "vue";

onMounted(() => {
  const script = document.createElement("script");
  script.src = "https://unpkg.com/@elevenlabs/convai-widget-embed";
  script.async = true;
  document.body.appendChild(script);
});
</script>

Next.js

import Script from "next/script";

export default function Page() {
  return (
    <>
      <Script
        src="https://unpkg.com/@elevenlabs/convai-widget-embed"
        strategy="lazyOnload"
      />
      <elevenlabs-convai agent-id="your-agent-id"></elevenlabs-convai>
    </>
  );
}

Troubleshooting

Widget Not Appearing

  1. Check that the agent ID is correct
  2. Verify the script is loaded (check Network tab)
  3. Check for JavaScript errors in console
  4. Ensure no CSS is hiding the widget

Audio Issues

  1. Ensure HTTPS (microphone requires secure context)
  2. Check browser permissions for microphone
  3. Test in a supported browser (Chrome, Firefox, Safari, Edge)

CORS Errors

If using authentication, ensure your domain is in the agent's allowlist:

platform_settings={
    "auth": {
        "enable_auth": True,
        "allowlist": ["https://yourdomain.com"]
    }
}

Source: SKILL.md on GitHub

No alerts2d5 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill is a comprehensive technical guide for building and configuring voice AI agents using the ElevenLabs platform. It utilizes official vendor tools, SDKs, and standard security practices for managing API keys and external connections.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: LOW · No issues

  • Runlayer6mo

    1/6 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 279173d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
compatibility
Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
Other metadata
metadata
{
  "openclaw": {
    "requires": {
      "env": [
        "ELEVENLABS_API_KEY"
      ]
    },
    "primaryEnv": "ELEVENLABS_API_KEY"
  }
}
  • React
  • Python
  • elevenlabs
  • voice-ai
  • conversational-ai
  • agents
  • llm
  • text-to-speech
  • websocket
  • webrtc
  • javascript

README badge

README badge for elevenlabs/skills/agents

Creates voice AI agents with natural conversation, support for multiple LLM providers (OpenAI, Anthropic, Google, ElevenLabs), and integration of custom tools via webhooks or client-side handlers. Use for voice assistants, customer service bots, or any real-time voice conversation experience with optional web embedding via React hooks or JavaScript SDK.

Generated from the current SKILL.md.

Which LLM providers and models does this skill support?
The skill supports OpenAI (gpt-4o, gpt-4-turbo, gpt-5 family), Anthropic (Claude 3.5/3.7 Sonnet, Opus, Haiku), Google (Gemini 2.0/2.5/3.x Flash), ElevenLabs (Qwen, GLM), and custom LLM endpoints. Use GET /v1/convai/llm/list to inspect the current model catalog including token limits and capability flags.
Do I need an API key to use this skill?
Yes. The skill requires an ELEVENLABS_API_KEY environment variable and internet access to interact with the ElevenLabs platform API.
Can agents use external tools and APIs?
Yes. Agents support webhook tools (server-side API calls), client tools (browser-side execution), built-in system tools (end_call, transfer_to_number, language_detection), and pre-built integration tools (Salesforce, HubSpot, Zendesk, Cal.com).
Is there a LiveKit WebRTC compatibility issue I should know about?
WebRTC clients using livekit-client versions newer than 2.16.1 may fail during the LiveKit WebSocket handshake. Pin livekit-client to 2.16.1 in package.json overrides if you see /rtc/v1 404 errors or connection failures during session startup.
Can I route conversations through multiple steps and sub-agents?
Yes. The skill supports workflows with discrete steps, branching logic via unconditional/LLM/expression edges, and tool dispatch nodes with success/failure routing. Sub-agents are defined as override_agent nodes with additional prompts and scoped tool access.

Generated from the current SKILL.md. These answers refresh after source changes.