Skip to content

Prepare Python 3.0.0a3 Platform preview release - #114

Open
digitallysavvy wants to merge 62 commits into
mainfrom
feat/v3-api-preview
Open

digitallysavvy wants to merge 62 commits into
mainfrom
feat/v3-api-preview

Conversation

@digitallysavvy

@digitallysavvy digitallysavvy commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the Conversational AI Platform preview to AgentKit: configured agents can be saved or used for explicit ephemeral sessions, saved agents can start RTC or outbound telephone sessions, and shared clients expose agents, secrets, numbers, sessions, and campaigns. The existing session API remains compatible; Platform MLLM support is excluded.

This includes the complete preview branch plus the fixes from the October 28–29 docs-team reports. Latest production main and the upstream preview release changes are integrated. The checked-in openapi.yaml matches the SDK contract snapshot.

Behavior and documentation

  • Correct provider defaults and credential mapping, including Gemini URL-key removal, Amazon Bedrock API-key/access-key-pair support, HeyGen mapping, ARES keywords, and ASR language/endpoint placement.

  • Let the server validate managed OpenAI model availability instead of enforcing a stale model allowlist.

  • Add explicit ephemeral-session and outbound-call helpers, full inbound call policies, optional session analysis, and compatible secret-key metadata responses.

  • Generate RTC tokens for supported fixed UIDs when a certificate is available; preserve caller tokens and retry bodies, and refresh generated tokens for a new unkeyed session.

  • Update guides, examples, reference documentation, and regression coverage.

  • Fix Pydantic version-specific configuration warnings and add Azure resource-name convenience.

  • Preserve synchronous and asynchronous session behavior; automatic local RTC signing uses the existing numeric-UID signer.

  • Document persistent Windows long-path configuration and a short checkout root; generated public import paths are retained.

  • Generate REST authorization tokens with the ConvoAI service (type 9), RTC, and RTM; verify signed token contents and session request headers, while preserving caller-supplied tokens.

  • Preserve provider-required ASR params.language for AssemblyAI, Google, Microsoft, Sarvam, and Speechmatics, including interaction-language overrides.

  • Default Sarvam TTS to bulbul:v3 while preserving explicit model options.

  • Reject malformed App ID/certificate strings, including whitespace accepted by bytes.fromhex; Azure resource_name support already exists in alpha.2.

Validation

  • GitHub Actions CI passed on the final reviewed commit, including tests and build/type checks.
  • Independent Sol and Astra reviews found and resolved additional Go token-expiry and Python credential-validation issues; both re-reviews found no remaining actionable findings.
  • Decoded-token/HMAC assertions and mocked HTTP lifecycle tests cover the authorization regression; live Platform calls were not run.

Contract and release review

  • Agent/secret/number creation idempotency remains excluded per engineering's confirmed contract; agent-create replay semantics still need confirmation.
  • Platform interrupt/speak/context actions remain deferred until supported endpoint schemas are supplied.
  • Campaign retry fields remain hidden per engineering's explicit follow-up. Generic TTS instruction versus instructions still needs confirmation.
  • Response typing tolerates missing analysis and both rollout-era secret-key forms; it does not imply the backend already emits the launch response fields.
  • No live Platform or native Windows tests were run. No new package release or release tag was created by this update. Please review these changes and select/version the next preview release through the repository release process.

Alpha.3 release preparation

Prepared version 3.0.0a3, including package/runtime metadata, compatibility-package constraints where applicable, changelog and installation documentation. Release metadata checks pass. No packages or release tags have been published. GitHub Actions CI passed on the alpha.3 preparation commit.

Product-confirmed authentication

Support both Agora token007 and HTTP Basic authentication using Customer ID/Customer Secret, per product confirmation on October 29. Basic requires a complete credential pair and cannot be mixed with an explicit REST token. An optional App Certificate still signs RTC transport tokens independently. Preserve ConvoAI service 9 in generated tokens, caller token passthrough, and internal-header protections. OpenAPI declares token and Basic as OR alternatives; guides and alpha.3 notes are updated.

Sol and Astra independently reviewed this change and re-reviewed fixes for Go CN credential forwarding and Python case-insensitive Authorization overrides. Final reviews are clean. Focused authentication/lifecycle tests and GitHub Actions CI pass on the pushed commits. Live Platform authentication has not been exercised.

digitallysavvy and others added 30 commits August 21, 2026 13:33
…LLMs

Preview providers are not served by the production Conversational AI
gateway. They live behind a single partner host and are gated by an
`agora-feature` header, so reaching them needs a different base URL and a
pinned request header — neither of which belongs in the generated core
client while the providers are unannounced.

AgoraPreview and AsyncAgoraPreview are drop-in replacements for Agora and
AsyncAgora that supply both. Everything preview-only lives under
`src/agora_agent/agentkit/preview/` so it can be deleted wholesale when
these providers reach the production gateway, and preview symbols stay in
that subpackage rather than being re-exported from `agentkit/__init__.py`.

- The gate header is merged after caller-supplied headers, so a custom
  header map cannot drop or blank it. A request that loses the gate is not
  rejected; it routes to production, where these providers do not exist.
- GeminiWalkieTalkie and GeminiCleverChatter, matching the preview gateway's
  wire contract: `params.api_key` repeated inside `params`, and `url`
  defaulting to the Gemini Developer API host rather than a WebSocket
  endpoint. `thinking_level` is exclusive to clever-chatter, so passing it
  to the other is a validation error rather than a silently ignored
  argument.
- `language_codes` serializes to the plural `params.language_codes`; these
  models never send the singular `params.language`, which belongs to xAI
  Grok in the Agora schema.
- apply_preview_shape retargets MLLM fields the shared Agent builder wrote
  with production spellings: `greeting_message` becomes `greeting`, the
  spelling these models actually read. Keeping the translation here rather
  than teaching the builder about preview spellings means it disappears with
  the preview package at GA. A config is recognised by model name or by its
  wire envelope, so an unlisted model name does not silently skip the
  rename.
- The vendors reject `api_key=""`, which pydantic's required-field check
  alone would accept and send as a blank credential.
- assert_preview_support raises before any request when preview providers
  are paired with a plain Agora client, reading the resolved request body so
  hand-written configs are covered too.
- Preview configs bypass request validation: the generated request models
  mirror what production serves, so a preview config fails validation.
  Configs that required_preview_features() recognises are passed through
  unvalidated, with None entries stripped so the bypass puts the same bytes
  on the wire as the typed path. Production configs are unaffected.
- redact_secrets keeps vendor API keys, RTC tokens and the App ID out of
  `debug=True` output and out of the httpx request log, which previously
  echoed raw request bodies. Empty strings stay visible so an unset
  environment variable remains diagnosable.
- generate_rtc_token and generate_convo_ai_token raise ValueError on a
  malformed app_id or app_certificate. The signing path HMACs whatever it is
  given, so a truncated paste produced a well-formed token the gateway
  rejected with an error naming neither field; the message now names the
  field whose length is wrong without echoing either value.

Documented in docs/guides/preview-endpoint.md, including the gateway's
intake-node failure signatures, the validation bypass, and how to add a
future preview family.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
digitallysavvy and others added 27 commits October 27, 2026 08:01
# Conflicts:
#	changelog.md
#	src/agora_agent/agentkit/agent.py
#	tests/custom/test_gemini_tts.py
@digitallysavvy digitallysavvy changed the title Add Platform API preview and resolve Python SDK docs feedback Prepare Python 3.0.0a3 Platform preview release Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants