The current architecture of the Dark Gravity lab: an experimental multi-agent software factory across 10 Kubernetes namespaces, with an OpenZiti overlay and gVisor micro-sandboxing. These are design choices under test; some are implemented, some are still being validated. Check the repository README for the up-to-date status.
Every capability in Dark Gravity is compartmentalized into a dedicated Kubernetes namespace. Outbound NetworkPolicies enforce a Deny-All posture; communication occurs strictly over authenticated channels with cryptographic identities.
Executes Rust-based agents (Rustant, ZeroClaw, DocAgent) and deep research processes. Runs with native sidecars (restartPolicy: Always) for resilient pod lifecycles.
Runs untrusted code synthesis, syntax checking, and unit test suites inside strictly isolated user-space kernels via runsc. Configured target limits: ≤ 30 MiB RAM and ≤ 250m CPU (still being validated against real workloads).
Drives crash-resilient 6-phase autonomous DAGs (Ingestion → Plan → Code → Validation → Review → Delivery). Automatically retries flaky steps and checkpoints DAG states directly to PostgreSQL.
Zero-dependency high-throughput distributed event streaming for mission ingestion, real-time agent internal thoughts, and cryptographic audit events across all autonomous nodes.
Centralized LLM router injecting FinOps virtual tags, enforced spending caps, and caching. Includes Semantica-AGI for tracking causal code provenance and R2R GraphRAG.
Maintains high-dimensional code vectors and symbol dependency graphs using deepwiki-rs (Tree-sitter AST engine) and pgvector for zero-latency semantic codebase lookups.
Primary on-premise storage tier. High-performance CloudNativePG PostgreSQL 16 cluster, MinIO S3 object storage for MLflow runs and DAG step artifacts, mounted via direct-attached DirectPV NVMe disks.
Removes the traditional perimeter by eliminating all open listening ports. Encapsulates pod-to-pod communications into an identity-based mTLS 1.3 cryptographic dark overlay mesh.
Issues dynamic, non-renewable 5-minute (300s) Just-In-Time Git tokens for pull request creation. Tokens are designed to be zeroized on drop (Zeroize crate).
Continuous reconciliation engine that monitors Git repositories and applies declarative Kubernetes manifests automatically. Completely immune to configuration drift.
| Namespace | Core Microservices & Components | Namespace Role in Autonomous Loop | Connected Namespaces |
|---|---|---|---|
| 1. agents | factory-worker, factory-mcp-server (:8100), deep-research-worker (:8200) |
Hosts the AI personas (*Rustant*, *ZeroClaw*, *DocAgent*). Uses native sidecars with restartPolicy: Always to reduce startup ordering failures. |
orchestrators, confluent, security, development, llm-apps, knowledge |
| 2. orchestrators | hatchet-engine (gRPC :7077, API :8000), keda-operator |
Coordinates crash-resilient 6-phase durable DAGs. Dispatches steps to workers and persists state transitions. | agents, storage, confluent |
| 3. confluent | Apache Kafka (KRaft consensus), Schema Registry | Decoupled event streaming for mission-ingestion, real-time agent-thought, and audit telemetry. |
agents, orchestrators |
| 4. storage | CloudNativePG PostgreSQL 16, Sovereign MinIO S3 cluster, DirectPV CSI | Primary state store: database checkpoints, MLflow experiment artifacts, and encrypted DAG state in S3. | orchestrators, agents, knowledge |
| 5. knowledge | pgvector CNPG cluster, deepwiki-rs AST engine |
Maintains semantic code embeddings and Tree-sitter AST symbol graphs for instantaneous code indexing. | agents, storage |
| 6. llm-apps | LiteLLM Gateway (:4000/:4001), Semantica-AGI, R2R GraphRAG (:7272) | Central AI gateway injecting FinOps virtual tags, tracking causal code provenance, and serving GraphRAG memory. | agents, security |
| 7. security | HashiCorp Vault, Bitnami SealedSecrets, Keycloak OIDC | Issues unrenewable 5-minute Just-In-Time (JIT) access tokens for Git and databases; decrypts cluster secrets. | agents, orchestrators, storage |
| 8. openziti | OpenZiti Controller (:8441), Ziti Edge Routers (:3022) | Dark network fabric closing all inbound ports. Provides programmable mTLS 1.3 overlays between pods. | All namespaces (mesh overlay) |
| 9. development | Ephemeral gVisor (runsc) sandboxed Pods and Jobs |
Isolated execution environment where untrusted code, compilation, and test suites run with a target limit of ≤ 30 MiB RAM. | agents |
| 10. flux-system | FluxCD v2 Controllers (Source, Kustomize, Helm, Notification) | GitOps pull-based engine aimed at detecting and reconciling cluster drift without exposing write-access credentials to CI/CD. | All namespaces (GitOps declarative state) |
Why Dark Gravity is invisible to port scanners and immune to perimeter penetration. All network connections are dial-out, authenticated by cryptographic keypairs, and encrypted in transit via OpenZiti mTLS 1.3.
Traditional webhooks require public IP ingress and open firewall ports. Dark Gravity eliminates all public listening ports.
Traditional webhooks require opening ports (:80, :443) or configuring reverse tunnels. Dark Gravity uses outbound polling: the cluster initiates all connections; no external traffic can probe internal pods.
All pod-to-pod communications (Worker to Hatchet, Worker to Vault, Worker to MinIO) run inside the OpenZiti dark network overlay, encrypted with mutual TLS 1.3 and validated against cryptographic hardware identities.
Kubernetes NetworkPolicies restrict pod egress. Even if untrusted code executes inside a sandbox, it cannot reach arbitrary IP addresses on the internet or intranet; only designated Ziti edge endpoints are routable.
Cryptographic enforcement at every boundary: Ed25519 Non-Human Identities, HashiCorp Vault 5-minute dynamic session tokens, and Criterion-verified null-byte RAM wiping.
How Dark Gravity runs on modest hardware or bare-metal servers by replacing heavy virtual machines with sub-second gVisor micro-sandboxes and predictive FinOps budget clamps.
Traditional VM-based sandboxes require gigabytes of RAM and take 30+ seconds to boot. Dark Gravity uses gVisor (runsc):
Uncontrolled LLM agent loops can bankrupt a development budget in hours. Dark Gravity enforces hardcoded financial guardrails:
x-vtags-team, x-vtags-epic, x-vtags-cost_center) to attribute every token.The lab is built on open-source projects, some of them maintained as independent forks. Avoiding vendor lock-in is a goal with its own cost: every fork has to be patched and kept up to date by me.
| Layer | Component & Project | License / Governance | Dark Gravity Architectural Function |
|---|---|---|---|
| Language & Core | Rust 2024 / Tokio | MIT / Apache 2.0 | Memory-safe, high-concurrency runtime without a garbage collector. |
| Orchestration | Hatchet Engine | Apache 2.0 | Crash-resilient durable DAG workflow orchestration with PostgreSQL state persistence. |
| Event Streaming | Apache Kafka (KRaft) | Apache 2.0 | High-throughput pub/sub event bus streaming cognitive thoughts and audit events. |
| Relational Database | CloudNativePG (PostgreSQL 16) | PostgreSQL Open Source | HA database cluster managing mission state checkpoints and pgvector embeddings. |
| Sovereign S3 Storage | MinIO Hardened Core (@lgcorzo) | Apache 2.0 (Sovereign Fork) | Air-gapped object storage for checkpoints, compliance artifacts, and MLflow models. |
| Hardware SIMD | sha256-simd / simdjson-go | Apache 2.0 (Sovereign Fork) | AVX-512 & ARM64 hardware-accelerated crypto hashing and multi-gigabyte JSON parsing. |
| Runtime Isolation | Google gVisor (runsc) | Apache 2.0 | User-space kernel sandboxing for untrusted code execution (target ≤ 30 MiB RAM). |
| Network Security | OpenZiti (mTLS 1.3) | Apache 2.0 | Dark network overlay closing all external ingress ports across Kubernetes clusters. |
| Secrets Management | HashiCorp Vault & SealedSecrets | MPL 2.0 / Apache 2.0 | Short-lived Just-In-Time (JIT) 5-minute dynamic session tokens and encrypted GitOps secrets. |
| GitOps Deployment | FluxCD v2 | Apache 2.0 (CNCF Graduated) | Pull-based continuous delivery reconciling desired cluster state from Git repositories. |