For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Ask AIPlaygroundLoginFree API Key
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
  • Get Started
    • Overview
    • Build a Voice Agent
    • Feature Overview
    • Template Apps
  • Configure
    • Overview
    • STT Models
    • LLM Models
    • TTS Models
    • Media Inputs & Outputs
    • Prompting Voice Agents
    • Multilingual Voice Agents
    • Maintaining Context
    • Reusable Agent Configurations
  • Build
    • Multi-Agent Architecture
  • Connect
  • Controls
      • Overview
      • Settings
      • Update Speak
      • Update Think
      • Update Prompt
      • Inject Agent
      • Inject User
      • Agent Keep Alive
  • Optimize
    • Voice Agent TTS Controls
    • Message Flow
    • Audio & Playback
    • Audio Preprocessing & Barge-In
    • Adaptive Echo Cancellation
  • Resources
    • SDKs
    • UI Components
    • API Reference
LogoLogo
Ask AIPlaygroundLoginFree API Key
On this page
  • Purpose
  • Example Payloads
  • Use Cases
ControlsInputs: Client Messages

Inject User

Send a text based message to the agent.
Was this page helpful?
Previous

Agent Keep Alive

Send periodic KeepAlive messages to prevent the WebSocket from timing out during long silences.

Next
Built with
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.

Purpose

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.

Example Payloads

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

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

Use Cases

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.