Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,58 @@ jobs:
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Publish to pypi

- name: Verify package versions match release tag
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
ROOT_VERSION="$(python - <<'PY'
from pathlib import Path
import tomllib
data = tomllib.loads(Path("pyproject.toml").read_text())
print(data["tool"]["poetry"]["version"].lstrip("v"))
PY
)"
COMPAT_VERSION="$(python - <<'PY'
from pathlib import Path
import tomllib
data = tomllib.loads(Path("compat/agora-agent-server-sdk/pyproject.toml").read_text())
print(data["tool"]["poetry"]["version"].lstrip("v"))
PY
)"
COMPAT_DEP_VERSION="$(python - <<'PY'
from pathlib import Path
import tomllib
data = tomllib.loads(Path("compat/agora-agent-server-sdk/pyproject.toml").read_text())
print(data["tool"]["poetry"]["dependencies"]["agora-agents"])
PY
)"

if [ "$ROOT_VERSION" != "$TAG_VERSION" ]; then
echo "Root package version ($ROOT_VERSION) does not match tag version ($TAG_VERSION)."
exit 1
fi

if [ "$COMPAT_VERSION" != "$TAG_VERSION" ]; then
echo "Compat package version ($COMPAT_VERSION) does not match tag version ($TAG_VERSION)."
exit 1
fi

if [ "$COMPAT_DEP_VERSION" != ">=${TAG_VERSION},<3.0.0" ]; then
echo "Compat package dependency on agora-agents ($COMPAT_DEP_VERSION) does not match >=${TAG_VERSION},<3.0.0."
exit 1
fi

- name: Publish primary package to pypi
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

- name: Publish compatibility package to pypi
run: |
cd compat/agora-agent-server-sdk
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Agoraio Python Library

[![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)
[![pypi](https://img.shields.io/pypi/v/agora-agent-server-sdk)](https://pypi.python.org/pypi/agora-agent-server-sdk)
[![pypi](https://img.shields.io/pypi/v/agora-agents)](https://pypi.python.org/pypi/agora-agents)

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

```sh
pip install agora-agent-server-sdk
pip install agora-agents
```

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

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

## Package Rename Compatibility

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.

## MLLM Flow (Multimodal)

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.
Expand Down
13 changes: 13 additions & 0 deletions compat/agora-agent-server-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# agora-agent-server-sdk

This package has been renamed to `agora-agents`.

New projects should install:

```sh
pip install agora-agents
```

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.

It intentionally contains only a minimal compatibility module so the distribution can be built and published cleanly with Poetry.
42 changes: 42 additions & 0 deletions compat/agora-agent-server-sdk/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[project]
name = "agora-agent-server-sdk"

[tool.poetry]
name = "agora-agent-server-sdk"
version = "v2.0.0"
description = "Compatibility shim for the renamed agora-agents package."
readme = "README.md"
authors = []
keywords = []

classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed"
]
packages = [
{ include = "agora_agent_server_sdk_compat", from = "src"}
]

[tool.poetry.urls]
Repository = 'https://github.com/AgoraIO-Conversational-AI/agent-server-sdk-python'

[tool.poetry.dependencies]
python = "^3.8"
agora-agents = ">=2.0.0,<3.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Compatibility package for the renamed agora-agents distribution."""
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[project]
name = "agora-agent-server-sdk"
name = "agora-agents"

[tool.poetry]
name = "agora-agent-server-sdk"
name = "agora-agents"
version = "v2.0.0"
description = ""
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/agora_agent/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "agora-agent-server-sdk/v2.0.0",
"User-Agent": "agora-agents/v2.0.0",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "agora-agent-server-sdk",
"X-Fern-SDK-Name": "agora-agents",
"X-Fern-SDK-Version": "v2.0.0",
**(self.get_custom_headers() or {}),
}
Expand Down
2 changes: 1 addition & 1 deletion src/agora_agent/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from importlib import metadata

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