Developer Overview
AEGIS (Agent Execution, Graph Intelligence & State) is a stateful runtime platform for enterprise AI agents. It is a domain-neutral compliance runtime: compliance domains are installable packs, entity types are runtime DB-backed definitions, and agent behavior (skills, routers, rules, prompts, settings) is tenant-configurable data. The first installed vertical is oil and gas regulatory compliance in Texas — RRC (Railroad Commission of Texas) spacing, flaring, production, and methane workflows.
What AEGIS Does
AEGIS runs stateful, governed AI agents against a compliance knowledge graph. It provides:
- AI agent execution with a LangGraph-based stateful pipeline (a single LLM node inside a tool loop)
- Knowledge graph for entity relationships — per-tenant Apache AGE graphs (wells, leases, operators, permits in the RRC vertical)
- Memory system with working memory, episodic recall, and an injection ledger for deduplication
- Human-in-the-loop (HITL) approval checkpoints that fire from skill-attached rules, never optional for regulatory filings
- Installable compliance packs — each pack declares its skills, checklist templates, and assessment recipes; RRC ships five (Rule 37, Rule 32, Form PR, Flaring Monitor, EPA OOOOb)
Repository Layout
The project is a monorepo with 12 backend services (11 Python + 1 Go, one of which — sandbox-runner — has no TCP port), a Next.js frontend, and shared Python libraries:
aegis/
agents/ # 4 legacy YAML agent configs — HISTORICAL, not read at runtime
data/ # RRC sample data
docs/ # Documentation, specs (docs/specs/), and the Nextra wiki
frontend/ # Next.js 16 App Router (TypeScript, Tailwind, shadcn/ui)
infrastructure/ # Docker configs, init SQL, startup/test scripts
services/
api-gateway/ # Go reverse proxy (port 8000)
orchestration-engine/ # LangGraph agent runtime, packs (port 8001)
memory-service/ # Working + episodic memory, ledger (port 8002)
knowledge-graph-service/ # Apache AGE graph (port 8003)
approval-service/ # HITL approvals + audit trail (port 8004)
ingestion-service/ # RRC scrapers + CSV import (port 8005)
compliance-monitor/ # Deadline + rule tracking (port 8006)
flaring-monitor/ # Flaring volumes + emissions (port 8007)
auth-service/ # Email/password login, JWT, RBAC (port 8009)
agent-config-service/ # Skills, routers, rules, prompts, settings (port 8010)
connector-service/ # External data source catalog + credentials + probes (port 8011)
sandbox-runner/ # Jailed Python execution (unix socket, no TCP port)
shared/ # Shared Python models and DB helpers (aegis_shared)
specs/ # Phase specifications (R1-R5)Tech Stack
| Layer | Technology | Notes |
|---|---|---|
| Languages | Python 3.12, Go 1.21+, TypeScript | Python for the AI/app services, Go for the gateway |
| Agent Orchestration | LangGraph 0.1.x | StateGraph-based execution pipeline |
| LLM Routing | LiteLLM | Box default anthropic/claude-sonnet-5; model is tenant-configurable via Platform Settings |
| Web Framework (Python) | FastAPI | Async/await, all Python services |
| Web Framework (Go) | net/http stdlib | Reverse proxy, middleware chain |
| Frontend | Next.js 16, Tailwind CSS, shadcn/ui | App Router, SSE streaming, same-origin /api/v1/* |
| Database | PostgreSQL 15 + pgvector + Apache AGE | Single DB instance with extensions |
| Cache / Memory | Redis 7 | Working memory, injection ledger |
| Message Queue | Apache Kafka (Confluent 7.6.0) | Async event publishing |
| Dependency Management | Poetry (Python), Go modules | Per-service pyproject.toml |
| Data Modeling | Pydantic v2 | Shared models in aegis_shared |
Quick Links
- Prerequisites — tools to install before you start
- Local Setup — clone, configure, and run the platform
- Environment Variables — every env var documented
- First Run — seed data and verify the system works
- Architecture Overview — high-level system diagram
- LangGraph Pipeline — how agent execution works
- Agents & Skills — the general/creator model, routers, and packs
- Glossary — definitions for domain and technical terms