Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

On this pageOverview

Inject User

Voice Agent

The InjectUserMessage is a JSON message you can send to the agent to interact with the agent using text. This is useful when you need to trigger an agent response from text input.

The InjectUserMessage message provides a way to have the agent "hear" something without the user actually speaking it. The agent will respond as if the user had spoken the message.

To send the InjectUserMessage message, you need to send the following JSON message to the server:

JSON

JSON
{
  "type": "InjectUserMessage",
  "content": "" // The text phrase or statement the agent should listen for
}

Some common ways to use the InjectUserMessage are:

  • A user using a chat or text interface to interact with an agent.
  • Automated testing of an agent where text is used to trigger an agent response.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu