v2.0.0
AgentKit alignment for Conversational AI v2.7.
Added
- Alias parity — Exported
SttConfig, session/conversation type aliases,IsAvatarTokenManaged, think type aliases, and cross-SDK discovery table indocs/reference/agent.md. AgoraClient.TelephonyandAgoraClient.PhoneNumbers— AgentKit callers can reach the v2.7 telephony and phone-number REST endpoints without rebuilding the generated client.vendors.NewXaiGrok— xAI Grok MLLM sessions (mllm.vendor:"xai"), matching the TypeScriptXaiGrokshape.NewXAIGrokremains as a deprecated alias.vendors.NewGenericAvatarandIsGenericAvatar— Generic avatar wrapper for custom avatar providers.- Avatar parameter enrichment — Generic avatars get
agora_appid,agora_channel, andagora_tokenfrom the session when omitted; LiveAvatar and HeyGen getagora_tokenauto-generated when omitted. WithGreetingConfigs—llm.greeting_configs, including v2.7interruptable.GetTurnsOptionsandGetAllTurns— Turn pagination helpers.GetAllTurnsreturns the full response with aggregatedTurns.- Think action constants —
ThinkOnListeningAction*,ThinkOnThinkingAction*, andThinkOnSpeakingAction*for v2.7 Think actions. - Interruption constants —
InterruptionModeStartOfSpeech,InterruptionModeKeywords,InterruptionDisabledStrategyAppend, andInterruptionDisabledStrategyIgnorefor the v2.7interruptionobject. - Speak priority constants —
SpeakPriorityInterrupt,SpeakPriorityAppend, andSpeakPriorityIgnoreforAgentSession.Say. - MLLM turn detection constants —
MllmTurnDetectionModeAgoraVad,MllmTurnDetectionModeServerVad, andMllmTurnDetectionModeSemanticVadfor the MLLMturn_detection.modefield. AzureOpenAIOptions.Model— Emitsparams.modelfor parity with the TypeScript SDK; Azure ignores the value for chat completions, but downstream tooling and logs surface it.
Changed
- Repository and module path — The repository has been updated to
AgoraIO/agora-agents-go(formerlyAgoraIO-Conversational-AI/agent-server-sdk-go). Update imports togithub.com/AgoraIO/agora-agents-go/v2. - Go module v2 path alignment —
go.modnow declaresmodule github.com/AgoraIO/agora-agents-go/v2, and all SDK imports/examples use/v2paths so standard Go module resolution works forv2.0.0. - ConvoAI token options —
GenerateConvoAIToken()now accepts an integerUIDand handles the internal token string conversion for users, agents, and avatars. - Avatar token generation — Removed the dedicated
GenerateAvatarRtcToken()wrapper; avatar RTC tokens use the existing ConvoAI token helper. - Session lifecycle naming — Renamed the AgentKit lifecycle type to
AgentSessionLifecycle;SessionStatusis now the generated API status alias. AgentSession.Start— Sends a map-based join payload after preset resolution, preventing generated structs from reintroducing empty provider-owned fields such asllm.url,llm.api_key, ortts.params.key.ToPropertiesMap— Builds vendor configs from maps directly for closer parity with Python and TypeScript AgentKit.GetTurns— Supportspage_indexandpage_size; callers with more than one page should paginate or callGetAllTurns.Agent.ToPropertiesMap— Rejects MLLM + enabled avatar combinations before generating tokens or building properties; avatars currently require the cascading ASR/LLM/TTS pipeline.- Avatar vendor
ToConfig()— HeyGen, LiveAvatar, Akool, Anam, and Generic now spreadAdditionalParamsfirst so required fields likeapi_key,quality, andagora_uidalways take precedence over caller overrides. OpenAIRealtime.ToConfig— ExplicitParams["model"]overrides the namedModel, matching the TypeScript SDK and the existing Gemini/Vertex AI/xAI Grok behavior.
Documentation
- Documented v2.7 error
reasoncodes, Think default behavior, event112, avatar token handling, Generic avatars, xAI Grok, Deepgram TTS, Murf, Anam, LiveAvatar,pause_state_enabled,audio_scenario, andpipeline_id.
Migration Notes
- Deprecated aliases remain for compatibility. Use
NewXaiGrok/XaiGrok/XaiGrokOptionsinstead ofNewXAIGrok/XAIGrok/XAIGrokOptions, andNewLiveAvatarAvatar/LiveAvatarAvatar/LiveAvatarAvatarOptionsinstead ofNewHeyGenAvatar/HeyGenAvatar/HeyGenAvatarOptions. - In v2.7, omitting
ThinkOptions.OnListeningActionuses the server defaultinterrupt. Passagentkit.ThinkOnListeningActionInject.Ptr()to preserve inject-style behavior. - Avatar
AgoraUIDshould be distinct from the sessionAgentUID. The SDK warns on collisions and preserves explicitly provided avatar tokens. - Go consumers should install and import via the
/v2module path, for example:go get github.com/AgoraIO/agora-agents-go/v2@v2.0.0.