Skip to content

Example: Record a Voice Agent session as JSON #775

Description

@deepgram-robot

Summary

Add a standalone Voice Agent example that demonstrates application-owned session recording. The example collects selected server events during one session and serializes a JSON record when the session finishes.

Why an example

Session recording, storage, consent, retention, and redaction policies belong to each application. The SDK should continue to expose the Voice Agent event stream without retaining customer conversation data or adding a persistence abstraction.

Example behavior

  • Collect received conversation text, function-call requests and responses, and latency-report events when present.
  • Build a JSON-serializable session record after the connection closes.
  • Record only data delivered by the server; do not invent speaker attribution, audio segment references, or per-component latency fields.
  • Do not capture or store audio.
  • Include a clear warning that transcripts and tool arguments/results can contain sensitive data; applications must apply their own consent, redaction, retention, and storage policy.

Acceptance criteria

  • Runs as a standalone Voice Agent example using the current SDK event API.
  • Demonstrates an application-owned recorder and JSON serialization.
  • Does not add runtime dependencies or change generated SDK code.
  • Documents the data-handling caveat in the example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions