#what are the exact settings that we should be using if we are using React Native and trying to allo

1 messages · Page 1 of 1 (latest)

stone estuaryBOT
#
AI-generated Answer for josie_n_ember

Short answer: in React Native you must start a session before typing, and you must enable and handle the agent_response event. If agent_response is off, no text replies (including any “first message”) will ever reach your app, even if overrides are enabled.

Exact settings and steps

Agent settings (Dashboard)

  • Advanced tab → Client events: enable at least agent_response. This is required for the agent’s text replies to be delivered to your client. (elevenlabs.io)
  • Security tab → Overrides: enable any overrides you intend to pass (e.g., First message, Text‑only mode). If an override is sent without being allowed here, the platform will reject it. (elevenlabs.io)
  • Optional: set a First message in the agent config if you want the agent to proactively greet on connect. Note this is defined as “the first message the assistant will speak out loud when a user starts a conversation” (i.e., voice-first behavior). Don’t rely on it to appear in chat unless agent_response is enabled and handled. (elevenlabs.io)

React Native client (using @elevenlabs/react-native)

  • Always start a session before sending text:
    • call conversation.startSession({ agentId }) to establish the connection. (elevenlabs.io)
  • For voice mode (user talks, agent speaks):
    • just startSession; request mic permission; the agent will speak and you can also read messages via onMessage/isSpeaking. (elevenlabs.io)
  • For chat mode (user types, agent replies in text):
    • still startSession (RN SDK requires an active session).
    • send text with conversation.sendUserMessage("..."); render incoming agent messages by handling onMessage and filtering for agent responses. (elevenlabs.io)
    • Critical: ensure agent_response is enabled (see Agent settings above); this is explicitly required for chat mode to work. (elevenlabs.io)
  • Optional per‑session behavior:
    • If you want a purely text‑only session (no audio in or out), use “chat mode” by setting conversation.text_only = true via an override when starting the conversation (and allow that override in Security). Chat mode documentation calls out that agent_response must be handled. If you don’t want to force chat globally, only send this override when the user selects “type.” (elevenlabs.io)

Why you’re not seeing a first message when starting by typing

  • In chat mode, the docs emphasize you must handle the agent_response event/callback; otherwise the agent’s text replies (including any initial message) won’t appear. Also, a First message is defined as something the agent “will speak out loud when a user starts a conversation,” so it’s voice-oriented unless you capture it via agent_response. (elevenlabs.io)

Minimal RN flow to support both choices

  • Voice path
    • startSession({ agentId })
    • let the user speak; play agent audio; optionally also surface text from onMessage. (elevenlabs.io)
  • Chat path
    • startSession({ agentId })
    • on user typing: conversation.sendUserMessage(text)
    • in onMessage: display messages when the incoming event is an agent response
    • ensure agent_response is enabled in the agent. (elevenlabs.io)

If

acoustic seal
#

We already have agent_response being handled, as well as text only overide enabled in security, and it still doesn't work

stone estuaryBOT
#
AI-generated Answer for josie_n_ember

Thanks for the details. When an agent “never sends a first message” in text chat, it’s almost always one of these configuration gaps. Please verify each item exactly as below:

  1. Make sure the session is actually in text-only mode at runtime
  • Either create the agent with conversation.conversation.text_only = true, or pass a conversation_config_override that includes "conversation": { "text_only": true } when starting the conversation. The key name must be text_only (snake_case). Also ensure “Text-only mode” overrides are enabled in the agent’s Security tab; otherwise an override is rejected. (elevenlabs.io)

Minimal override structure:
{
"conversation": {
"text_only": true
}
}
Attach this under conversation_config_override in the conversation initiation. (elevenlabs.io)

  1. Enable and handle the agent_response event
  • The agent’s text replies are delivered via the agent_response client event. Confirm you both handle it in your app and have the event enabled in the agent’s Advanced settings (not all client events are enabled by default). (elevenlabs.io)
  1. Provide an initial user message or configure First message
  • In chat mode, the agent won’t speak until a message is sent. Send an initial text with sendUserMessage(...) after startSession, or configure the agent’s First message (or override it, with that override enabled in Security). (elevenlabs.io)
  1. Confirm the conversation actually connects
  • Ensure onConnect is firing and no auth issues exist (agentId for public agents, conversationToken for private agents). If the session isn’t connected, no messages will arrive. (elevenlabs.io)

Common pitfalls we see in this scenario

  • Using textOnly (camelCase) instead of text_only in the override payload; only text_only is accepted. (elevenlabs.io)
  • Forgetting to enable the agent_response client event in the agent’s Advanced tab. (elevenlabs.io)
  • Expecting a proactive greeting without setting First message or sending an initial user message. (elevenlabs.io)

If you’ve checked all of the above and it still fails, please share a recent conversation ID and timestamps; also confirm which of the two approaches you’re using (agent configured as text-only vs. per-session override), and that you see onConnect before calling sendUserMessage. (elevenlabs.io)

Sources:
Chat Mode | ElevenLabs Documentation
Chat Mode | ElevenLabs Documentation
Client events | ElevenLabs Documentation
Chat Mode | ElevenLabs Documentation
React Native SDK | ElevenLabs Documentation
Chat Mode | ElevenLabs Documentation
React Native SDK | ElevenLabs Documentation
Quickstart | ElevenLabs Documentation
React Native SDK | ElevenLabs Documentation

acoustic seal
#

our config is now correct so that the agent's first message is showing correctly, but the session is auto-ending after a few seconds, i have increased the Take turn after silence and it makes no difference