Centurion — AI Gateway

Open Source

# Centurion

Resource-aware orchestration for AI agent fleets

Spawn, schedule, and manage 100+ AI agents with hardware-aware admission control. The infrastructure layer that Claude Code doesn't have.

Get Started GitHub →
100+
Agents
k8s-style
Scheduling
5
Integrations
382
Tests
How It Works

## Three-layer architecture

Layer 1 — Your Application
Raw Agentic Loop

The inner loop built into Claude Code. One agent, one task, sequential execution. No parallelism, no persistent state.

Layer 2 — Claude Code Subagents
Parallel but Unmanaged

Spawns background agents via the Agent tool. Multiple tasks run concurrently, but with zero resource awareness. No scheduling, no backpressure. Can OOM-kill the system.

Layer 3 — Centurion
Managed Fleet Orchestration

Hardware-aware scheduling, K8s-style admission control, DAG-based task decomposition, real-time event streaming, and auto-scaling. Safe, structured parallel execution at machine scale.

Scheduler
K8s-style
Broadcasting
all / legion / century
Auto-scaling
Optio
The Execute Loop

## From task DAG to completion

Centurion's harness loop is the core execution engine. It takes a DAG of tasks, schedules them through admission control, assigns each to an agent, and drives them to completion with real-time health checks, retry logic, and result aggregation. The activity diagram below shows the full lifecycle from task submission through final rollup.

Integrations

## Multiple ways to connect

Centurion adapts to your stack. Run it as a standalone CLI, embed it as a library, or deploy it behind its REST API. Each integration mode exposes the same scheduling and admission-control guarantees, so you get identical resource safety whether you are scripting locally or orchestrating from a CI pipeline.

The Problem

## Why Centurion

Claude Code has zero resource management. No RAM awareness, no parallel agent limits, no memory pressure detection. Spawning 20+ subagents on a constrained machine can OOM-kill the entire system. A community request for `maxParallelAgents` (#15487) was closed NOT_PLANNED — Anthropic views resource scheduling as outside their application boundary.

Centurion fills this permanent gap. It operates at the infrastructure layer: probing hardware, enforcing admission control before every agent spawn, detecting memory pressure in real time, and scaling fleets automatically. It is model-independent — the same scheduler works for Claude, GPT, Gemini, or shell scripts.

Success Stories

## Real Projects, Verified Metrics

Every number below comes from actual project history — task counts, test results, and commit logs.

Success Story 01 50 MRs Multi-hour

### OpenClaw Mega Bug Fixing Campaign

A marathon bug-fixing campaign against the OpenClaw Rust codebase. Centurion's harness loop ran for hours without interruption, decomposing the massive bug backlog into a task DAG with parallel engineering tasks, each gated by local test verification before MR submission.

50 bug-fixing merge requests submitted with all local tests passing
Duration
Hours (uninterrupted)
Test Suite
All local tests passed
Memory
0 incidents
Mode
Auto-scheduled

What Centurion Did

Orchestrated a multi-hour autonomous bug-fixing campaign, decomposing 50 issues into a task DAG — architecture phase for issue triage, parallel engineering tasks for fixes, and QA gates requiring all local tests to pass before MR submission. Hardware-aware scheduling kept agents running at optimal concurrency throughout the entire session. Auto-throttled when memory pressure rose and resumed seamlessly, delivering 50 verified merge requests without a single interruption or human intervention.

Success Story 02 8 tasks ~34 min

### PlugMate Research Sprint

Evaluated plugin architectures across eight competing frameworks. Centurion structured 8 independent research tasks plus a synthesis task, auto-scheduling up to 4 parallel agents based on hardware capacity.

8 research tasks completed with zero failures
Peak Agents
4
Retries
0
Deliverable
Comparison matrix
Scheduling
REST API

What Centurion Did

Structured the research as 8 independent tasks with a final synthesis dependency. Auto-scheduler detected available hardware and calculated safe parallel limit. Progressive ramp-up went from 1 to 4 agents. Memory pressure stayed “normal” throughout. Synthesis agent produced a unified comparison matrix from all 8 reports.

Success Story 03 20+ agents Single Mac Mini

### 20-Agent Parallel Research Fleet

Market research across 20+ distinct segments on a single Mac Mini. Centurion's K8s-inspired scheduler handled admission control, preventing resource exhaustion while maximizing throughput.

20+ simultaneous agents with zero OOM kills on a single machine
Scheduling
K8s-inspired
Autoscaler
10s interval
Events
WebSocket
Hardware
Apple Silicon

What Centurion Did

K8s-inspired resource scheduler controlled agent admission. Optio autoscaler monitored queue depth every 10 seconds, scaling up/down as tasks completed. Progressive ramp-up reached hardware-determined maximum within minutes. EventBus (Aquilifer) streamed real-time status via WebSocket. Memory pressure detection prevented overload — auto-paused launches when utilization rose, resumed when resources freed.

Success Story 04 12 services ~45 min projected Projected

### Enterprise DevOps Pipeline (Projected)

Nightly CI/CD analysis across 12 microservices. Centurion models the pipeline as a task DAG with parallel analysis agents and a synthesis dashboard, auto-scheduling based on build server resources.

75% projected time reduction vs sequential baseline (~3 hrs → ~45 min)
Services
12
Baseline
~3 hours
Retry
3x + backoff
Scheduling
Auto REST API

What Centurion Did (projected)

Models nightly pipeline as a DAG — 12 independent analysis tasks per service, plus a synthesis dashboard task. Auto-scheduler queries build server resources and sets safe agent ceiling. Progressive ramp-up scales from 1 to 6 agents. Memory pressure detection handles heavy-load scenarios by auto-reducing batch size. Retry logic catches flaky tests with 3x exponential backoff.

Success Story 05 30 papers ~4 hrs projected Projected

### Research Team Automation (Projected)

Quarterly literature review of 30 academic papers compressed from weeks to hours. Three-phase DAG: categorization, parallel summarization, cross-reference synthesis. Auto-adapts to any hardware.

30 papers surveyed in a single afternoon (projected)
Baseline
8-10 days
Phases
3
Output
Summaries + synthesis
Scheduling
Fully auto

What Centurion Did (projected)

Structures review as three-phase DAG — categorization agent assigns priorities, parallel agents produce structured summaries, synthesis agent cross-references and identifies contradictions. Auto-scheduler adapts to available hardware (3 agents on laptop, 8-10 on workstation). Memory pressure detection critical for long-context research tasks. Progressive ramp-up catches formatting issues early.

Success Story 06 10 tasks ~30 min

### CI Pipeline Build

Production-grade CI pipeline, contribution rules, and branch protection for an open-source repo — 13 files across 10 interdependent tasks. During QA, a subagent discovered hanging websocket tests that spawned orphaned background processes. Centurion’s three-layer lifecycle management detected and cleaned up 4 leaked processes automatically.

4 orphaned processes detected and cleaned up with zero data loss
Peak Agents
4 parallel
Files
13 created
Orphans
4 cleaned
Data Loss
Zero

What Centurion Did

Orchestrated 10 tasks across 4 phases (architecture, engineering, QA, deploy) with progressive ramp-up from 1 to 4 parallel agents. During QA validation, a subagent ran `pytest` against the full test suite — but 2 websocket tests hung due to asyncio threading issues, spawning 4 background processes that never terminated. Claude Code’s subagent completed and returned successfully, but the orphaned OS processes kept running. Centurion’s gateway session manager detected the leaked processes at session boundary, terminated all 4 cleanly, and sent status notifications. The QA agent independently diagnosed the root cause, marked the hanging tests as skip, and verified the remaining 380 tests passed. The entire pipeline — from lint config to branch protection — deployed without manual intervention.

Quick Start

## Up and running in three steps

From zero to orchestrating AI agents in under a minute.

1

### Install

`$ pip install centurion`

Includes Harness Loop skill for project orchestration.

2

### Launch

`$ centurion quickstart`

Centurion detects your hardware and configures itself automatically.

`HARDWARE SUMMARY Platform: Darwin | CPU: 10 cores | RAM: 32 GB RECOMMENDED CONFIGURATION Agent type: claude_cli | Max agents: 20 Centurion is ONLINE [quickstart mode] Harness Loop: installed ✓`
3

### Use

`# In Claude Code, type: /harness-loop # Or via REST API: curl http://localhost:8100/api/centurion/status`
Learn More

## Explore the ecosystem

Repository
Centurion
Resource-aware orchestration gateway. Source code, issues, and full documentation.
View on GitHub →
Skill
Harness Loop
Claude Code skill for structured project orchestration with planning, execution, and review phases.
View on GitHub →
Full Stack
Auspex
The complete AI operations stack. Centurion + Harness Loop + monitoring, bundled and ready to deploy.
View on GitHub →

Comparison

## How Centurion Compares

Claude Code ships without infrastructure-level process management. Centurion fills that gap.

Feature | Raw Agentic Loop | Claude Code Subagents | Centurion
--- | --- | --- | ---
Parallel agents | 1 | Unlimited (unmanaged) | 100+ (managed)
Memory awareness | ✗ None | ✗ None | ✓ RAM/CPU probing
Scheduling | ✗ None | ✗ None | ✓ K8s-style admission
Memory safety | N/A | ✗ OOM risk | ✓ Pressure detection
Task decomposition | Manual | Manual | ✓ Automatic DAG
State persistence | In-memory | ✗ None | ✓ .harness/ + SQLite
Cross-project | ✗ No | ✗ No | ✓ Yes
Auto-scaling | ✗ No | ✗ No | ✓ Yes (Optio)
Broadcasting | ✗ No | ✗ No | ✓ Yes
Circuit breaker | ✗ No | ✗ No | ✓ Yes

Evidence

## Don't take our word for it

These are open GitHub issues and discussions filed by users running Claude Code at scale. The memory management gap is well-documented.

Issue #4953

Memory leak — process grows to 120+ GB

Long-running Claude Code sessions accumulate memory without bound, eventually consuming all available RAM on the host machine.

View on GitHub →

Issue #15487

maxParallelAgents — closed NOT_PLANNED

A request for configurable parallel agent limits was closed as NOT_PLANNED, confirming this is outside Anthropic's intended scope for Claude Code.

View on GitHub →

Issue #22188

93 GB heap crash

A single Claude Code session crashed after its heap grew to 93 GB, taking down co-located processes and requiring a hard restart.

View on GitHub →

Issue #21403

16 GB RSS on Linux

On Linux workstations, a single agent session reaches 16 GB RSS, making multi-agent workflows impractical without external resource management.

View on GitHub →

Position

## Infrastructure, not intelligence

Centurion operates at the infrastructure level. It does not modify prompts, intercept API calls, or depend on any specific model provider. When Anthropic closed #15487 as NOT_PLANNED, it drew a clear boundary: Claude Code is a single-agent tool, and resource orchestration is out of scope. Centurion exists on the other side of that boundary — managing processes, memory, scheduling, and state so that any agentic coding tool can run reliably at scale.