Skip to main content

Agent-to-Agent Conversations

Agents can hold conversations with each other in the background, without any player involvement or UI.

These headless conversations use the same chat tree data and node resolution logic as player conversations, but run entirely without panels, cameras, or player input.

How they differ from player conversations

The main differences:

  • no dialogue panel UI is shown (but overhead world-space text can appear above agents)
  • no camera framing occurs
  • responses are selected automatically (the first available connection is chosen)
  • the player is not blocked or prompted
  • the world is not paused
  • multiple headless conversations can run concurrently

This makes agent-to-agent conversations suitable for ambient world chatter, overheard exchanges, and NPC social interactions that happen in the background.

Overhead text

When overhead dialogue text is enabled in module settings, text appears floating above the speaking agent's head during headless conversations. This lets nearby players see what NPCs are saying without a full dialogue panel.

Configure this in BardTreeLtd/Dialogue/Module Settings, under the UI > Overhead Text section. The Headless Only option restricts overhead text to agent-to-agent conversations only.

See UI and Theming for the full list of overhead text settings.

Player interruption

If the player starts a conversation with an agent who is currently in a headless conversation, the headless conversation is ended automatically before the player conversation opens. This ensures the agent is always available for player interaction.

How they work

AgentConversationOrchestrator manages all headless conversations. It tracks active conversations by agent ID and prevents an agent from being in two conversations at once.

When a conversation is initiated:

  1. the orchestrator creates a HeadlessConversationController
  2. an AgentConversationSession is opened for the participants
  3. the controller navigates the chat tree using the same ChatNodeNavigator and DialogueNodeResolver as player conversations
  4. HeadlessAutoAdvanceResponseService selects the first available connection at each branch point
  5. when an end node is reached or no connections remain, the conversation closes

Sessions

AgentConversationSession manages a multi-participant session (currently two participants: initiator and target). It handles:

  • resolving dialogue agent services for each participant
  • acquiring agent control through policies
  • clearing conversation-scoped blackboard values
  • raising conversation events
Requires CIVIL-AI-SYSTEM

When CIVIL-AI-SYSTEM is installed, the CivilConversationAgentControlPolicy is registered automatically. It pauses each agent's behaviour tree during the conversation and resumes it when the conversation ends. Without CivilAI, a no-op policy is used.

Events

Headless conversations raise the same events as player conversations through DialogueEventingService:

  • ConversationStarted
  • ConversationEnded
  • NodeEntered
  • BeatDisplayed
  • OptionSelected

External systems can subscribe to these events to react to agent conversations -- for example, nearby agents eavesdropping on a conversation.

Practical advice

Agent conversations work best when the tree content is written to make sense without player interaction. Keep dialogue short, avoid complex branching that assumes a human is choosing, and use auto-progression timing that feels natural for background chatter.

Next step

Continue to Conversation Triggers.