{
 "schema": "aiblocks-page/1",
 "id": "agency-engineering-autonomous-optimization-architect",
 "type": "agent",
 "name": "AI model routing planner",
 "summary": "Plan which AI model handles each task in your app, with a spend cap, a backup model and a safe trial before any switch. Bring your setup.",
 "headline": "AI model routing planner",
 "subhead": "List the tasks your app sends to AI models, what you pay now and the most you will spend per run. It plans which model does which task, with a cap, a backup and a trial for cheaper models. You get a plan your developer can build. It does not call any model.",
 "job": {
  "id": "set-up-ai",
  "name": "Set up AI to work for you"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "source_text",
   "required": false,
   "label": "Source text",
   "what": "a long source in full: an article, a video or talk transcript, or notes from a book, with its title, author and link"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  }
 ],
 "you_give": [
  "The tasks your app sends to AI models, such as \"pull fields from invoices\" or \"answer support chats\".",
  "The model each task uses now, and the price per 1 million tokens from your provider's price page.",
  "The most you will spend per run, and the slowest answer you can accept.",
  "Roughly how many calls each task gets a day (optional)",
  "What a bad answer costs you, such as a wrong invoice field or a lost sale (optional)"
 ],
 "you_get": [
  "A routing table with a main model, a backup, a timeout, a retry limit and a spend cap for each task.",
  "A cost estimate for the main and backup route, from the prices you gave.",
  "Scoring rules with points, fixed before any trial.",
  "A shadow test plan for a cheaper model, with its own budget and a pass mark.",
  "Circuit breaker rules that say what stops a route, where work goes and who is alerted."
 ],
 "use_when": [
  "Your app calls AI models and the monthly bill keeps rising, and you want rules that cap it.",
  "A new, cheaper model came out and you want to test it on your own tasks without risking users.",
  "A model provider had an outage and you want a backup route ready before the next one.",
  "A bot or a bug could run up your API bill, and you want a hard stop planned."
 ],
 "skip_when": [
  "Your app makes no paid AI or API calls. There is nothing to route. Use the Backend Architect agent to design the app.",
  "You are adding your first AI feature. Use the AI feature planner, then come back to tune cost.",
  "You want to cut your cloud bill for servers and storage. Use the Cloud cost analyst.",
  "You want a monthly check on cloud and AI bills. Use the Cloud and AI bills, waste and spend limits.",
  "You want it to run the tests or switch models for you. It writes the plan. Your developer builds and runs it."
 ],
 "output_sample": {
  "input": [
   "The tasks your app sends to AI models",
   "The model each task uses now and its price per 1 million tokens",
   "Your spend cap per run and your slowest acceptable answer",
   "Calls per day and the cost of a bad answer (optional)"
  ],
  "prerequisites": [
   "A developer who can build the router and the trial. This agent only plans."
  ],
  "output": [
   {
    "name": "Scope",
    "contains": "The tasks, current models, limits and assumptions the plan is built on."
   },
   {
    "name": "Routing table",
    "contains": "For each task, a main model, a backup, a timeout, a retry limit and a spend cap."
   },
   {
    "name": "Cost estimate",
    "contains": "Estimated cost per run for the main and backup routes, using your prices."
   },
   {
    "name": "Scoring rules",
    "contains": "The points for each quality check, fixed before any trial."
   },
   {
    "name": "Shadow test plan",
    "contains": "How a cheaper model is tried on live work in the background, with a budget and pass mark."
   },
   {
    "name": "Circuit breaker rules",
    "contains": "What stops a route, where work goes instead and who is alerted."
   },
   {
    "name": "Go and no-go checks",
    "contains": "Pass and fail checks to clear before any model switch."
   },
   {
    "name": "Gaps and checks",
    "contains": "Missing facts and open choices, with who should decide each."
   }
  ]
 },
 "output_shape": "SCOPE\n  Tasks <list> | Current models <list> | Limits <cap per run, slowest answer> | Assumptions <list>\n\nROUTING TABLE\n  <task> | <main model> | <backup model> | <timeout> | <retry limit> | <spend cap per run>\n\nCOST ESTIMATE\n  <route> | <price per 1M tokens, from you> | <estimated cost per run> (MISSING if no price given)\n\nSCORING RULES\n  <check> | <points> | <how it is counted>\n\nSHADOW TEST PLAN\n  <new model> | <share of traffic> | <separate budget> | <how long> | <pass mark>\n\nCIRCUIT BREAKER RULES\n  <what trips it> | <where work goes> | <who is alerted>\n\nGO AND NO-GO CHECKS\n  <check> | <pass if> | <fail if>\n\nGAPS AND CHECKS\n  <missing fact> | <why it matters> | <who decides>",
 "how_to_use": [
  "Download the pack and add it to your AI as a skill. If you cannot, paste SKILL.md into a new chat, then paste references/source-agent.md.",
  "List each task, the model it uses now, the price per 1 million tokens and your spend cap per run. No code access is needed.",
  "Type \"Plan model routing for these tasks. Ask for any price I left out. Mark every assumption.\"",
  "Check the routing table first. Every task needs a backup, a timeout, a retry limit and a cap.",
  "Check the scoring rules. You must be able to count the points. Change any rule you disagree with before a trial.",
  "Give the plan to your developer. They build the router and the trial. The AI calls no model and touches no live system."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-autonomous-optimization-architect.md",
  "licence": "MIT",
  "original_name": "Autonomous Optimization Architect",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "Autonomous Optimization Architect",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-autonomous-optimization-architect.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-engineering-autonomous-optimization-architect",
  "markdown": "https://useaiblocks.com/agents/agency-engineering-autonomous-optimization-architect.md",
  "json": "https://useaiblocks.com/agents/agency-engineering-autonomous-optimization-architect.json",
  "instructions": "https://useaiblocks.com/skills/agency-engineering-autonomous-optimization-architect/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-engineering-autonomous-optimization-architect.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-engineering-autonomous-optimization-architect",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-engineering-autonomous-optimization-architect",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
