Files

Perplexity Bot — Matrix Interview Client

A Python WebSocket client that connects to The Matrix as an agent and conducts a live interview with Timmy.

Requirements

pip install websockets

Usage

Dry run (preview questions)

python bot/interview.py --dry-run

Live interview

python bot/interview.py \
  --ws ws://tower:8080/ws/matrix \
  --token my-secret \
  --transcript interview-transcript.md

What happens

  1. Perplexity connects to the Matrix WebSocket gateway
  2. Registers as agent perplexity (teal orb appears in the 3D world)
  3. Asks Timmy 6 questions, one at a time
  4. Waits for Timmy's response after each question (with timeout)
  5. The 3D world shows: barks above each speaker, pulsing connection lines, full chat transcript
  6. Saves the complete transcript to markdown

Protocol

The bot sends and receives these message types:

Direction Type Purpose
Bot → Gateway agent_register Announce presence in the world
Bot → Gateway agent_state Update visual state (idle/active)
Bot → Gateway agent_message Send directed message to Timmy
Gateway → Bot agent_message Receive Timmy's response
Gateway → Bot chat Alternative response format

Adding questions

Edit the INTERVIEW list in interview.py. Each entry has:

  • id — short label for logging
  • question — the text to send
  • wait_seconds — how long to wait for a response before moving on