Available SDKs

We currently support the following SDKs:
SDKExamplesRequirements
Python SDKVapi Bot, Pipecat BotMust use Python 3
Please reach out to the Elixir team if you need support for your language. In the meantime, you can work with our API directly.

Installation

pip install elixir-ai

SDK Functionality

The following is a list of SDK methods with examples on how they can be invoked.

Initialization

Instruments calls to LLM and Retrieval services. See more info in our Tracing docs. Method: init Usage Examples:
# import Elixir
from elixir import Elixir

Elixir.init()

Track Conversation

Associates a trace with a specific conversation. This populates the conversation table in the dashboard and allows you to see the transcript and call analytics for the full conversation. Method: track_conversation Parameters:
  • conversation_id (String): ID of the conversation the current trace should be associated with.
  • conversation_properties (Object) [optional]: Custom properties to add to the conversation.
Usage Examples:
conversation_id = "12345"
conversation_properties = {
    "topic": "Scheduling",
    "bot_name": "Alice",
}

Elixir.track_conversation(conversation_id, conversation_properties)

Track User

Matches traces and corresponding conversation with a provided user ID. Method: track_user Parameters:
  • user_id (String): ID of the user the current trace should be associated with.
  • user_properties (Object) [optional]: Custom properties to add to the user.
Usage Examples:
user_id = "usr-8234DFT6-9823"
user_properties = {
    "name": "White Oaks Auto Dealership",
    "plan": "Enterprise",
}

Elixir.track_user(user_id, user_properties)

Upload Audio

Sends a recording link or audio file to Elixir and ties it to a provider conversation ID. Method: upload_audio Async Parameters:
  • conversation_id (String): ID of the conversation the audio file should be tied to.
  • audio_url (String) [optional]: Publicly accessible link to hosted recording.
  • audio_buffer (Bytes) [optional]: Bytes object containing audio file. Use audio_buffer and audio_content_type if you can’t send an audio_url.
  • audio_content_type (String) [optional]: Content type of the provided audio_buffer.
Usage Examples:
conversation_id = "12345"
audio_url = "https://example.com/path/to/your/audiofile.wav"

await Elixir.upload_audio(
    conversation_id=conversation_id,
    audio_url=audio_url
)