Back to Projects

AgentOS

BUILDING

A self-hosted AI agent operating system for orchestrating autonomous workflows, tools, workers, and persistent memory.

AgentOS

Overview

AgentOS is a robust, self-hosted platform designed to coordinate multiple specialized AI agents. Unlike simple chatbot wrappers, it operates on a Planner/Supervisor architecture, distributing tasks across dedicated worker queues while maintaining state through a unified memory layer. The system acts as the underlying infrastructure for autonomous AI workflows.

Architecture

01 — Next.js Web App
Control panel and workflow monitoring
02 — FastAPI Gateway
High-performance API boundary
03 — Supervisor
State management and routing
04 — Planner
Task decomposition
05 — Specialized Agents
Domain-specific execution
06 — Worker Queue
Celery-based distributed jobs
07 — Memory Layer
pgvector semantic storage

Why I built this

I needed a way to orchestrate complex, multi-step AI tasks that transcend a single context window. Existing frameworks were either too rigid or designed as opaque SaaS products. I built AgentOS to fully own the execution layer, memory, and observability.

Engineering Challenges

  • Subprocess and distributed job failures in Celery
  • Ensuring transactional consistency between long-running LLM calls and the database
  • Maintaining state and memory coherence across independent agent boundaries
  • Building a reliable observability pipeline for non-deterministic AI outputs

What I learned

Decoupling the planning phase from execution significantly reduces hallucination cascading.

Vector search alone is insufficient for memory; combining it with structured SQL metadata yields much higher retrieval precision.

Stack

Next.jsNext.jsTypeScriptTypeScriptPythonFastAPIPostgreSQLPostgreSQLpgvectorRedisRedisCeleryDockerDocker