Skip to content

Commit 4323b47

Browse files
rename python package to agora-agents
1 parent 7465fad commit 4323b47

7 files changed

Lines changed: 112 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,58 @@ jobs:
5151
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
5252
- name: Install dependencies
5353
run: poetry install
54-
- name: Publish to pypi
54+
55+
- name: Verify package versions match release tag
56+
run: |
57+
TAG_VERSION="${GITHUB_REF_NAME#v}"
58+
ROOT_VERSION="$(python - <<'PY'
59+
from pathlib import Path
60+
import tomllib
61+
data = tomllib.loads(Path("pyproject.toml").read_text())
62+
print(data["tool"]["poetry"]["version"].lstrip("v"))
63+
PY
64+
)"
65+
COMPAT_VERSION="$(python - <<'PY'
66+
from pathlib import Path
67+
import tomllib
68+
data = tomllib.loads(Path("compat/agora-agent-server-sdk/pyproject.toml").read_text())
69+
print(data["tool"]["poetry"]["version"].lstrip("v"))
70+
PY
71+
)"
72+
COMPAT_DEP_VERSION="$(python - <<'PY'
73+
from pathlib import Path
74+
import tomllib
75+
data = tomllib.loads(Path("compat/agora-agent-server-sdk/pyproject.toml").read_text())
76+
print(data["tool"]["poetry"]["dependencies"]["agora-agents"])
77+
PY
78+
)"
79+
80+
if [ "$ROOT_VERSION" != "$TAG_VERSION" ]; then
81+
echo "Root package version ($ROOT_VERSION) does not match tag version ($TAG_VERSION)."
82+
exit 1
83+
fi
84+
85+
if [ "$COMPAT_VERSION" != "$TAG_VERSION" ]; then
86+
echo "Compat package version ($COMPAT_VERSION) does not match tag version ($TAG_VERSION)."
87+
exit 1
88+
fi
89+
90+
if [ "$COMPAT_DEP_VERSION" != ">=${TAG_VERSION},<3.0.0" ]; then
91+
echo "Compat package dependency on agora-agents ($COMPAT_DEP_VERSION) does not match >=${TAG_VERSION},<3.0.0."
92+
exit 1
93+
fi
94+
95+
- name: Publish primary package to pypi
96+
run: |
97+
poetry config repositories.remote https://upload.pypi.org/legacy/
98+
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
99+
env:
100+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
101+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
102+
103+
- name: Publish compatibility package to pypi
55104
run: |
105+
cd compat/agora-agent-server-sdk
56106
poetry config repositories.remote https://upload.pypi.org/legacy/
57107
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
58108
env:

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 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/agora-agent-server-sdk)](https://pypi.python.org/pypi/agora-agent-server-sdk)
4+
[![pypi](https://img.shields.io/pypi/v/agora-agents)](https://pypi.python.org/pypi/agora-agents)
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)
@@ -37,7 +37,7 @@ and multimodal flows (MLLM) for real-time audio processing.
3737
## Installation
3838

3939
```sh
40-
pip install agora-agent-server-sdk
40+
pip install agora-agents
4141
```
4242

4343
## Quick Start
@@ -216,6 +216,10 @@ API reference documentation is available [here](https://docs.agora.io/en/convers
216216

217217
A full reference for this library is available [here](https://github.com/AgoraIO-Conversational-AI/agent-server-sdk-python/blob/HEAD/./reference.md).
218218

219+
## Package Rename Compatibility
220+
221+
The published package name is now `agora-agents`, while the Python import path remains `agora_agent` for compatibility. The legacy PyPI distribution name `agora-agent-server-sdk` is maintained as a compatibility package in [compat/agora-agent-server-sdk](./compat/agora-agent-server-sdk), and the tag-based release workflow publishes both distributions together.
222+
219223
## MLLM Flow (Multimodal)
220224

221225
For real-time audio processing using OpenAI Realtime, Gemini Live, Vertex AI, or xAI Grok, use the MLLM (Multimodal Large Language Model) flow instead of the cascading ASR -> LLM -> TTS flow. MLLM mode does not require separate TTS, STT, or LLM vendors. See the [MLLM Overview](https://docs.agora.io/en/conversational-ai/models/mllm/overview) for more details.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# agora-agent-server-sdk
2+
3+
This package has been renamed to `agora-agents`.
4+
5+
New projects should install:
6+
7+
```sh
8+
pip install agora-agents
9+
```
10+
11+
This compatibility package is kept only to preserve the legacy distribution name during the migration window. It depends on `agora-agents`, which continues to provide the `agora_agent` Python import path.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[project]
2+
name = "agora-agent-server-sdk"
3+
4+
[tool.poetry]
5+
name = "agora-agent-server-sdk"
6+
version = "v2.0.0"
7+
description = "Compatibility shim for the renamed agora-agents package."
8+
readme = "README.md"
9+
authors = []
10+
keywords = []
11+
12+
classifiers = [
13+
"Intended Audience :: Developers",
14+
"Programming Language :: Python",
15+
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python :: 3.8",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Operating System :: OS Independent",
22+
"Operating System :: POSIX",
23+
"Operating System :: MacOS",
24+
"Operating System :: POSIX :: Linux",
25+
"Operating System :: Microsoft :: Windows",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
27+
"Typing :: Typed"
28+
]
29+
30+
[tool.poetry.urls]
31+
Repository = 'https://github.com/AgoraIO-Conversational-AI/agent-server-sdk-python'
32+
33+
[tool.poetry.dependencies]
34+
python = "^3.8"
35+
agora-agents = ">=2.0.0,<3.0.0"
36+
37+
[build-system]
38+
requires = ["poetry-core"]
39+
build-backend = "poetry.core.masonry.api"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[project]
2-
name = "agora-agent-server-sdk"
2+
name = "agora-agents"
33

44
[tool.poetry]
5-
name = "agora-agent-server-sdk"
5+
name = "agora-agents"
66
version = "v2.0.0"
77
description = ""
88
readme = "README.md"

src/agora_agent/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def __init__(
2626

2727
def get_headers(self) -> typing.Dict[str, str]:
2828
headers: typing.Dict[str, str] = {
29-
"User-Agent": "agora-agent-server-sdk/v2.0.0",
29+
"User-Agent": "agora-agents/v2.0.0",
3030
"X-Fern-Language": "Python",
31-
"X-Fern-SDK-Name": "agora-agent-server-sdk",
31+
"X-Fern-SDK-Name": "agora-agents",
3232
"X-Fern-SDK-Version": "v2.0.0",
3333
**(self.get_custom_headers() or {}),
3434
}

src/agora_agent/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from importlib import metadata
22

3-
__version__ = metadata.version("agora-agent-server-sdk")
3+
__version__ = metadata.version("agora-agents")

0 commit comments

Comments
 (0)