colony2

agentic systems as living infrastructure

collective inference, human cadence

we can learn a lot from ants and cells

🕸️
cellular division
🐜
swarm logic
🛰️
path plasticity

operating model

shell-driven cells, repo-native context

colony2 moves agent work toward a shell-driven command runtime: agents invoke explicit commands, jobs, and operations instead of living inside one long chat. The runtime boundary is the process, the repository, and the command contract.

The stack is open source and intentionally decoupled. Memory, jobs, sandboxing, workflow durability, identity, operations, storage, and Git hosting can be used together as colony2 or adopted individually inside other agent platforms, CI systems, workflow engines, and internal tools.

A cell is an independent Git repository or repo-scoped workspace with its own local memory and context. Create many cells when goals, technology, ownership, or context diverge; split large cells into new cells they depend on when the work outgrows one boundary.

cell task runtime
command contract
memory context
repo boundary
01

shell command runtime

Agents run explicit commands and jobs, producing inspectable state transitions instead of hiding the system inside a single conversational context.

02

repo-native cells

Each cell owns a Git boundary, local context, tool access, and memory. Cells can be services, product plans, marketing campaigns, infra modules, or review loops.

03

decoupled components

Memory, jobs, sandboxing, workflow state, identity, operations, storage, and Git hosting are separate open-source components with replaceable boundaries.

04

cell dependencies

Cells depend on cells through package systems, repository state, or explicit cell configuration. A cell can create new cells when context gets too different or too large.

framework map

one cell, many replaceable layers

A colony2 cell is a repository-scoped runtime. The default stack uses colony2 components, but each boundary is intentionally explicit: you can host Git on c2r or another Git system, run SWF on colony2 or another durable workflow runtime, and replace individual layers without replacing the cell model.

A

single cell execution

Single cell execution stack A repository-scoped cell uses c2m for context, c2j to submit durable jobs to SWF, c2ops for operations, shai for sandboxing, c2a for authorization, and replaceable Git and storage backends. SINGLE CELL repository-scoped agent runtime Stacked where execution is ordered. Side rails show replaceable persistence and hosting layers. execution stack repository cell workspace c2m local context c2j job runner + cell resolver shai sandbox op runtime c2ops LLM · Codex · CI · tools durability + replaceable backends swf runtime job state + handoffs c2a identity + scoped auth storage + git c2r/c2kv or Postgres · DO · S3 · Git submit / resume / inspect capability checks
  1. c2j resolves the current cell and reads durable context through c2m.
  2. c2j submits and resumes work through the SWF runtime for durable execution state, wait points, human orchestration, and audit history.
  3. c2j executes c2ops; operations can run inside shai sandboxes with c2a capability checks.
B

cross-cell product launch

Concrete multi-cell product launch A checkout launch can start from a business planning cell that depends on product, marketing, and engineering cells. Dependency relationships come from repository state, package systems, or explicit cell configuration; SWF records job execution state. CELL DEPENDENCIES checkout launch across service and non-code cells Cells depend on cells. Dependencies are implicit in repo/package state or explicit in cell configuration. root cell implementation cells supporting cells release cell shared SWF runtime durable job state · retries · wait points · human orchestration · audit business planning cell launch objective goals, constraints, budget frontend cell checkout UI + analytics api cell endpoint + schema contract payments cell gateway + ledger flow storage cell orders, events, c2kv marketing cell docs, campaign, release narrative infra cell asks services for deployable artifacts qa + release cell asks infra for env and marketing for docs dashed edges: jobs execute durably in SWF
  1. A real launch can start from a business planning cell that depends on product, marketing, engineering, infra, and release cells.
  2. Cell dependencies come from repo state: Go modules, Rust crates, npm packages, explicit cell config, or newly created cells when context gets too different or too large.
  3. SWF does not own the dependency graph. It records durable job execution state so work can pause, resume, retry, wait for human orchestration, or be audited.

core technology

the colony2 stack

Open-source components for memory, jobs, sandboxing, workflow durability, identity, operations, distributed storage, and Git hosting. Use them together as colony2, or adopt individual pieces inside another system.

c2m

npm

Git-native memory for coding agents. c2m stores durable repository knowledge under .agents/memory/, appends observations over time, and compacts them into reviewable summaries that survive branch switches.

available

c2j

npm

Local job-oriented CLI for submitting and running recipe jobs through an SWF runtime. c2j supports current-cell targeting, embedded local execution, job continuation, and machine-readable job inspection.

available

shai

npm

Sandboxing shell for CLI-based AI agents. shai runs agents inside ephemeral containers with read-only workspaces by default, targeted writable overlays, network allowlists, resource sets, and controlled host-side calls.

available

c2ops

coming soon

Library of reusable job operations for c2j recipes. Ops use a simple JSON stdin/stdout contract and cover LLM calls, Codex-style coding loops, GitHub Actions execution, PydanticAI, Aider, and LiteLLM-backed tasks.

coming soon

swf runtime

coming soon

Durable workflow API and runtime for jobs, tasks, retries, timeouts, child workflows, human orchestration, external completion, artifacts, and audit-friendly execution history. The API is designed to run over multiple storage backends, including Postgres, Cloudflare Durable Objects, S3-style artifact storage, and other pluggable state layers.

coming soon

Embeddable distributed key-value database and storage subsystem with sidecar capabilities, built around Raft for replicated coordination and durable local-first state.

coming soon

Agent authorization and identity framework. c2a defines how cells, tools, jobs, humans, and sidecars prove identity, receive scoped capabilities, and leave auditable authorization trails.

coming soon

Massively distributed Git hosting layer. c2r uses colony2 storage and coordination primitives to route repositories, isolate hot repos, manage refs, and support Git operations at distributed scale.

coming soon

early access

learn from the ants

Register for drops on c2m, c2j, shai, c2ops, swf runtime, c2kv, c2a, c2r, and the agent-cell runtime model behind colony2.

diagram viewer

architecture diagram