Inspiration

During my last internship, I watched DevOps teams constantly battle with capacity planning. They relied on trial-and-error load testing to balance cloud budgets against P99 latency spikes. I realized that balancing performance and cost shouldn't be a guessing game—it's a rigorous math problem. I built EvoArch to replace expensive trial runs and LLM "vibes" with deterministic queueing theory.

What it does

EvoArch is an AI-assisted infrastructure planner that actually does the math.

  • Ingest: Parses Kubernetes/Docker Compose YAML into a directed acyclic graph (DAG).
  • Simulate: Calculates exact P99 latency and hourly compute costs using M/M/c queueing theory.
  • Optimize: Uses an NSGA-II evolutionary algorithm to mutate the topology, finding the "Pareto-optimal" balance between cost and speed.
  • Deploy: An LLM translates the winning mathematical baseline into a fully validated Kubernetes package and ADR, streaming live to a Cytoscape web dashboard.

How I built it

I used OpenAI Codex (GPT-5.6) as a principal architect to build every layer of the stack:

  • Math Engine (Python/FastAPI): Codex implemented the M/M/c calculations, specifically the utilization metric \( \rho = \frac{\lambda}{c\mu} \) and bounded bisection solvers for Erlang C probability.
  • Evolutionary Optimizer: Scaffolded the NSGA-II loop and non-dominated sorting algorithms.
  • Live UI: Engineered the asynchronous WebSocket event stream pushing live metrics to Cytoscape.js.
  • AI Control Plane: Integrated an LLM to translate plain English into strict mathematical weights and synthesize apps/v1 manifests.

Challenges I ran into

  • Complex Math: Handling Erlang C precision in Python was tough, especially managing queue saturation (\( \rho \geq 1 \)) where latency effectively goes infinite.
  • State Syncing: Ensuring the FastAPI WebSocket 250-event replay buffer didn't desync during concurrent generation evaluations.
  • LLM Hallucinations: Generative AI struggles to write mathematically exact Infrastructure-as-Code. I solved this by building a strict deterministic loop that completely blocks the LLM's output if it doesn't perfectly match our mathematical genome.

Accomplishments & What I learned

I proved that AI doesn't have to replace deterministic math—it can orchestrate it. I learned to leverage Codex not just as an autocomplete tool, but to tackle complex multithreading, Pareto sorting, and strict Pydantic v2 validation schemas.

What's next

Integrating Istio routing probabilities into the math model, supporting cyclic dependency graphs, and building direct Terraform cloud provisioning.

Built With

Share this project:

Updates