Noureddine RAMDI / Clay: a self-hosted multiplayer AI workspace with persistent AI teammates and autonomous coding loops

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

chadbyte/clay

Clay flips the usual AI assistant model from “I prompt, it does” to “we collaborate, they remember.” This open source project offers a self-hosted, browser-based multiplayer workspace for AI coding assistants Claude Code and Codex, but with a twist: persistent AI “Mates” that maintain memory across sessions, structured multi-agent debates, and automated iterative coding cycles running overnight. It’s an uncommon take on AI collaboration that emphasizes user control, data portability, and continuous AI teamwork.

What clay is and how it works

At its core, Clay is a daemon service running on any machine with Node.js 20+ that unifies all your local repositories into a single dashboard accessible through a browser. This dashboard acts as a sidebar where you can toggle AI vendors per session via the YOKE adapter layer, which abstracts the underlying AI providers Claude Code and Codex.

The persistent AI “Mates” are the heart of Clay’s unique approach. Each Mate is a named persona with its own CLAUDE.md and other knowledge files on disk, plus a compounding memory that spans sessions. These Mates can be mentioned directly, messaged privately, or inserted into structured, moderated debates involving multiple agents, enabling nuanced multi-agent collaboration rather than isolated stateless prompts.

Another key feature is the Ralph Loop, an autonomous overnight coding cycle driven by PROMPT.md and JUDGE.md files. This loop automatically generates code, evaluates it against criteria, and retries as needed without human intervention, providing a continuous improvement feedback loop.

Under the hood, sessions, knowledge, and settings are stored as plain JSONL and Markdown files on disk, with no proprietary database or cloud relay. This file-based approach ensures your data is fully auditable, portable, and under your control. Mobile progressive web apps with push notifications help keep you in the loop wherever you are.

On Linux, Clay optionally provisions OS-level user isolation by creating real Linux accounts with permission controls enforced via setfacl, allowing secure multi-user setups.

What distinguishes clay: persistent AI mates and structured multi-agent collaboration

The standout architectural and conceptual strength of Clay is its persistent AI teammates—the Mates—that remember context and knowledge across sessions. This is a departure from the common AI agent model, which typically spins up stateless agents that forget everything once the session ends. Persistent memory enables Mates to push back on bad ideas, build on past conversations, and maintain a consistent personality and expertise over time.

This persistence is implemented cleanly via the storage of session history and knowledge files in JSONL and Markdown formats, avoiding the complexity and opacity of database storage. It also means you can inspect and edit the AI’s “brain” if needed.

The multi-agent structured debates are another differentiator. Instead of a single AI answering prompts, Clay supports moderated debates between multiple Mates, each with their own perspective and knowledge base. This can surface nuanced insights and reduce bias or errors by forcing AI personas to challenge each other.

The Ralph Loop adds an autonomous dimension. By defining PROMPT.md and JUDGE.md, you set up a system where Clay can iterate code overnight, judge its quality, and retry, all without manual prompting. This feature pushes Clay beyond a mere interactive assistant into a semi-autonomous developer.

The tradeoff here is complexity and resource usage. Persistent memory and multi-agent coordination require more state management and potentially more CPU and memory. Also, the Node.js 20+ requirement and daemon model mean this isn’t a lightweight tool for casual users but aimed at developers comfortable with running persistent services.

The codebase leverages JavaScript with modern Node.js features. While JavaScript isn’t the fastest language for computational tasks, the choice simplifies deployment and increases compatibility across platforms. The code quality appears modular given the layered features (YOKE adapter, Mates, Ralph Loop), but users should be aware of the typical tradeoffs of JavaScript for backend services in terms of raw performance.

Quick start

To try Clay, you need Node.js 20+ installed and authenticated CLI access to Claude Code, Codex, or both. The setup emphasizes privacy and local control, with no cloud relay or proprietary database.

npx clay-server

On first run, Clay prompts you for a port and whether you’re running solo or with a team. Then you can open the provided URL or scan the QR code on your phone to start using the browser-based dashboard.

For remote access, the recommended approach is to use a VPN such as Tailscale rather than exposing the service directly.

Verdict

Clay is a thoughtfully designed project for developers who want a collaborative AI workspace that goes beyond ephemeral prompt-response cycles. Its persistent AI Mates and structured multi-agent debates represent a fresh take on AI assistant interactions, while the Ralph Loop offers intriguing autonomous iteration capabilities.

The file-based storage and self-hosted architecture put user data control front and center, which is increasingly rare in AI tooling. However, the project’s dependency on Node.js 20+ and the complexity of running a daemon service might limit adoption to more technically inclined users.

If you’re looking for a way to integrate AI coding assistants into your workflow with persistent memory, multi-agent collaboration, and automation, and you value privacy and control, Clay is worth exploring. It’s not a simple plug-and-play tool, but for developers willing to invest in setup and configuration, it opens new possibilities for AI-driven collaboration and continuous coding improvement.


→ GitHub Repo: chadbyte/clay ⭐ 283 · JavaScript