#Is there any code example showing two ElevenLabs conversational agents speaking to each other? Idea

1 messages · Page 1 of 1 (latest)

novel meteorBOT
#
AI-generated Answer for culpritgene

Short answer: I can’t find an official ElevenLabs example that spins up two Conversational AI agents and has them talk to each other headlessly. The public docs and blog don’t include a ready‑made “agent↔agent” sample.

Closest official options you can use to achieve a headless setup:

  • Chat Mode (text‑only): Run each agent in text‑only mode and programmatically relay messages between two Conversation instances using the SDK (send_user_message and response callbacks). This avoids any audio devices. See the Chat Mode guide for Python/JS snippets and the text_only override. (elevenlabs.io)
  • Simulation API: Run a headless conversation between an agent and a “simulated user” (defined via AgentConfig). This is one‑agent‑vs‑simulated‑user rather than two agents, but it’s the only turnkey headless conversation example with code (Python/TS) and a streaming variant. (elevenlabs.io)
  • Agent WebSocket API: If you want to build your own bridge, the realtime WebSocket spec shows the message types (user_message, agent_response, etc.) you’d relay between two sessions. There isn’t an official bridging sample, but this is the low‑level interface to implement one. (elevenlabs.io)
  • Python SDK basics: Shows how to start a Conversation and notes you can implement your own audio interface (or skip audio entirely when using Chat Mode). (elevenlabs.io)
  • Related but not headless: The GibberLink blog post demonstrates two agents conversing via audio/data‑over‑sound; it’s useful inspiration but relies on sound I/O, not a headless transport. (elevenlabs.io)
  • Agent‑to‑agent transfer: Official workflow to hand off a live conversation from one agent to another (not two‑way chatting). (elevenlabs.io)

If you need an official, copy‑paste example specifically for two agents talking to each other headlessly, it isn’t in the docs today. The supported path is to use Chat Mode and relay messages between two conversations yourself using the SDK/WebSocket primitives referenced above. (elevenlabs.io)

Sources:
Chat Mode | ElevenLabs Documentation
Simulate Conversations | ElevenLabs Documentation
Agent WebSockets | ElevenLabs Documentation
Python SDK | ElevenLabs Documentation
Gibberlink: Two AI voice assistants have a conversation | ElevenLabs
Agent-agent transfer | ElevenLabs Documentation
Chat Mode | ElevenLabs Documentation

lilac dew
#

Simulation API is only for text now, right? Any stated plans to include voice based testing?