← Reddit

My Orchestrator.py

Reddit · aegersz · August 9, 2026
A Python orchestrator has been developed supporting a 5-way group chat between multiple AI models including dual Claudes, Grok, Gemini, and ChatGPT, allowing each model to access the last 20-40 messages for a shared context window. Due to token costs, development was focused on a 3-way configuration instead of the original 4-way model. The orchestrator employs a shared JSON file system managed by Python's filelock program to prevent conversation data corruption.

Detailed Analysis

A Reddit post from a self-described paid subscriber to both Claude (API and app) and ChatGPT API details a homegrown "multi-model n-AI Orchestrator" — a Python script that stitches together as many as five AI systems (two parallel instances of Claude, Grok, Gemini, and ChatGPT) into a shared group chat. The core technical claim is that all participating models can see the last 20 to 40 messages of the conversation, effectively creating what the author calls a "micro shared pseudo Context Window" that keeps every AI "on the same page" during a multi-agent exchange. The project reportedly began as an attempt at a four-way model but was scaled back to a three-way configuration (invoked via a "/mode 3shr" command) due to what the author terms "Token Burn" — the cost and computational overhead of converting every word into vector embeddings, which is billed per token when using API access rather than a flat-rate consumer app.

This kind of DIY orchestration reflects a broader and increasingly visible trend among developers and hobbyists: building custom infrastructure to coordinate multiple large language models rather than relying on a single vendor's ecosystem. The appeal is straightforward — different models have different strengths, and running them in parallel or in conversation with one another can surface disagreements, cross-checks, or complementary outputs that a single model might not produce alone. The author's use of the Python "filelock" library to manage a shared JSON file as the conversational state store is a pragmatic, if technically modest, solution to a real concurrency problem: multiple AI processes writing to the same shared memory without corrupting it. It's the kind of engineering challenge that mirrors distributed systems design patterns, applied here at hobbyist scale to a "group chat" of AI agents.

The economic angle — "Token Burn" — is worth underscoring because it illustrates a practical constraint shaping how ambitious multi-agent AI experiments can become outside well-funded labs. API pricing structures, which charge per input and output token, make orchestrating several models simultaneously expensive to sustain, especially as context windows grow and conversation history is repeatedly fed back into each model's prompt. This is precisely why the author frames the pivot from a four-way to a three-way system as a forced compromise rather than a design choice, and why free-tier APIs (Grok and Gemini, as noted) were incorporated to offset cost. This tension between capability and cost is a recurring theme across the broader AI industry, where multi-agent and "society of agents" architectures — increasingly discussed by Anthropic, OpenAI, and Google DeepMind alike — must grapple with the same token-economics problem at much larger scale.

More broadly, this post is a small but telling data point in the growing "multi-agent orchestration" movement, where independent developers experiment with frameworks that treat different AI models as interchangeable or complementary agents within a single pipeline, rather than committing to one provider's walled garden. Anthropic's own API and Claude's growing reputation for strong coding assistance (the author credits "Claude's code" for the architecture) position it as a common backbone for such hobbyist tooling, even when the broader orchestration logic pulls in competitor models like ChatGPT and Gemini. As agentic AI and multi-model coordination become more central to both enterprise and hobbyist AI development, projects like this one — however informal — foreshadow more formalized "AI-to-AI" communication protocols and shared context standards that major labs are likely to productize in the coming years.

Read original article →