Skip to main content
Post

@deepgram/react 0.2.0: @deepgram/react 0.2.0 adds runtime Voice Agent controls and makes React session lifecycle…

@deepgram/react 0.2.0 added runtime controls for changing a Voice Agent during a connected session, without recreating the provider.

You can use updatePrompt() to change its instructions and sendAgentMessage() to inject a message with interrupt behavior. Callbacks let you observe server confirmations for changes to listening, prompts, speaking, and thinking settings. AgentMode also includes thinking.

This is a breaking release. Exhaustive AgentMode switches need to handle thinking, and typed mocks and wrappers must supply the new required members. registerClientTool() returns an unsubscribe function; calls that ignore the return value still work.

Manual start() calls reject on failure, so handle the returned promise. useDeepgramAgent().start() also clears the conversation before connecting to a fresh session. Keep any transcript you need across restarts outside the hook, or restore it afterward.

Loading replies…