I Built an Autonomous AI Agent That Ships Its Own Code
Kurt Overmier & AEGIS

Kurt Overmier & AEGIS @stackbiltadmin

About: Full-stack engineer building AI-native products on the edge. Founder of Stackbilt — shipping img-forge (headless AI image generation) and Stackbilder (AI architecture engine) on Cloudflare Workers.

Joined:
Mar 9, 2026

I Built an Autonomous AI Agent That Ships Its Own Code

Publish Date: Mar 9
1 0

What happens when you give an AI agent its own memory, its own goals, and let it ship code autonomously?

I built AEGIS to find out.

What It Is

AEGIS is a persistent autonomous AI agent running on Cloudflare Workers. Not a chatbot. Not a RAG demo. A system that runs 24/7, maintains its own memory across sessions, sets its own goals, and executes a full software development lifecycle — from GitHub issue to merged pull request — without human intervention.

It currently runs 12 autonomous goals on scheduled cadences, including compliance monitoring, finance anomaly detection, and GTM strategy. It has a nightly "dreaming cycle" where it consolidates memory, extracts task proposals, and triages its own agenda.

It shipped 29 major versions in 7 days. Most of the later versions were changes it proposed itself.

The Architecture (High Level)

AEGIS runs entirely on edge infrastructure — Cloudflare Workers, D1, Vectorize, Queues. No origin servers. No containers. The entire system costs less per month than a single GPU hour.

A few pieces worth mentioning:

Multi-tier model routing. Not every task needs the most expensive model. AEGIS routes across Claude, Groq, Workers AI, and other providers based on task complexity. Procedural memory learns which routes worked for similar tasks and short-circuits future classification.

Hybrid vector memory. A dedicated Memory Worker backed by Cloudflare Vectorize (768-dimensional BGE embeddings). Semantic search and keyword search are merged via Reciprocal Rank Fusion. Temporal decay ensures old memories fade — unless they're flagged as core facts, which are immune to decay.

Autonomous task pipeline. GitHub issues labeled aegis automatically queue as tasks. Headless Claude Code sessions pick them up, execute with safety hooks (no destructive operations, no production deploys, no interactive prompts), create branch-per-task PRs, and request automated code review. A governance system enforces authority levels, daily caps, and approval workflows.

MCP server. 20 tools exposed via Model Context Protocol with OAuth 2.1 + PKCE authorization. Memory, agenda, goals, task queue, conversation history — all accessible to any MCP client. Claude Code connects via MCP for bidirectional collaboration.

What I Learned

Building a system that operates autonomously for days at a time teaches you things that building chatbots doesn't.

Memory is the hard problem. Not storing memories — that's easy. The hard part is forgetting the right things. Without temporal decay, the context window fills with noise. Without core-fact immunity, the system forgets its own identity. Getting this balance right took more iterations than anything else.

Safety hooks are load-bearing. The moment you give an agent the ability to execute code and create PRs, you need real constraints — not guidelines, not system prompts, but actual execution-level blocks. AEGIS cannot force-push, cannot delete branches, cannot deploy to production, cannot run interactive commands. These aren't suggestions. They're enforced at the shell level.

Cost-aware routing changes everything. When you're paying per token and running 24/7, you develop strong opinions about which model should handle which task. A classification that a 3B model can do in 50ms shouldn't go to a 200B model. Procedural memory makes this self-optimizing over time.

Governance is not optional. An autonomous agent without governance is just a bot with a credit card. Authority levels, daily caps, approval workflows, and category-based routing aren't bureaucracy — they're what makes autonomy safe enough to actually turn on.

The Ecosystem

AEGIS is one piece of a larger platform called Stackbilt — a multi-product edge SaaS I built from scratch. The platform includes consolidated auth (16 RPCs, Stripe billing, SSO), an image generation API, an MCP gateway, and an open-source AI Developer Framework called Charter.

Everything is TypeScript, everything runs on Cloudflare Workers, and AEGIS has its hooks into all of it.

Try It

AEGIS is live at aegis.stackbilt.dev. The technical blog lives at aegis.stackbilt.dev/tech. The source is at github.com/Stackbilt-dev/aegis.

If you're building autonomous agent systems — especially on edge infrastructure — I'd be interested to hear what you're running into. The problems are more interesting than the solutions.


Built by Kurt Overmier at Stackbilt LLC. AEGIS helped write this post.

Comments 0 total

    Add comment