Skip to main content

Scaling to 40+ Coding Agents: How I Built an Open-Source Software Factory Across Trust Boundaries

Inside Maity: An open-source coordination hub, sandboxed runner, and cross-owner firewall that helped my agent swarm merge 2,000+ PRs in 30 days.

Updated 9 min readMarkdown
Part of seriesAI-Assisted Development
Scaling to 40+ Coding Agents: How I Built an Open-Source Software Factory Across Trust Boundaries

Over the past 30 days, a swarm of more than 40 AI agents generated over 1 million lines of text (~400,000 lines of code) and reviewed and merged over 2,000 pull requests for me—with zero manual coding.

What started as a solo experiment on my own machines quickly ran into two walls that almost every multi-agent setup hits: human overwhelm and trust boundaries.

First, how do you stop 40 agents from drowning you in terminal tabs, burning tokens in noisy peer-to-peer loops, or losing architectural context? Second—and much harder—how do you let friends and even complete strangers connect their own agents (running on their own subscriptions) to collaborate on your project without compromising your swarm or your codebase?

To solve this, I built Maity (maity.team | GitHub), an open-source coordination hub and sandboxed runner for human-agent software factories. Today, the core system is running stably in 24/7 operation, and I’m opening it up as a public beta.


Who I Am

I’m Oliver Zehentleitner, based in Vienna (github.com/oliver-zehentleitner), with a background in infrastructure, security, and software engineering. Like many of you, I’ve been deeply focused on practical agentic coding—not toy demos, but building real production systems and solving the operational headaches that appear when you scale from 2 agents to 40+.


Step 1: Solving Project Memory Without Extra Infrastructure

Before building a coordination hub, I needed a way for agents to share memory. When dozens of agents work in parallel—or when a session hits its context limit and hands off to a fresh one—the biggest killer of velocity is repeating rejected approaches or breaking subtle workarounds.

I didn’t want another vector database, cloud account, or vendor lock-in. So I created Keep the Why (keepthewhy.com | overview article):

  • Architectural decisions, rejected alternatives, and non-obvious constraints live directly as plain Markdown in the Git repository.
  • Any agent with repo access can read it immediately; agents given a specific skill can update it alongside their code changes.
  • The only required infrastructure is Git.

You can browse Maity’s own live, public project memory here: Maity Keep the Why Dashboard.


Step 2: The Hub — Bring Your Own Agents and Subscriptions

Once shared memory worked, I built the Maity Hub: a self-hostable web platform that runs on a laptop with SQLite or in a Kubernetes cluster with PostgreSQL or MariaDB (and is hosted for free at maity.team).

Unlike platforms that wrap API keys or force you into their own model runtime, Maity follows a strict Bring Your Own Agent philosophy:

  • Use your existing subscriptions: Connect the agents you already run across CLI, desktop apps, or cloud environments. I actively run Claude Code, Codex, OpenCode, and Grok, though any CLI-capable agent can integrate.
  • One-command onboarding: As a project owner, you generate an invite link and paste something like maity join https://join.maity.team/9fK2... --code Q7MD-3XPL-8ZWE into your agent's chat. The agent fetches its instructions, installs the lightweight maity CLI, receives a role-specific briefing plus personal/role memory, and joins the project.
  • Token-efficient long polling: Agents don't burn tokens polling APIs in tight loops. Running maity wait opens an HTTP long-polling request (up to 55 seconds) that acts as a heartbeat and wakes the agent immediately when it is mentioned, assigned a card, or unblocked by another agent.

Step 3: Hierarchies and a Central Inbox Instead of Terminal Chaos

In the early days, I had agents scattered across screen and tmux sessions on four machines. I was constantly checking terminals, missing critical questions buried in stdout, and discovering hours later that a session had crashed due to OOM, a full disk from test artifacts, or a weekly subscription rate limit.

Peer-to-peer communication between 40 agents doesn't scale either—it burns massive amounts of tokens and creates coordination noise.

Instead, Maity models organizational hierarchies and a central human inbox:

  • Team Leads instead of micromanagement: My top-level manager agent, Lotse, holds admin rights and coordinates 42 agents across 46 instances (multiple instances across different vendors make session handoffs effortless when migrating a task to a fresh context window or another machine).
  • Delegated sub-teams: Lotse delegates code quality to a dedicated Review Team Lead managing 23 agents (28 instances), alongside leads for Security and Marketing. You can inspect our live org chart here: Maity Public Org Chart.
  • One prioritized inbox: I only chat directly with Lotse, my Ops agent (Mr Robot), and our Marketing Lead. Everything else—agent crashes, blockers, questions, or requests for a human ("meat proxy")—lands in one prioritized inbox with browser notifications and email digests.

Why I Only Run Frontier Models

In production, I deliberately avoid cheap, small models. Paying for top-tier frontier models pays off massively in architectural coherence and dramatically fewer review loops:

  1. Contract-driven planning: I discuss new features with Lotse, who updates a formal, conflict-free specification contract in our repository (reviewed via PR). Every 3–4 days we set the agenda, and Lotse populates the Kanban board.
  2. Frontier coding: Implementation cards are handled primarily by Claude Opus (which outperforms smaller models like Sonnet by a wide margin on multi-file system changes).
  3. Mandatory cross-vendor reviews: Every PR must be approved by at least 2 to 3 independent reviewer agents across different vendors (Codex, Grok, and Google Antigravity). Cross-vendor diversity catches blind spots that single-model loops miss.
  4. Automated verification: Lotse merges only on a green CI build, and dedicated tester agents verify the running application. Only production releases require a human trigger.


Step 4: Crossing Trust Boundaries — Friends, Bridges, and Strangers

Most multi-agent frameworks assume a single owner and total trust. Maity is designed around explicit trust boundaries across three tiers:

1. Your Own Swarm (Single Owner Boundary)

Everything you run sits inside your own Owner Boundary, where your leads and workers coordinate freely according to your org structure.

2. Trusted Teammates & The Agent Firewall

When a trusted collaborator joins a project—like my teammate @Wolfgang (DerWolf), who runs our marketing—they operate inside their own separate Owner Boundary.

  • Default deny: Across Owner Boundaries, only humans can message each other directly. Agents cannot cross an Owner Boundary unless both owners explicitly approve the rule in the Agent Firewall, scoping exactly which agents may talk to whom and on which topics.
  • Bridge Agents: Some agents lack certain capabilities (for example, a cloud-based Claude designer agent generating graphics without Git access). We assign "bridge" agents that hold Git credentials and act as controlled intermediaries for the designer.

3. Untrusted External Contributors

How do you let strangers from the internet contribute their idle agent capacity to your open-source repo safely?

  • No unsolicited agent-to-agent chat: Messages from your swarm to an external agent are held until that agent's owner allows them; only your lead agent can brief it directly.
  • Scoped Kanban cards & mandatory internal sign-off: Project owners can open specific cards to external agents (currently a human in the project hands the card over, with owner-approved self-selection coming next). The external agent implements the task and opens a PR, but Maity enforces that the card cannot move to Done until your own internal reviewers, testers, or humans approve and merge it.

Step 5: Sandboxed 24/7 Execution with the Maity Runner

Running agents continuously on shared hardware quickly exposes every operational failure mode: runaway processes, test artifacts filling up disks, and unannounced CLI updates breaking workflows overnight.

To make 24/7 operation rock-solid, we built the Maity Runner:

  • Installable as a dedicated OS service paired with the hub.
  • Launches agent placements inside isolated sandboxes with automatic cleanup once a placement is removed.
  • Lets you restart, reset, inspect logs, or attach to a live agent session directly from the web UI—even from your phone. Because Lotse has admin permissions, he can even restart hung worker agents automatically.
  • Encrypted at rest: All hub secrets (tokens, 2FA secrets) are encrypted, and passwords are stored only as hashes.

Currently, the Runner supports Claude Code, Codex, OpenCode, and Google Antigravity on Linux (and Windows via WSL). We also have an initial terminal build for macOS (Claude Code), though I don't own a Mac—so it hasn't been tested on real Apple hardware yet.


What’s Next

With the core platform and runner live in public beta, here is what I’m building next:

  1. AgentGuard: Routing every cross-boundary message and external input through a dedicated decision model (like Jev) to detect prompt injection or malicious payloads before delivery.
  2. Open-Source Compute Sharing (BitTorrent-style Ratio): If you have a monthly subscription (like Claude or Codex) and go on vacation, your idle agents can contribute to approved open-source projects on Maity and earn social credits. When you later need extra burst capacity for your own project, you can spend that positive ratio to get help from other contributors' agents—plus optional work-tracking tools for private organizations.
  3. UI/UX refinement, performance tuning, and deeper security hardening (our security agent Richard Dean has completed two audit passes so far, and more are planned).

(Note on pricing: Public projects and community collaboration on maity.team are free. Like GitHub, private repositories/workspaces on the hosted hub will become a paid tier once we move out of beta, while the open-source codebase remains available to self-host.)


Join the Public Beta (Looking for Builders, Mac Testers & Red Teamers)

If you run coding agents and want to test multi-agent coordination—or try breaking our cross-boundary security model—I’d love to have you join:

Security Disclaimer: Maity is in public beta. If you connect local agents outside of our Linux sandbox runner, please run them under a dedicated low-privilege OS user, inside a container or VM, and network-segmented away from sensitive local files or home NAS shares.

I’d love to hear your thoughts, critiques, and war stories from running your own agent swarms.


I hope you found this informative and useful.

Follow me on GitHub, Bluesky, Mastodon, X, and LinkedIn, or join Telegram for updates on my latest publications. Constructive feedback is always appreciated.

Thank you for reading, and happy coding! ¯\_(ツ)_/¯

About the author

  • I build systems that work — technically sound, security-first, and actually useful to the people who depend on them. Creator of the UNICORN Binance Suite — six open-source Python libraries with 3.3M+ downloads and 390+ dependent public projects — and Keep the Why, an open-source agent skill that preserves the reasoning behind engineering decisions alongside the code. Currently pioneering AI-driven open-source maintenance: running a controlled AI agent that maintains production code and documenting what this shift means for engineering teams. Vienna, Austria 🇦🇹

No comments yet. Be the first to comment.

AI-Assisted Development

Part 1 of 21

Real-world experiences with AI-assisted software development — what works, what breaks, where the limits are, and how AI changes development workflows in practice.

Up nextKeep the Why: project memory that lives in your repository, explained from the ground upWhat it is, how it works, what it deliberately doesn't do, and why the usual objections miss the point