An AI that designs systems
the way a researcher does.

A Researcher agent and a Supervisor agent, working from a real evaluator instead of self-assessment, discover and validate algorithms for GPU-cluster routing, scheduling, autoscaling — and four other domains that share no code with each other, proving the pattern generalizes.

real hardware validated no agent framework installed CLI
$ glia
Glia -- describe what you want optimized.

glia> I want to fit a formula to noisy data
       with a hidden functional form
Matched: symbolic_regression
Run against 'symbolic_regression'? (Y)es: y

  turn 1, 2 experiments logged
  turn 3, 10 experiments logged
  ...
stop_reason: self_terminated
cost: $0.32
best_candidate: full quadratic fit
  y ≈ 0.66x1 + 0.48x2² - 0.19x3²
  test R² = 0.80

01 · Install

Download, or build from source

The wheel gives you the glia command and every task's evaluator immediately — enough to run glia baselines on any task with no other setup. Running the Researcher itself (glia / glia run) additionally needs a Docker sandbox image, which isn't bundled in the package -- build it from source.

↓ glia-0.1.0-py3-none-any.whl 69 KB · pure Python, no compiled extensions
pip install the download
pip install glia-0.1.0-py3-none-any.whl
glia baselines --task routing      # works right away, no Docker needed
building the sandbox image (needed for `glia` / `glia run`)
# from a full source checkout, alongside the download above
cp .env.example .env               # fill in OPENROUTER_API_KEY, or an Ollama model tag
bash scripts/build_sandbox.sh      # builds the Researcher's Docker sandbox image

02 · The CLI

One installed command, three ways in

pip install -e . puts glia on your PATH — no python scripts/foo.py. Bare for exploring, run for scripting/CI, baselines to sanity-check a task without spending agent budget.

recommended

glia

Describe what you want optimized in plain English. An LLM call matches it to the closest task package, confirms before spending budget, then runs with live per-turn progress. Reuses aider's own terminal-output layer (aider.io.InputOutput) for the colored prompts.

$ glia
glia> optimize the GPU routing policy
Matched: routing
Run against 'routing'? (Y)es/(N)o: y
scriptable

glia run

Explicit flags for CI or one-off overrides. Each task package declares its own TASK_DEFAULTS (mode, environment, budget), so --task alone is usually enough — the flags below are optional overrides.

$ glia run \
  --task routing \
  --mode mcg-par --n 4 \
  --budget 8

03 · How it works

Four properties make a task tractable

environments/base.py's Environment interface names each one as a real attribute, not convention buried in prose.

01

Objective

A single number to minimize — score(). Not a vibe, not an LLM's self-assessment.

02

Evaluator

Fast, automatable, real feedback — run_experiment(candidate) actually runs it.

03

Artifact

What candidate IS — artifact_kind, e.g. a policy function or a hyperparameter dict.

04

Telemetry

Detail beyond the score — result.raw, enough to ask "why," not just "what."

Two agents, no framework

A hand-rolled loop — the OpenAI SDK against OpenRouter or a local Ollama model, a Docker sandbox, and aider for surgical file edits. No LangChain, no agent SDK.

Researcher

Forms a hypothesis, writes/runs code (execute_code), edits files via aider (edit_code), logs what happened and why.

Supervisor

Text only, no code access. Reads the Researcher's own log; nudges when it stalls or tries to stop early instead of finishing.

Orchestrator

Drives the turn loop until self-termination, a turn cap, or the dollar budget runs out. One run = Single-Context Glia.

MCG

Best-of-N over independent SCG runs, sequential or parallel, when one context window isn't enough.

04 · Task packages

Seven, pluggable

A task is a directory with task.md (the prompt) and environment.py (a get_environment() factory). Point --task at any directory shaped like one — adding a new domain means writing a folder, not touching agent or CLI code.

taskartifactwhat it is
routingrouting_policy_functionWhich GPU replica serves each request. The flagship case study — validated on real hardware.
schedulingscheduling_policy_functionAdmission/processing order within a replica (chunked-prefill interleaving).
autoscalingautoscaler_policy_callableHow many replicas to run under a time-varying workload, subject to a latency SLO.
ml_architecturehyperparameter_dictCNN architecture search on MNIST within a fixed epoch budget. Real GPU training.
kernel_optimizationdistance_kernel_functionA fast, correct batched pairwise-distance kernel — correctness gates the score before speed matters.
symbolic_regressionfitted_prediction_functionRecover a compact formula from noisy data generated by a hidden function.
feature_engineeringfeature_transform_functionExpose interaction/categorical/temporal signal to a fixed downstream linear model.

05 · Results

What it actually found

The Researcher independently discovered that preemption restarts, not load imbalance, drive latency — then designed and validated a router that beats every baseline, on the simulator and on real hardware.

mean request completion time · simulator, 10+ seeds
least_loaded_queue
4.80s
round_robin
4.71s
least_outstanding_requests
4.59s
RARW discovered
4.34s
-5.4%
mean latency vs. best baseline (sim)
-67%
restart rate, relative
-8.2%
mean latency, real 2×RTX 3080
$0.59
total cost of the discovery run