MCPcopy Index your code
hub / github.com/elevenlabs/packages

github.com/elevenlabs/packages @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,106 symbols 2,588 edges 276 files 42 documented · 4% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

hero

ElevenAgents SDK

Build multimodal agents with ElevenAgents. Our SDKs provide seamless integration with popular JavaScript/TypeScript frameworks, enabling you to create multimodal AI agents.

Installation

npm install @elevenlabs/react

Usage

import { useConversation } from "@elevenlabs/react";

const conversation = useConversation({
  agentId: "your-agent-id",
});

// Start conversation
conversation.startSession();

Overview

The ElevenAgents SDKs provide a unified interface for integrating multimodal AI agents into your applications.

Available Packages

Package Description Version Links
@elevenlabs/client Core TypeScript/JavaScript client npm READMEDocs
@elevenlabs/react React hooks and components for web applications npm READMEDocs
@elevenlabs/react-native React Native SDK for cross-platform applications npm READMEDocs
@elevenlabs/convai-widget-core Core widget library for embedding Agents npm Docs
@elevenlabs/convai-widget-embed Pre-bundled embeddable widget npm Docs

Package Details

@elevenlabs/client

The core TypeScript/JavaScript client provides the foundation for all ElevenLabs agent integrations.

Features

  • Real-time Communication: WebRTC-based audio streaming for low-latency agent interactions
  • Event-driven Architecture: Comprehensive event system for agent session lifecycle management
  • Client Tools: Support for custom client-side tools and functions
  • Flexible Authentication: Support for both public and private agent configurations
  • Audio Controls: Fine-grained control over audio input/output devices

Installation

npm install @elevenlabs/client

@elevenlabs/react

React hooks and components for building multimodal agents with React/Next.js

Installation

npm install @elevenlabs/react

@elevenlabs/react-native

React Native SDK for building cross-platform mobile agents

Installation

npm install @elevenlabs/react-native

# Install peer dependencies
npm install @livekit/react-native @livekit/react-native-webrtc livekit-client

Platform Setup

iOS

Add the following to your Info.plist:

<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to your microphone for voice agent interactions.</string>
Android

Add the following permissions to your AndroidManifest.xml:

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />

Widgets

The ElevenAgents Widgets provide an easy way to embed AI agents into any website as a web component.

Learn how to embed the widget into your website here.

Client Tools

Client tools allow your agent to trigger actions in your application, for example in React:

import { useConversation } from "@elevenlabs/react";

const conversation = useConversation({
  agentId: "your-agent-id",
});

// Start conversation
conversation.startSession({
  clientTools: {
    logMessage: async ({ message }) => {
      console.log(message);
    },
  },
});

Learn more here

Examples

Explore our example applications to see the SDKs in action:

Documentation

For detailed documentation, visit:

Support

Development Setup

This project uses Turbo and pnpm to manage dependencies.

# Install pnpm globally
npm install -g pnpm

# Install dependencies
pnpm install

# Build all packages
pnpm run build

# Run tests
pnpm run test

# Start development mode
pnpm run dev

# If the change needs a note in the changelog / release nodes, create a changeset
pnpm run changeset

Creating a New Package

pnpm run create --name=my-new-package

Releasing

We're using Changesets to coordinate changelog entries and release notes and as such, there's no more need to create per-package tags when preparing a release.

Simply, merge the latest "Version Packages" PR opened by the Changesets action.

See the Changesets documentation for answers to common questions.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Engineered by ElevenLabs

Extension points exported contracts — how you extend this code

VolumeProvider (Interface)
(no doc) [4 implementers]
packages/client/src/utils/volumeProvider.ts
WordTimestamp (Interface)
(no doc)
packages/react/src/scribe.ts
CodeProps (Interface)
(no doc)
packages/convai-widget-core/src/markdown/utils/highlighter.tsx
VolumeEvent (Interface)
(no doc)
packages/react-native/src/nativeVolume.ts
FileRoutesByFullPath (Interface)
(no doc)
examples/agent-testbench/src/routeTree.gen.ts
ConversationNamespace (Interface)
(no doc) [2 implementers]
packages/client/src/index.ts
TranscriptSegment (Interface)
(no doc)
packages/react/src/scribe.ts
LanguageInfo (Interface)
(no doc)
packages/convai-widget-core/src/types/languages.ts

Core symbols most depended-on inside this repo

on
called by 111
packages/client/src/scribe/connection.ts
startSession
called by 104
packages/client/src/index.ts
close
called by 97
packages/client/src/InputController.ts
cn
called by 82
examples/agent-testbench/src/lib/utils.ts
send
called by 69
packages/client/src/scribe/connection.ts
setupWebComponent
called by 50
packages/convai-widget-core/src/mocks/web-component.ts
connect
called by 49
packages/client/src/scribe/scribe.ts
useAttribute
called by 48
packages/convai-widget-core/src/contexts/attributes.tsx

Shape

Function 621
Interface 233
Method 177
Class 72
Enum 3

Languages

TypeScript100%

Modules by API surface

packages/types/generated/types/asyncapi-types.ts134 symbols
packages/client/src/runtime.ts47 symbols
packages/client/src/BaseConversation.ts40 symbols
examples/agent-testbench/src/components/ui/sidebar.tsx25 symbols
packages/convai-widget-core/src/components/Icon.tsx22 symbols
packages/convai-widget-core/src/markdown/utils/parse-incomplete-markdown.ts20 symbols
packages/client/src/scribe/connection.ts20 symbols
packages/react-native/src/nativeVolume.ts19 symbols
packages/client/src/BaseConversation.test.ts19 symbols
packages/convai-widget-core/src/contexts/widget-config.tsx18 symbols
packages/client/src/utils/WebRTCConnection.ts18 symbols
packages/client/src/platform/web/output.ts15 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add packages \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact