Releases: AgoraIO/agora-agents-python
Release list
v2.4.1
v2.4.0
Added
- Area-aware default ASR vendor selection — The default ASR vendor is now chosen based on the client area, with updated documentation and tests.
- New engine API vendors — Adapted agentkit to the new engine API vendors, with refreshed vendor and regional routing guides.
Changed
- Gemini / Vertex LLM configuration — Aligned Gemini and Vertex LLM config handling; the URL is now always included in Gemini and Vertex LLM configurations, and
project_id,location, andadc_credentials_stringare passed underparamsin the VertexAI configuration.
Fixed
- Avatar configurations —
SenseTimeAvatarnow treatssceneListas optional, andAnamAvatarrequiresavatar_idinstead ofpersona_id.
v2.3.0
Added
- CN vendor support — Area-aware
Agora/AsyncAgoraclients andAgentbuilders (CNAgent/GlobalAgent) with a CN vendor catalog and CN/global API routing. The bound client does not enforce area/vendor compatibility, so CN and global vendors can be mixed. - SenseTime avatar — Added
SenseTimeAvatarconfiguration and validation.
Changed
turn_detectionaccepts a dict —Agent(turn_detection=...)now also accepts a plain mapping in addition to the typed config; it is coerced into the request model when the start request is built.
Fixed
- Python 3.8 compatibility — Replaced PEP 585 builtin generics (
list[...]) in the new vendor models withtypingequivalents so pydantic can build the models on Python 3.8.
v2.2.0
Added
- Expanded provider surface — Added generated API support for the latest Conversational AI vendors and configuration types, including Dify LLM and Generic Avatar.
- Interaction language handling — AgentKit now consistently derives REST
asr.languagefromturn_detection.languagewhile keeping provider-specific STT language values underasr.params. - Deepgram keyterm — Added
keytermsupport onDeepgramSTT, serialized asasr.params.keyterm.
Changed
- MiniMax managed presets — MiniMax preset-backed TTS now keeps the preset model as an internal hint while sending only supported partial TTS settings such as
voice_setting.voice_id. - Vertex AI LLM routing —
VertexAILLMnow keeps project and location in the generated endpoint URL instead of duplicating them inllm.params.
Fixed
- Provider wire keys — Corrected alias-sensitive TTS payloads so Google TTS emits
VoiceSelectionParamsandAudioConfig, Rime TTS emitsmodelId, and Murf TTS preservesvoiceId. - AgentKit request validation — Start request validation now de-aliases REST-shaped provider dictionaries before constructing generated request models, while still allowing preset and pipeline-backed partial configs.
- Request body coverage — Added regression tests for BYOK, preset-backed, mixed preset/BYOK, and pipeline override request shapes across provider configurations.
- Python docs examples — Added a docs guard to keep Python examples on snake_case kwargs while allowing documented JSON wire keys.
v2.1.1
v2.1.0
Added
- Turn detection language — AgentKit now manages Agora interaction language through
turn_detection.language, validates it against the supported BCP-47 language list, and sends the defaulten-USwhen no language is provided. - Provider parameter parity — ASR, LLM, MLLM, TTS, and avatar wrappers expose typed provider parameters plus passthrough fields where the generated core supports additional properties.
Changed
- Generated core refresh — Regenerated core types from the v2.1 API schema.
- Deepgram TTS passthrough —
DeepgramTTSnow usesadditional_paramsfor passthrough fields and flattens them intotts.params; the removed nestedparams.paramsshape is no longer documented or emitted. - OpenAI TTS — Docs and tests now reflect the generated core shape, including
instructionsandspeedundertts.params. - TTS provider docs — Updated TTS provider reference tables to match implemented wrapper fields and generated core params.
Fixed
- Managed-provider validation — AgentKit validation now distinguishes preset-backed providers from BYOK providers so required provider fields are only required when credentials are caller-supplied.
- Language placement — Provider-specific STT language values remain under
asr.params, while Agora interaction language is emitted separately asturn_detection.language.
v2.0.0
Added
- Type aliases —
AsrConfig(=SttConfig),is_avatar_token_managed, think type aliases (ThinkOnListeningAction, etc.), and think value constants. XaiGrok— New MLLM wrapper for xAI Grok (mllm.vendor:"xai"), including Realtime API URL, voice, language, sample rate, modalities, messages, and MLLM turn detection support.GenericAvatar— New generic avatar wrapper (vendor: "generic") for custom avatar providers.- Avatar token enrichment —
AgentSession.start()now fills missing generic avataragora_appidandagora_channelfrom the session and generates missing avataragora_tokenvalues for HeyGen, LiveAvatar, and Generic avatars using each avatar'sagora_uid. - Turn pagination —
AgentSession.get_turns()andAsyncAgentSession.get_turns()now acceptpage_indexandpage_size. Newget_all_turns()helpers fetch and combine all pages. - Greeting interruption control — LLM vendor
greeting_configsnow accepts the typedLlmGreetingConfigsshape, including v2.7interruptable. - Type alias parity — Added public aliases for v2.7 generated types such as
LlmConfig,TtsConfig,SttConfig,MllmConfig,AvatarConfig,AgentConfigUpdate,ConversationTurns,ConversationHistory,SessionInfo,Labels,SpeakPriority, andFillerWordsContentSelectionRule.
Changed
- ConvoAI token options —
generate_convo_ai_token()now accepts an integeruidand handles the internal token string conversion for users, agents, and avatars. - Avatar token generation — Removed the dedicated
generate_avatar_rtc_token()wrapper; avatar RTC tokens use the existing ConvoAI token helper. - Avatar token gating — Session enrichment uses
is_avatar_token_managed(vendor-only); UID checks remain in session logic. XaiGrokis the primary xAI MLLM class — Matches the product name (xAI Grok) and the TypeScript/Go SDKs.- Package version — Bumped to
v2.0.0to match the Fern-generated SDK headers. - PyPI distribution rename — The published package name is now
agora-agents(formerlyagora-agent-server-sdk). The Python import path remainsagora_agent. - RTM data channel default — When
advanced_features.enable_rtm=True, AgentKit now defaultsparameters.data_channelto"rtm"unless the caller explicitly sets a data channel. - Agent-level LLM overrides — In the standard ASR + LLM + TTS pipeline, agent-level
greeting,failure_message, andmax_historynow override vendor defaults, matching the TypeScript SDK. In MLLM mode, agent-levelgreetingandfailure_messagefill only missing fields. - MLLM core alignment — MLLM wrappers no longer expose or emit unsupported
predefined_toolsormax_historyfields because they are not present in the generated v2.7 coremllmtype. - MLLM without TTS — MLLM sessions no longer require separate TTS, STT, or LLM vendor configuration.
- Avatar pipeline support — Avatar vendors are now explicitly limited to the cascading ASR + LLM + TTS pipeline. Combining
with_avatar()withwith_mllm()is rejected atAgent.to_properties()andAgentSession.start()(matching the TypeScript SDK), with a disabled avatar (enable=False) still permitted alongside MLLM. - VertexAI parity —
VertexAI.to_config()now spreadsadditional_paramsfirst so explicitmodel,project_id,location, andadc_credentials_stringfields always win, matching the TypeScript and Gemini Live wrappers. - Pagination guard parity —
AgentSession.get_all_turns()andAsyncAgentSession.get_all_turns()now raiseRuntimeErrorif the server's pagination metadata is missing (page_index/total_pages/is_last_page) or if the next page does not advance, matching the TypeScript SDK.
Migration notes
-
PyPI package rename — Install
agora-agentsinstead ofagora-agent-server-sdk(pip install agora-agentsorpoetry add agora-agents). The import path is unchanged (from agora_agent import ...). The legacy PyPI distribution name remains available as a compatibility shim that re-exports the public API fromagora-agents. -
Deprecated aliases — Use
LiveAvatarAvatarinstead ofHeyGenAvatar,is_avatar_token_managedinstead ofis_rtc_avatar, andThinkOn*/ThinkResponseinstead ofAgentThinkRequestOn*/AgentThinkResponse. -
think()default — The server default foron_listening_actionchanged frominjecttointerruptin API v2.7. Passon_listening_action="inject"explicitly to preserve the old behavior. -
Turn analytics pagination — Sessions with more than 50 turns must request additional pages via
get_turns(page_index=..., page_size=...)or useget_all_turns(). -
Error reasons — API v2.7 adds status codes
401,429, and500;InvalidRequestis split intoInvalidRequestBody,MissingRequiredField, andInvalidFieldValue, with new reasons such asServiceNotEnabled,AccountSuspended, andResourceAllocationFailed. -
Event
112— Webhook event112 turns finishedcan be used as an alternative batch delivery path for post-session turn data.
v1.4.1
Fixed
- Release workflow — Publish to PyPI with the
PYPI_API_TOKENsecret.
v1.4.0
Added
DeepgramTTS— New TTS vendor wrapper for Deepgram (Beta). Acceptsapi_key,model,base_url,sample_rate,params, andskip_patterns.Agent.with_tools(enabled=True)— Dedicated builder method to enable MCP tool invocation (advanced_features.enable_tools). Replaces the rawwith_advanced_features(AdvancedFeatures(enable_tools=True))call.- LLM vendors:
headersfield — All four LLM vendors (OpenAI,AzureOpenAI,Anthropic,Gemini) now accept an optionalheaders: Dict[str, str]parameter. Use this to pass custom HTTP headers to the LLM provider (e.g., tenant identifiers, routing headers). AgentSession.think()/AsyncAgentSession.think()— Send a custom instruction to a running agent through theagent_managementAPI.Agent.with_interruption()— Configure the new top-levelinterruptionobject for unified interruption control.- MLLM turn detection —
OpenAIRealtime,GeminiLive, andVertexAInow acceptturn_detection, which maps tomllm.turn_detectionand overrides top-level turn detection for MLLM sessions. audio_scenarioAgentKit support —SessionParamsand AgentKit request construction now expose the top-levelparameters.audio_scenariofield.- MLLM vendor parity —
GeminiLiveis documented and exposed as the direct Google Gemini Live API wrapper.
Fixed
- MiniMax TTS preset stripping — When a MiniMax reseller preset is inferred (
minimax_speech_2_6_turboorminimax_speech_2_8_turbo), thegroup_idandurlfields are now correctly stripped fromtts.paramsalongsidekeyandmodel. Previously they were forwarded to the API, causing request failures. - MLLM enable flag —
Agent.with_mllm()now setsmllm.enable = Trueand removes the deprecatedadvanced_features.enable_mllmflag from generated requests. - MLLM wrapper shape — MLLM vendors no longer emit removed fields such as
style; docs and tests now reflect the v2.6 MLLM contract. - Preset-backed OpenAI TTS —
OpenAITTSno longer requiresapi_keywhen a reseller preset supplies credentials server-side. - AgentKit parity coverage — Added regression coverage for interruption, MLLM turn detection, Deepgram TTS, LLM headers, and deprecated MLLM flag cleanup.