An event-driven SRE daemon that monitors microservices, autonomously diagnoses root causes using AI heuristics, and executes zero-touch remediation before human intervention is required.
![]()
![]()
![]()
An event-driven SRE daemon that monitors microservices, autonomously diagnoses root causes using AI heuristics, and executes zero-touch remediation before human intervention is required.
- The Philosophy: Problem vs. Solution
- Enterprise Capabilities
- System Architecture
- Component Deep-Dive
- The Autonomous AI Engine
- API & Webhook Reference
- Zero-Dependency Quickstart
- Day 2 Operations
- Troubleshooting Guide
- Roadmap & Limitations
- Contributing
- License
Modern microservice architectures are highly resilient but notoriously brittle under cascading load. When a Node.js gateway leaks memory or a PostgreSQL connection pool exhausts, human Site Reliability Engineers (SREs) must manually parse logs, identify the failing container, and execute a restart. In a high-availability environment, this human latency costs thousands of dollars in downtime.
Aegis Mesh eliminates the human bottleneck through the "Aegis Doctrine": Detect, Diagnose, Execute, and Audit.
| Feature | Traditional Operations | The Aegis Approach |
|---|---|---|
| Detection | Humans waiting for PagerDuty alerts | Sub-second anomaly detection via Consul Mesh polling |
| Diagnosis | Manually grep-ing through Kibana logs |
Automated AI Root Cause Analysis directly from stderr |
| Remediation | SSH-ing into servers to run docker restart |
Secure Go APIs execute host-level remediation |
| Auditing | Fragmented Slack channel histories | Cryptographic immutable logging in PostgreSQL |
Generates high-confidence remediation plans using weighted failure analysis and stack trace inspection.
Horizontally scales overloaded containers, provisions networking, and updates service registration automatically.
Built-in Chaos Engineering toolkit capable of:
- Network degradation
- Random container termination
- Latency injection
- Packet loss simulation
Streams real-time Docker logs securely to operators using WebSocket multiplexing.
Includes:
- Context propagation
- Exponential jittered backoff
- Circuit breaking
- Prometheus metrics export
graph TD
classDef ui fill:#020617,stroke:#3b82f6,stroke-width:2px,color:#fff
classDef api fill:#0f172a,stroke:#14b8a6,stroke-width:2px,color:#fff
classDef core fill:#4c1d95,stroke:#a855f7,stroke-width:2px,color:#fff
classDef mesh fill:#7f1d1d,stroke:#f43f5e,stroke-width:2px,color:#fff
classDef db fill:#1e3a8a,stroke:#60a5fa,stroke-width:2px,color:#fff
UI[Control Plane<br/>Next.js 14]:::ui
API[API Gateway<br/>Go + slog]:::api
Brain[Aegis Daemon<br/>Go Worker]:::core
Consul[Service Mesh<br/>HashiCorp Consul]:::mesh
DB[(Action Ledger<br/>PostgreSQL)]:::db
Docker((Docker Daemon))
UI -->|REST + WebSocket| API
API -->|Read / Write| DB
API -->|Administrative Actions| Docker
Brain -->|Polls State| Consul
Brain -->|Remediation Hooks| API
Consul -->|TTL Health Checks| Docker
Built with Next.js 14, the dashboard provides:
- Real-time service telemetry
- WebSocket event streaming
- Fleet monitoring
- Incident forensics
- React Server Components
- Client-side WebSocket hydration
- Timezone-safe rendering
- Live audit trail
Written in Go 1.21+.
Acts as the centralized command broker responsible for:
- REST APIs
- WebSocket streams
- Docker orchestration
- Audit logging
- Structured logging using
log/slog - CORS handling
- Host daemon interaction
- Remediation execution
The autonomous SRE brain.
Responsibilities:
- Poll Consul every 4 seconds
- Analyze health signals
- Generate remediation plans
- Trigger automated recovery
Backoff progression:
2s → 4s → 8s → 16s → 32s
Prevents thundering herd failures during infrastructure outages.
HashiCorp Consul maintains infrastructure state.
Features:
- Service discovery
- Health checking
- TTL registrations
- Fleet membership tracking
Stores all executed actions for forensic auditing.
- Timestamp
- Service Name
- Action Executed
- Operator Identity
- Payload Hash
- Outcome
Rather than relying exclusively on procedural decision trees, Aegis Mesh utilizes a weighted heuristic analysis engine.
When a node enters a degraded state:
- Logs are collected
- Health metrics are aggregated
- Failure signatures are matched
- Confidence scores are generated
- Remediation plans are proposed
{
"service": "payment-api",
"diagnosis": "Stripe API gateway timeout. Goroutine leak detected in connection pool resulting in OOM kill.",
"confidence": "94.2%",
"recommendation": "Execute graceful SIGTERM. Flush Redis cache and provision secondary replica before reboot."
}GET /api/logs?container={container_name}
Connection: Upgrade
Upgrade: websocketPOST /api/remediate
Content-Type: application/jsonPayload:
{
"service_name": "inventory-db",
"issue": "PostgreSQL connection pool exhausted. Active connections exceeded 100 limit.",
"action": "evaluate_remediation_heuristics"
}The platform uses optimized multi-stage Alpine Docker builds.
- Docker Engine ≥ 24.0
- Docker Compose ≥ 2.20
- GNU Make
git clone https://github.com/your-username/agentops-platform.git
cd agentops-platform
make upThis command:
- Builds binaries
- Creates networks
- Initializes databases
- Starts the entire stack
make seedInjects mock services into Consul for testing.
| Service | URL |
|---|---|
| Control Plane | http://localhost:3000 |
| Prometheus Metrics | http://localhost:9091/metrics |
| Consul UI | http://localhost:8500/ui |
| Command | Description |
|---|---|
make up |
Boot the stack |
make rebuild |
Force clean compilation |
make logs |
Stream daemon logs |
make clean |
Factory reset everything |
Ports:
- 3000
- 8080
- 8500
- 5432
may already be occupied.
docker ps
docker stop <container-id>Or modify docker-compose.yml.
If local builds fail with Docker SDK dependency errors:
Always build using Docker:
make rebuildThis ensures dependency resolution occurs inside the supported build environment.
Cause:
Persistent Consul volumes retaining stale service registrations.
make clean
make up
make seedThe backend mounts:
/var/run/docker.sock
This is acceptable for local orchestration but unsuitable for multi-tenant production deployments.
Current development mode runs a single Consul instance.
Production deployments should use:
3–5 Consul servers
to prevent split-brain scenarios.
- Replace Docker daemon interactions
- Adopt
client-go - Manage Pods natively
- Token-bucket rate limiting
- Semantic log analysis
- AI-assisted incident response
Migrate from:
PostgreSQL
to:
CockroachDB
for resilient audit storage.
- Mobile approvals
- Interactive remediation workflows
- Persistent webhook connectivity
Pull requests are welcome.
# Fork repository
git checkout -b feature/amazing-feature
git commit -m "feat: add amazing feature"
git push origin feature/amazing-featureThen open a Pull Request.
make cleanfrequently during testing to maintain a clean environment.
Distributed under the MIT License.
Built with ❤️, Go, Docker, PostgreSQL, and Next.js.