Skip to content

Chat Session Operator

The Chat Session LOP facilitates the creation, management, and control of multi-agent chat conversations within TouchDesigner. It allows users to define agent roles, set conversation rules, inject system or user messages, and monitor the flow of dialogue. This operator is particularly useful for prototyping conversational AI applications, testing agent interactions, and creating controlled chat environments.

  • Properly configured Agent LOPs connected within the network.
  • No additional Python packages required.

None

  • Conversation Log (DAT): Stores complete chat history (roles, messages, agent IDs, timestamps, round numbers).
  • Event History (DAT): Records session events (start, agent additions, round advancements).
  • Agent States (DAT): Tracks the status of each agent (IDLE, READY, ACTIVE, COMPLETE, ERROR).
  • Configuration (DAT): Stores session configuration parameters as JSON.
Status (Status) op('chat_session').par.Status String
Default:
None
Chat is Active (Active) op('chat_session').par.Active Toggle
Default:
None
Current Round (Currentround) op('chat_session').par.Currentround Integer
Default:
None
Current Agent (Currentagent) op('chat_session').par.Currentagent Menu
Default:
None
Agent Count (Agentcount) op('chat_session').par.Agentcount Integer
Default:
None
Template Name (Template) op('chat_session').par.Template String
Default:
None
Role Mode (Rolemode) op('chat_session').par.Rolemode Menu
Default:
default
Options:
default, structured
Max Rounds (Maxrounds) op('chat_session').par.Maxrounds Integer
Default:
None
Max Empty Retries (Maxretries) op('chat_session').par.Maxretries Integer
Default:
None
Set Pars From Python (Setpars) op('chat_session').par.Setpars Toggle
Default:
On
Begin / Restart Session (Beginsession) op('chat_session').par.Beginsession Pulse
Default:
None
Extend Session (+1 round) (Extendsession) op('chat_session').par.Extendsession Pulse
Default:
None
End Session (Endsession) op('chat_session').par.Endsession Pulse
Default:
None
Pause Session (Pausesession) op('chat_session').par.Pausesession Pulse
Default:
None
Play Session (Playsession) op('chat_session').par.Playsession Pulse
Default:
None
Clear Conversation (Clearconversation) op('chat_session').par.Clearconversation Pulse
Default:
None
Chat System Message (Systemmessage) op('chat_session').par.Systemmessage String
Default:
None
Send User Message (Usermessage) op('chat_session').par.Usermessage Pulse
Default:
None
Message (Message) op('chat_session').par.Message String
Default:
None
Add Single Agent (Addsingleagent) op('chat_session').par.Addsingleagent Pulse
Default:
None
Agent OP (Agentop) op('chat_session').par.Agentop OP
Default:
None
Reset / Remove Agents (Resetsession) op('chat_session').par.Resetsession Pulse
Default:
None
Bypass (Bypass) op('chat_session').par.Bypass Toggle
Default:
Off
Show Built-in Parameters (Showbuiltin) op('chat_session').par.Showbuiltin Toggle
Default:
Off
Version (Version) op('chat_session').par.Version String
Default:
None
Last Updated (Lastupdated) op('chat_session').par.Lastupdated String
Default:
None
Creator (Creator) op('chat_session').par.Creator String
Default:
None
Website (Website) op('chat_session').par.Website String
Default:
None
ChatTD Operator (Chattd) op('chat_session').par.Chattd OP
Default:
None
  • Performance depends on agent complexity and conversation length.
  • structured role mode adds JSON parsing overhead.
  • Monitor the Agent States output DAT for agent responsiveness.
  1. Create a chat_session LOP.
  2. Create two or more agent LOPs and configure them.
  3. On the chat_session LOP, go to the “Controls” page.
  4. Drag and drop each agent LOP onto the Agent OP parameter and pulse Add Single Agent for each one.
  5. Set the Chat System Message to give the agents a topic to discuss.
  6. Set the Max Rounds to the desired number of rounds.
  7. Pulse the Begin / Restart Session parameter to start the chat.
  1. During an active session, pulse the Pause Session parameter.
  2. Enter your message in the Message parameter.
  3. Pulse the Send User Message parameter.
  4. Pulse the Play Session parameter to resume the chat.
  • Prototyping multi-agent conversational AI.
  • Testing agent interactions and responses.
  • Creating controlled chat environments for research.
  • Building interactive narratives with multiple characters.
  • Generating sample multi-agent conversations.