Multi-Agent Swarm Syntax: An Approach to Live Coding with AI

Sven Hollowell; Pete Bennett; Paul Marshall

Multi-Agent Swarm Syntax: An Approach to Live Coding with AI
Image credit: Sven Hollowell; Pete Bennett; Paul Marshall

Abstract:

Collaborative live coding treats the shared text buffer as a stage where the act of typing forms part of the performance. Standard AI assistants, however, prioritise efficiency and opacity, often inserting code instantaneously and reducing the generative pro- cess to an invisible operation. This conflicts with live coding’s emphasis on visibility and audience legibility. We present a system built on top of Strudel, an interactive web- based live-coding environment, that re-frames Large Language Models (LLMs) as visible co-performers. Agents are spawned through inline comments (e.g., /// chaotic bass agent) and edit code through distinct cursors, generating text character- by-character alongside the human performer. A Conflict-Free Replicated Data Type (CRDT) editing model allows concurrent human and agent edits while maintaining a consistent shared document state. The system was evaluated through a collaborative autoethno- graphic study. The authors engaged in iterative performance sessions to identify emerging interaction patterns. Observations suggest that visible machine participation shifts the performer from direct creation toward curation, while preserving the per- formative “liveness” of live coding.