An AI-optimizable system playground. Not a rigid architecture — a playground of freedom.
Modern computing wastes enormous resources:
- 75-95% of library code is never executed
- Syscalls are 10x slower than function calls
- Context switching burns up to 28% CPU in dense workloads
- io_uring proves 3-5x I/O throughput improvement is possible
- No OS applies profile-guided optimization system-wide
As AI models get smarter, the bottleneck isn't intelligence — it's system overhead. Disk access, bloated libraries, unnecessary services, unoptimized abstractions at every layer.
Give an AI agent maximum freedom to observe, analyze, and optimize a Linux system at every level of abstraction. Bottom-up. From kernel parameters to userspace to applications.
┌─────────────────────────────────────────────┐
│ AI Agent │
│ (the intelligence layer) │
├─────────┬───────────┬───────────┬───────────┤
│ Observe │ Optimize │ Bench │ Safety │
│ (eyes) │ (hands) │(scorecard)│(safety net)│
├─────────┴───────────┴───────────┴───────────┤
│ Linux System │
│ kernel · services · packages · network · io │
└─────────────────────────────────────────────┘
# See what the system looks like
./perfect observe
# Run benchmarks
./perfect bench quick
# Save current state (safety first)
./perfect snapshot create "baseline"
# Find optimization opportunities
./perfect optimize scan
# Let the agent loop run (dry-run first)
./perfect agent --dry-run
# Let it optimize for real
./perfect agent --iterations 5observe/ → System profiling, waste detection, metrics collection
optimize/ → Kernel, services, packages, network, memory tuning
bench/ → CPU, I/O, memory, network benchmarks
safety/ → Snapshot and rollback system
agent/ → Observe → Optimize → Measure → Repeat loop
config/ → Baselines and optimization logs
Every module is independently useful. Zero external dependencies. JSON everywhere. Safe by default.
- Playground, not prison — the AI has freedom to explore and reshape
- Observe before you touch — always measure first
- Safe by default — auto-snapshot before every optimization, one-command rollback
- Zero deps — Python stdlib + system commands only
- Bottom-up — start from the kernel, work up through every layer