Skip to main content

LlamaIndex x ElevenLabs integration

This package is an integration for ElevenLabs realtime conversation with agents.

To install the package, run:

python3 -m pip install llama-index-voice-agents-elevenlabs

And, if you want to run it, you can refer to the simple example down here (in this case, the audio input/output are the same as the local device you are running the script on):

import os

from llama_index.voice_agents.elevenlabs import ElevenLabsVoiceAgent
from dotenv import load_dotenv
from elevenlabs.client import ElevenLabs


load_dotenv()
AGENT_ID = os.environ.get("AGENT_ID")
API_KEY = os.environ.get("ELEVENLABS_API_KEY")


def main():
    client = ElevenLabs(api_key=API_KEY)
    conversation = ElevenLabsVoiceAgent(
        client,
        AGENT_ID,
        requires_auth=bool(API_KEY),
    )
    conversation.start()

    while True:
        try:
            # GET MESSAGES IN llama-index ChatMessage FORMAT
            messages = conversation.export_messages()
            events = conversation.export_events()
            # GET AVERAGE LATENCY
            latency = conversation.average_latency
        except KeyboardInterrupt:
            conversation.interrupt()
            conversation.stop()
            print(f"Messages: {messages}")
            print(f"Events: {events}")
            print(f"Latency: {latency}")


if __name__ == "__main__":
    main()

Metadata

Release files for llama-index-voice-agents-elevenlabs 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-voice-agents-elevenlabs 0.6.0
File Size Uploaded Provenance Actions
llama_index_voice_agents_elevenlabs-0.6.0.tar.gz 7.2 kB Without provenance Details for llama_index_voice_agents_elevenlabs-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-voice-agents-elevenlabs 0.6.0
File Interpreter ABI Platform Actions
llama_index_voice_agents_elevenlabs-0.6.0-py3-none-any.whl Python 3 none any Details for llama_index_voice_agents_elevenlabs-0.6.0-py3-none-any.whl

Total release size: 15.0 kB

Release files / llama_index_voice_agents_elevenlabs-0.6.0.tar.gz

Download URL llama_index_voice_agents_elevenlabs-0.6.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
affbada3b06e63941396f011e581c2d07a368c3e0a1d47084bbe9ce50ec73f9f
BLAKE2b-256 checksum
How to use checksums
ad398e66a65717bf47498106e959607004ef7fa481563551b12daa58e1010787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_voice_agents_elevenlabs-0.6.0-py3-none-any.whl

Download URL llama_index_voice_agents_elevenlabs-0.6.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10d44a6b97f56e0eadcf16673e072a119c504cb8126de5d2cf01bb79d3a76a2a
BLAKE2b-256 checksum
How to use checksums
09800eef59f8a1e97aaa7715f8a0420ce4e1ea3e215773e2a73862e2d5f4bac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-voice-agents-elevenlabs 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page