Build

ADK

Agent Development Kit patterns for scheduling, retries, and multimodal workflows.

Building blocks

Conversation primitives

Use conversationId and messageId to track multi-step tasks across sessions.

Entitlements

Gate agent capabilities using scopes and features. The gateway enforces them automatically.

Idempotency and retries

Reuse messageId and retry metadata to build explicit retry trails.

Streaming transport

Chat uses SSE; audio and avatar pipelines use WebSocket streaming with authenticated upgrades.

Public contract only

The ADK documents public gateway fields only. Undocumented fields are reserved and may be ignored or rejected.
Scheduling

Schedule chat completions with cron expressions or time windows. Use deadlines to ensure time-sensitive tasks run within a defined window. Scheduling fields are accepted on /v1/chat/completions.

{
  "input": {"text": "Run the daily risk brief."},
  "schedule": {
    "cron": "0 12 * * *",
    "notBeforeEpochMs": 1704110400000,
    "deadlineEpochMs": 1704114000000,
    "priority": 5
  }
}
Retries

Provide retry.ofMessageId and retry.attempt to create explicit retry trails for auditability.

{
  "conversationId": "conv_123",
  "messageId": "msg_456",
  "input": {"text": "Retry the previous prompt with more detail."},
  "retry": {
    "ofMessageId": "msg_123",
    "attempt": 2
  }
}
Multimodal flows

Combine chat completions with speech and avatar streams for voice-driven experiences. Use a single session ID across requests to align audio and animation.

Voice to text

Stream PCM audio into transcription, then feed the transcript into chat completions.

Text to avatar

Send a single text payload to the avatar stream to receive audio and blendshape frames.

Streaming transport

SSE streams handle chat, while WebSocket streams handle audio and avatar pipelines.
Keep your sockets open for the shortest time possible to avoid hitting concurrent stream caps.
Was this page helpful?