Mecatl

2026-10-02 · page · source ↗ · source summary

Mecatl is Stacklok's open-source (Apache-2.0), cloud-native agent harness: a Go system that provides the agent loop, tools, permissions, hooks, delegation, and service boundaries for running AI agents as production workloads on infrastructure you operate, rather than as a terminal session. Its thesis is that a replaceable process needs durable external state, an append-only event record, and single-writer coordination — and that all three belong behind seams, not inside the loop.


Architecture

The repo is a Go multi-module workspace (go.work) with a clean layered core:

The mecak8s runtime composes the reference deployment: Redis for session state and event logs, Kubernetes leases for one-writer-per-session, a drain path for pod replacement, and disposable replicas that recover persisted work after process replacement. An opt-in local microVM backend (Linux amd64, mecated microvm doctor) runs filesystem and shell tools inside a VM while keeping model providers and credentials on the host, with operator-only egress policy (deny-all/allowlist via mecated serve flags — clients and project config cannot weaken it).

Key techniques

Design decisions

The trade the project makes is seam completeness over minimalism. Where a minimal harness hardcodes a model client and an in-process history slice, Mecatl pays for a port layer, conformance suites, typed sentinel errors, and sticky-degradation contracts — because the target is Kubernetes replicas sharing sessions, not a laptop. The cost is visible: ~12,000 lines in engine/agent alone, and architecture docs that read like database-engine specs (2,193 lines, frozen ADRs, a generated formal domain model). The reward is that embedding the engine (engine/COMPATIBILITY.md compatibility contract) or swapping Redis for anything else is a supported act, not surgery.

Honesty is also a design decision: the README states plainly that mecated is unauthenticated by default (loopback/single-user only until hardened), and that cross-process cryptographic proof and authority attenuation are active design work with a public identity-model doc and tracker issue — not shipped guarantees dressed as features.

A meta-note: the repo develops itself with Claude Code — .claude/agents/ ships a dozen reviewer subagents (secure-code-reviewer, devils-advocate, kubernetes-operator-expert…) and .claude/skills/ ships skills like plan-orchestrate and panel-review. The harness's own quality gates are agent-run.

Comparison notes

#tool #project #agents #harness #kubernetes #sandboxing


Sources: raw/mecatl, Mecatl Last updated: 2026-10-02