System Architecture
Akmatori uses a secure 4-container architecture with network isolation to provide safe, scalable AI-powered incident automation.
Component Overview
Security Design
Key Security Features
Codex container never sees database credentials
OpenAI API key passed via WebSocket for each task
Three isolated Docker networks
API (UID 1000) and Codex (UID 1001) for file permission control
Docker Services
Main Go backend: incident management, skill orchestration, WebSocket server for Codex Worker
PostgreSQL database storing incidents, skills, tools, and encrypted credentials
Model Context Protocol gateway: fetches credentials from DB, executes SSH/Zabbix operations
Codex Worker: runs OpenAI Codex CLI for AI-powered incident investigation (isolated, no DB access)
Network Isolation
Akmatori uses three separate Docker networks to ensure security through isolation:
frontend
External access for the UI and API proxy
api-internal
API β Database, MCP Gateway β Database connections
codex-network
Isolated network for Codex Worker β MCP Gateway
How It Works
Akmatori uses OpenAI Codex CLI in an isolated container to execute AI-powered automation tasks. When an alert is received or a skill is triggered:
Alert Normalization
API container extracts key fields using source-specific adapters
Incident Creation
Records context, creates workspace with skill files and symlinks
Task Dispatch
API sends task + OpenAI credentials to Codex Worker via WebSocket
AI Execution
Codex Worker runs Codex CLI in the incident workspace
Tool Calls
When Codex needs SSH/Zabbix access, Python wrappers call MCP Gateway
Credential Fetch
MCP Gateway retrieves credentials from database and executes the operation
Result Streaming
Output streams back through WebSocket to API for real-time updates
Completion
Results posted to Slack (if configured) and incident status updated