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.
npx agentmods add agents/ysydhc/team_memory/engineering-autonomous-optimization-architectgit clone --depth 1 https://github.com/ysydhc/team_memoryWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00028 | $0.01650 |
| Opus 5 | $0.00014 | $0.00825 |
| Sonnet 5 | $0.00006 | $0.00330 |
| Haiku 4.5 | $0.00003 | $0.00165 |
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 2d 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.
This is a copy
98% identical to Autonomous Optimization Architect — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 106 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.
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.
- 2d ago First seen · 106 lines · 28 tokens per session scan A ec206c5aae06
Autonomous Optimization Architect is an agent published in the GitHub repository ysydhc/team_memory (1 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 1,650 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to Autonomous Optimization Architect, differing in 3 lines, and is treated as a copy.
Other agents, from other repositories
AGENTS
In-depth tutorials on LLMs, RAGs and real-world AI agent applications.
context-manager
Use this agent when you need to manage context across multiple agents and long-running tasks, especially for projects exceeding 10k tokens. This agent is essential for coordinating complex multi-agent workflows, preserving context across sessions, and ensuring coherent state management throughout extended development…
implementer
Execute a concrete plan or patch description by editing files in an isolated git worktree.
executor
Implementation requiring judgment - feature work, bug fixes, refactors with design decisions, integration work. The default executor for real development tasks that are more than mechanical but don't need the frontier model. Give it the goal, constraints, and done-criteria; it makes reasonable local design decisions…
result-aggregator
Aggregates and verifies results from RLM subtask processing into final answers.
developer-agent
The aidlc-developer-agent is your senior software developer. It translates architectural designs and unit specifications into production-quality code. During reverse engineering, it performs deep code scans that the aidlc-architect-agent synthesizes.