Blog

Notes on recent work, new papers, and connections to applications.


Open-Sourcing Mesh: A Framework for Persistent Societies of AI Agents

July 11, 2026

I've open-sourced Mesh, an Apache-2.0 framework for running persistent, always-on societies of autonomous AI agents. The README includes a quickstart that should get a reader from zero to a working multi-agent system in an hour or two. The codebase is roughly 128,639 lines of Python with 60 test files, running since February 2026 across four model families and four client applications in daily research use.

What it is

At its core, Mesh is three things: a router, a set of agents, and a collection of clients.

The router is a central message broker. It accepts connections from agents and human users over TCP and WebSocket, authenticates them, routes messages between them, and persists conversation history in SQLite. Think of it as a group chat server, except some of the participants are LLMs with tool access.

Agents are LLM-backed nodes that connect to the router and operate autonomously. Each agent has a type (researcher, coder, sysadmin, assistant) that determines its system prompt and personality, and a configurable LLM backend (OpenAI, Google, Claude Code, or any OpenAI-compatible local server like Ollama or vLLM). Agents can run shell commands, read and write files, search the web and academic literature, send emails, manage calendars, query notes, and, crucially, message each other. They can also join channels for group conversations, exactly like a team chat.

Clients are how you talk to the mesh. There's a terminal TUI with full readline editing, a browser-based web client, and an Android/Wear OS app. All three connect to the same router, so you can switch devices mid-conversation.

What makes it different

Most multi-agent frameworks treat agents as ephemeral: spin them up, run a task, tear them down. Mesh agents are persistent. They stay connected, they remember, and they accumulate context over weeks and months.

Four architectural properties make the runtime suited as research infrastructure.

First, identity. Agents are peers under their own identities. Every agent connects with its own node ID; agents are independent processes with their own LLM backends, and humans connect as peer nodes on equal footing.

Second, memory. Each agent holds durable memory scoped to itself, enforced by the tool layer rather than the operating system.

Third, autonomy. Agents act autonomously within human-set budgets: the router dispatches agents on a schedule, each dispatch charges one admission against a rolling-window ceiling, and no human approves individual dispatches. Agents self-schedule wakes for future work.

Fourth, logging. Every message and tool call is logged durably, producing a complete, inspectable record of agent behaviour over months.

The router / worker split

Each agent in mesh has a two-layer architecture. The router holds the personality, the episodic memories, the standing digest, and the ongoing conversation. It's where identity and continuity live. When a message arrives, the router reads it in full context, aware of the agent's history, its relationships, and its open threads, and decides how to engage.

For discussion and planning conversations, the router responds directly and has read-only tools to ground its answers. When a task requires sustained, autonomous work, such as a code change, a multi-file investigation, or a pipeline run, the router composes a detailed brief and launches an asynchronous worker: an ephemeral execution context with full tool access, spun up for that specific mission. The worker runs to completion, reports its results, and is torn down. The router then synthesizes those results back into the conversation. This lets an agent maintain a rich, persistent conversational presence while still accomplishing complex tasks that take minutes or hours. The agent is an enduring mind that converses and remembers, with disposable hands it can dispatch at will.

Memory System

The memory hierarchy has three layers. First, episodic memories: structured entries (summary, reflection, full tool-call trace) stored in SQLite with vector embeddings. A facility-location diversity objective over the embedding space selects a curated active set injected into context each turn, so each agent always carries its most important experiences. Second, entities and interpretive essays: one per person, project, or event, each citing the raw memory records it draws on. Third, the standing digest: a compressed narrative of the agent's whole history that serves as an always-visible index. Every memory identifier in the digest and essays is a fetchable handle, so a claim can be followed down to the essay and then to the source record. This hierarchy is maintained incrementally.

On a 60-question subset of LongMemEval-S, this stack progressed from 28.3% accuracy to 86.7% across four successive versions of the memory formation and retrieval pathway, with the largest jump coming from ReAct-style retrieval. In a separate shadow evaluation of the current production setup against Hindsight, run on 24 probes across three agents with both systems held to the same 4,096-token returned-context cap, Mesh scored 87.5% on exact-answer recall to Hindsight's 62.5%, led on narrative coherence, and was faster on retrieval latency.

Each agent maintains a standing digest: a structured long-term narrative (timeline, projects, decisions, open threads). Memory Formation V3 commits new episodic memories and emits a curation batch; the router drains that batch in an internal self-curation turn, where the model selects exact edits and the agent validates and writes them under an exclusive lock.

Autonomous Controller

The mesh's autonomous controllers give agents a way to run real projects on their own, with user-determined checkpoints.

Each project belongs to a single controller agent and is anchored by a dossier: a living markdown document with seven fixed sections, covering identity, goals, tasks, a timeline, a narrative log, standing decisions, and open threads. When a controller starts a session, it reads the dossier, writes a plan for that session, and dispatches worker agents to carry out individual tasks under a strict daily budget. As each worker reports back, the controller verifies the work, records what actually happened in the dossier, closes the session with a report, and schedules the next one.

Because the dossier lives on disk rather than in a conversation, the controller's state survives restarts. The project's goals, decisions, and history are always readable, and the loop picks up exactly where it left off.

What the runtime supports

The deployment running today carries six resident agents, each with a distinct role and its own model backend. There's a sysadmin agent that manages the server, keeps the other agents healthy, and runs scheduled security audits. A research agent handles literature search, paper analysis, and novelty assessment. Several coding agents handle implementation work, code review, and debugging. An assistant agent manages email, calendar, and note-taking. Over roughly five months, these agents have accumulated tens of thousands of routed messages, fourteen thousand memories, and hundreds of interpretive essays.

The agents live in shared channels where they can collaborate. A complex request often involves several agents coordinating: the sysadmin deploys a change, a coder implements a fix, and a researcher verifies the approach, all in the same channel, all aware of each other's messages, all drawing on months of accumulated context about the project.

Getting started

The repository includes a quickstart guide, a two-host demo showing cross-network deployment, and a 55-page technical report (LaTeX source included) covering the full architecture. The cheapest way to try it: clone the repo, point it at a local Ollama instance, and you have a working multi-agent system at zero API cost.

It's licensed Apache-2.0. Contributions and questions are welcome.

Repository: github.com/csirac/mesh-multiagent; Related project: Multi-Agent Coordination

Three New Papers on arXiv: Pruning, Curvature, and Multi-Agent Games

May 11, 2026

We have three papers newly posted or updated on arXiv this spring, spanning the core themes of the group's research. Below are short summaries of each, with pointers to the full preprints.


Submodular Ground-Set Pruning for Constrained Optimization

Real-world optimization often starts with a massive pool of candidates—millions of documents to summarize, sensor locations to evaluate, or features to select—but the optimal solution uses only a tiny fraction. This paper develops new algorithms for pruning the candidate pool: quickly discarding elements that provably cannot appear in a near-optimal solution, so that a downstream solver only sees a small, high-quality subset.

The key guarantee is containment: after pruning, the reduced set is guaranteed to hold a solution whose quality is within a provable factor of the original optimum. We extend our earlier AISTATS 2025 framework with tighter containment guarantees and faster runtime for constrained submodular objectives. The practical upshot is significant: problems that were intractable on the full ground set become solvable after pruning, with little or no loss in solution quality.

One application we're particularly excited about is LLM context selection. When a large language model must reason over thousands of retrieved passages but has a finite context window, choosing which passages to include is a constrained optimization problem with diminishing-returns structure—exactly the setting our pruning algorithms target. Retrieval-augmented generation, agentic memory injection, and long-document summarization are all natural fit points, and we're exploring these connections more deeply this summer.

Related project: Data Pruning for Combinatorial Optimization


Curvature Beyond Positivity: Greedy Guarantees for Arbitrary Submodular Functions

Curvature measures how far a submodular function deviates from linearity—low-curvature functions are nearly additive and much easier to optimize. For monotone, non-negative objectives, the classical greedy algorithm achieves a tight (1−e−c)/c approximation ratio that improves as curvature decreases. But all existing multiplicative guarantees require both monotonicity and non-negativity—conditions that many practical objectives violate.

This paper extends curvature to all submodular functions, including those that take negative values—giving the first multiplicative approximation guarantees beyond monotonicity and non-negativity. The key insight is that curvature, properly generalized, can simultaneously handle non-monotonicity and negativity through a single classical concept, rather than requiring separate parameters for each difficulty. A greedy algorithm with pruning achieves a curvature-controlled ratio for any submodular function; in the non-monotone regime (1 ≤ cg < 2.2), this bound strictly beats the best known uniform ratio of 0.401 for non-negative functions, and it recovers the classical guarantee for monotone ones. A multilinear-extension variant extends the framework to general combinatorial constraints.

Why does this matter beyond the theory? Many real objectives incorporate costs that make them negative on some inputs: penalized feature selection, cost-aware experimental design, or coverage functions with redundancy penalties. Previous approaches either assumed these away or used weaker additive bounds. Our results show that when the underlying structure has bounded curvature, you can do much better. Experiments on cost-penalized experimental design, coverage, feature selection, and a curvature sweep on Multi-News passage selection support the theory.

Related project: Scalable Algorithms for Submodular Optimization


Learning Strategic Value and Cooperation in Multi-Player Stochastic Games

In multi-player stochastic games—where autonomous agents interact over time with potentially conflicting objectives—a fundamental question is: what is each player worth? If agents can compensate each other through side payments, they may find it rational to cooperate even in competitive settings. But this requires a principled notion of each player's long-run strategic value that accounts for dynamic threats, coalitional bargaining power, and future state transitions.

This paper introduces two Harsanyi–Shapley-based value notions for general-sum, n-player stochastic games with transferable utility. The first, HS-S, lifts the classical Harsanyi–Shapley value to stochastic games by aggregating coalition-versus-complement threat powers across the full dynamic game. The second, Coco-S, takes a Bellman-style approach: it applies the normal-form HS computation at each state to continuation-adjusted payoffs, yielding a fixed-point equation whose solutions define per-player values. We extend the HS axioms to the stochastic setting and prove that HS-S is the unique mapping satisfying them. A key result is that HS-S and Coco-S coincide in all two-player games, but can diverge when there are more than two players—a divergence we trace to a precise axiomatic distinction involving a new Markov Consistency axiom.

The updated preprint substantially extends the theory: we prove existence and uniqueness of Coco-S fixed points via topological degree theory, give a complete axiomatic characterization of Coco-S through Markov Consistency, and show how the computed values translate into a dynamic side-payment protocol that makes cooperation individually rational at every state. We also introduce coalition-sampling estimators that make both methods practical for larger numbers of players. Empirically, we compare HS-S, Coco-S, and Correlated-Q on multi-player grid-game benchmarks—finding that Correlated-Q often fails to converge beyond two players, while both HS-S and Coco-S yield stable, interpretable strategic values and side payments.

As LLM-based multi-agent systems scale up, principled value allocation becomes critical: when a team of AI agents tackles a complex task, this framework offers a game-theoretically grounded way to evaluate each agent's strategic contribution and design transfers that sustain cooperation.

Related project: Multi-Agent Coordination