Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 28 May 17:02
· 57 commits to main since this release

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 in docs/reference/agent.md.
  • AgoraClient.Telephony and AgoraClient.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 TypeScript XaiGrok shape. NewXAIGrok remains as a deprecated alias.
  • vendors.NewGenericAvatar and IsGenericAvatar — Generic avatar wrapper for custom avatar providers.
  • Avatar parameter enrichment — Generic avatars get agora_appid, agora_channel, and agora_token from the session when omitted; LiveAvatar and HeyGen get agora_token auto-generated when omitted.
  • WithGreetingConfigsllm.greeting_configs, including v2.7 interruptable.
  • GetTurnsOptions and GetAllTurns — Turn pagination helpers. GetAllTurns returns the full response with aggregated Turns.
  • Think action constantsThinkOnListeningAction*, ThinkOnThinkingAction*, and ThinkOnSpeakingAction* for v2.7 Think actions.
  • Interruption constantsInterruptionModeStartOfSpeech, InterruptionModeKeywords, InterruptionDisabledStrategyAppend, and InterruptionDisabledStrategyIgnore for the v2.7 interruption object.
  • Speak priority constantsSpeakPriorityInterrupt, SpeakPriorityAppend, and SpeakPriorityIgnore for AgentSession.Say.
  • MLLM turn detection constantsMllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeServerVad, and MllmTurnDetectionModeSemanticVad for the MLLM turn_detection.mode field.
  • AzureOpenAIOptions.Model — Emits params.model for 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 (formerly AgoraIO-Conversational-AI/agent-server-sdk-go). Update imports to github.com/AgoraIO/agora-agents-go/v2.
  • Go module v2 path alignmentgo.mod now declares module github.com/AgoraIO/agora-agents-go/v2, and all SDK imports/examples use /v2 paths so standard Go module resolution works for v2.0.0.
  • ConvoAI token optionsGenerateConvoAIToken() now accepts an integer UID and 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; SessionStatus is 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 as llm.url, llm.api_key, or tts.params.key.
  • ToPropertiesMap — Builds vendor configs from maps directly for closer parity with Python and TypeScript AgentKit.
  • GetTurns — Supports page_index and page_size; callers with more than one page should paginate or call GetAllTurns.
  • 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 spread AdditionalParams first so required fields like api_key, quality, and agora_uid always take precedence over caller overrides.
  • OpenAIRealtime.ToConfig — Explicit Params["model"] overrides the named Model, matching the TypeScript SDK and the existing Gemini/Vertex AI/xAI Grok behavior.

Documentation

  • Documented v2.7 error reason codes, Think default behavior, event 112, avatar token handling, Generic avatars, xAI Grok, Deepgram TTS, Murf, Anam, LiveAvatar, pause_state_enabled, audio_scenario, and pipeline_id.

Migration Notes

  • Deprecated aliases remain for compatibility. Use NewXaiGrok / XaiGrok / XaiGrokOptions instead of NewXAIGrok / XAIGrok / XAIGrokOptions, and NewLiveAvatarAvatar / LiveAvatarAvatar / LiveAvatarAvatarOptions instead of NewHeyGenAvatar / HeyGenAvatar / HeyGenAvatarOptions.
  • In v2.7, omitting ThinkOptions.OnListeningAction uses the server default interrupt. Pass agentkit.ThinkOnListeningActionInject.Ptr() to preserve inject-style behavior.
  • Avatar AgoraUID should be distinct from the session AgentUID. The SDK warns on collisions and preserves explicitly provided avatar tokens.
  • Go consumers should install and import via the /v2 module path, for example: go get github.com/AgoraIO/agora-agents-go/v2@v2.0.0.