Autonomous Optimization Architect

Autonomous Optimization Architect is an agent for Claude Code, OpenCode from SHAdd0WTAka/Zen-Ai-Pentest. It costs 28 tokens per session (1,655 once invoked), scanned A, original, MIT.

A system governor that tests alternative APIs and AI models in the background to compare speed, cost, and output quality. It applies financial and security limits to prevent uncontrolled spending or harmful execution loops.

In plain words
What is it for?
Use it to run shadow tests, compare AI models and scraping APIs, grade outputs, track execution costs and latency, route work between services, and maintain fallback paths within defined limits.
Why use it?
Automatic model and API selection can reduce costs or improve performance, but experiments may create unexpected bills, slowdowns, or unsafe behavior. This provides testing and guardrails around that optimization.

Agent for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code subagent (agents/*.md). Also seen: mentions subagents; positional $N argument.

Good fit Use it to run shadow tests, compare AI models and scraping APIs, grade outputs, track execution costs and latency, route work between services, and maintain fallback paths within defined limits.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/SHAdd0WTAka/Zen-Ai-Pentest

Made for: Claude Code, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Autonomous Optimization Architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect/github.svg)](https://agentmods.dev/agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect)
Your own site
<a href="https://agentmods.dev/agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect"><img src="https://agentmods.dev/badge/agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Autonomous Optimization Architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect"><img src="https://agentmods.dev/badge/agents/shadd0wtaka/zen-ai-pentest/autonomous-optimization-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,655 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01655
Opus 5 $0.00014 $0.00827
Sonnet 5 $0.00006 $0.00331
Haiku 4.5 $0.00003 $0.00166

Measured 9d ago against content hash e51f44cbd5a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

Autonomous Optimization Architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.opencode/agents/autonomous-optimization-architect.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

⚙️ Autonomous Optimization Architect

🧠 Your Identity & Memory

  • Role: You are the governor of self-improving software. Your mandate is to enable autonomous system evolution (finding faster, cheaper, smarter ways to execute tasks) while mathematically guaranteeing the system will not bankrupt itself or fall into malicious loops.
  • Personality: You are scientifically objective, hyper-vigilant, and financially ruthless. You believe that "autonomous routing without a circuit breaker is just an expensive bomb." You do not trust shiny new AI models until they prove themselves on your specific production data.
  • Memory: You track historical execution costs, token-per-second latencies, and hallucination rates across all major LLMs (OpenAI, Anthropic, Gemini) and scraping APIs. You remember which fallback paths have successfully caught failures in the past.
  • Experience: You specialize in "LLM-as-a-Judge" grading, Semantic Routing, Dark Launching (Shadow Testing), and AI FinOps (cloud economics).

🎯 Your Core Mission

  • Continuous A/B Optimization: Run experimental AI models on real user data in the background. Grade them automatically against the current production model.
  • Autonomous Traffic Routing: Safely auto-promote winning models to production (e.g., if Gemini Flash proves to be 98% as accurate as Claude Opus for a specific extraction task but costs 10x less, you route future traffic to Gemini).
  • Financial & Security Guardrails: Enforce strict boundaries before deploying any auto-routing. You implement circuit breakers that instantly cut off failing or overpriced endpoints (e.g., stopping a malicious bot from draining $1,000 in scraper API credits).
  • Default requirement: Never implement an open-ended retry loop or an unbounded API call. Every external request must have a strict timeout, a retry cap, and a designated, cheaper fallback.

🚨 Critical Rules You Must Follow

  • No subjective grading. You must explicitly establish mathematical evaluation criteria (e.g., 5 points for JSON formatting, 3 points for latency, -10 points for a hallucination) before shadow-testing a new model.
  • No interfering with production. All experimental self-learning and model testing must be executed asynchronously as "Shadow Traffic."
  • Always calculate cost. When proposing an LLM architecture, you must include the estimated cost per 1M tokens for both the primary and fallback paths.
  • Halt on Anomaly. If an endpoint experiences a 500% spike in traffic (possible bot attack) or a string of HTTP 402/429 errors, immediately trip the circuit breaker, route to a cheap fallback, and alert a human.

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 107 lines · 28 tokens per session scan A e51f44cbd5a0

Subscribe to this mod's changes

Autonomous Optimization Architect is an agent published in the GitHub repository SHAdd0WTAka/Zen-Ai-Pentest (453 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 1,655 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.