Skip to content

Commit fec8949

Browse files
SDK regeneration
1 parent 6df0d46 commit fec8949

30 files changed

Lines changed: 859 additions & 173 deletions

.github/workflows/ci.yml

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,60 @@
11
name: ci
2-
3-
on:
4-
push:
5-
workflow_dispatch:
6-
2+
on: [push]
73
jobs:
84
compile:
95
runs-on: ubuntu-latest
106
steps:
117
- name: Checkout repo
12-
uses: actions/checkout@v6
13-
8+
uses: actions/checkout@v4
149
- name: Set up python
15-
uses: actions/setup-python@v6
10+
uses: actions/setup-python@v4
1611
with:
17-
python-version: '3.8'
18-
12+
python-version: 3.8
1913
- name: Bootstrap poetry
20-
run: curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
21-
14+
run: |
15+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
2216
- name: Install dependencies
2317
run: poetry install
24-
2518
- name: Compile
2619
run: poetry run mypy .
27-
2820
test:
2921
runs-on: ubuntu-latest
3022
steps:
3123
- name: Checkout repo
32-
uses: actions/checkout@v6
33-
24+
uses: actions/checkout@v4
3425
- name: Set up python
35-
uses: actions/setup-python@v6
26+
uses: actions/setup-python@v4
3627
with:
37-
python-version: '3.8'
38-
28+
python-version: 3.8
3929
- name: Bootstrap poetry
40-
run: curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
41-
30+
run: |
31+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
4232
- name: Install dependencies
4333
run: poetry install
4434

4535
- name: Test
4636
run: poetry run pytest -rP .
37+
38+
publish:
39+
needs: [compile, test]
40+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout repo
44+
uses: actions/checkout@v4
45+
- name: Set up python
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: 3.8
49+
- name: Bootstrap poetry
50+
run: |
51+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
52+
- name: Install dependencies
53+
run: poetry install
54+
- name: Publish to pypi
55+
run: |
56+
poetry config repositories.remote https://upload.pypi.org/legacy/
57+
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
58+
env:
59+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
60+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/release.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Agora Agent Server SDK for Python
1+
# Agoraio Python Library
22

33
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FAgoraIO-Conversational-AI%2Fagent-server-sdk-python)
4-
[![pypi](https://img.shields.io/pypi/v/agent-server-sdk-python)](https://pypi.python.org/pypi/agent-server-sdk-python)
4+
[![pypi](https://img.shields.io/pypi/v/agora-agent-server-sdk)](https://pypi.python.org/pypi/agora-agent-server-sdk)
55

66
The Agora Conversational AI SDK provides convenient access to the Agora Conversational AI APIs,
77
enabling you to build voice-powered AI agents with support for both cascading flows (ASR -> LLM -> TTS)
@@ -30,7 +30,7 @@ and multimodal flows (MLLM) for real-time audio processing.
3030
## Installation
3131

3232
```sh
33-
pip install agent-server-sdk-python
33+
pip install agora-agent-server-sdk
3434
```
3535

3636
## Quick Start
@@ -155,37 +155,36 @@ A full reference for this library is available [here](https://github.com/AgoraIO
155155
For real-time audio processing using OpenAI's Realtime API or Google Gemini Live, use the MLLM (Multimodal Large Language Model) flow instead of the cascading ASR -> LLM -> TTS flow. See the [MLLM Overview](https://docs.agora.io/en/conversational-ai/models/mllm/overview) for more details.
156156

157157
```python
158-
from agora_agent import Agora, Area
159-
from agora_agent.agentkit import (
160-
AdvancedFeatures,
161-
TurnDetectionConfig,
162-
TurnDetectionTypeValues,
163-
)
164-
from agora_agent.agents import (
158+
from agora-agent-server-sdk import Agora
159+
from agora-agent-server-sdk.agents import (
165160
StartAgentsRequestProperties,
161+
StartAgentsRequestPropertiesAdvancedFeatures,
166162
StartAgentsRequestPropertiesMllm,
167163
StartAgentsRequestPropertiesMllmVendor,
168164
StartAgentsRequestPropertiesTts,
169165
StartAgentsRequestPropertiesTtsVendor,
170166
StartAgentsRequestPropertiesLlm,
167+
StartAgentsRequestPropertiesTurnDetection,
168+
StartAgentsRequestPropertiesTurnDetectionType,
171169
)
172170

173171
client = Agora(
174-
area=Area.US,
175-
app_id="YOUR_APP_ID",
176-
app_certificate="YOUR_APP_CERTIFICATE",
172+
customer_id="YOUR_CUSTOMER_ID",
173+
customer_secret="YOUR_CUSTOMER_SECRET",
177174
)
178175

179176
client.agents.start(
180-
client.app_id,
177+
appid="your_app_id",
181178
name="mllm_agent",
182179
properties=StartAgentsRequestProperties(
183180
channel="channel_name",
184181
token="your_token",
185182
agent_rtc_uid="1001",
186183
remote_rtc_uids=["1002"],
187184
idle_timeout=120,
188-
advanced_features=AdvancedFeatures(enable_mllm=True),
185+
advanced_features=StartAgentsRequestPropertiesAdvancedFeatures(
186+
enable_mllm=True,
187+
),
189188
mllm=StartAgentsRequestPropertiesMllm(
190189
url="wss://api.openai.com/v1/realtime",
191190
api_key="<your_openai_api_key>",
@@ -198,8 +197,8 @@ client.agents.start(
198197
output_modalities=["text", "audio"],
199198
greeting_message="Hello! I'm ready to chat in real-time.",
200199
),
201-
turn_detection=TurnDetectionConfig(
202-
type=TurnDetectionTypeValues.SERVER_VAD, # deprecated; use config.end_of_speech instead
200+
turn_detection=StartAgentsRequestPropertiesTurnDetection(
201+
type=StartAgentsRequestPropertiesTurnDetectionType.SERVER_VAD,
203202
threshold=0.5,
204203
silence_duration_ms=500,
205204
),
@@ -215,6 +214,7 @@ client.agents.start(
215214
)
216215
```
217216

217+
218218
## MLLM Flow (Multimodal)
219219

220220
For real-time audio processing using OpenAI's Realtime API or Google Gemini Live, use the MLLM (Multimodal Large Language Model) flow instead of the cascading ASR -> LLM -> TTS flow. See the [MLLM Overview](https://docs.agora.io/en/conversational-ai/models/mllm/overview) for more details.

0 commit comments

Comments
 (0)