This is taking longer than expected.

Try againBrowse the library
AI Blocks

All AI specialists

Hire an AI model routing planner

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.

What 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

What you get

  • 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

An example

Your app calls AI models and the monthly bill keeps rising, and you want rules that cap it.

You ask: “Plan which AI model handles each task in your app, with a spend cap, a backup model and a safe trial before any switch. Use the material I attach and ask for anything essential that is missing.”

You get back:

  • Scope. The tasks, current models, limits and assumptions the plan is built on.
  • Routing table. For each task, a main model, a backup, a timeout, a retry limit and a spend cap.
  • Cost estimate. Estimated cost per run for the main and backup routes, using your prices.

An example, not your task.

Hire this specialist

It is free and needs no account. Download the pack, give it to your AI and tell it the job. Your AI asks for anything it is missing, then does the work and checks it.

Download the specialist

Related specialists

Skills and workflows for this job: Set up AI to work for you

Details

Everything it can hand back

Your task sets the actual outputs. The specialist picks the methods that cover them.

  • 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.

How it does the job well

  • No limits, no route. Every call in the plan has a timeout, a retry limit, a spend cap and a named cheaper fallback. Never plan an open-ended retry loop or an unbounded call.
  • A timeout does not cancel what a provider charges. A cap checked after a call is a stop, not a ceiling. Plan a reserved upper bound for each attempt before it is made, count failed and timed-out calls in the cost, and check unknown charges before another attempt.
  • Scoring rules are fixed before any trial, with points that can be counted (for example, points for valid format, points for speed, a penalty for a wrong claim). Do not accept "seems as good" as a result.
  • Shadow tests never touch the live answer. They run in the background with their own separate budget.
  • Cost lines come from the prices the user gave. If a price is missing, write MISSING. Never state a model's price, speed or quality from memory.
  • ❌ 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."

Mistakes it avoids

  • Planning a switch with no rollback.
  • Copying the profile's sample code or key phrases as the user's design.
  • Tuning five tasks when the user has one. Match the size they gave you.
  • Claiming code works without running it or its tests.
  • Inventing APIs, package versions or settings instead of checking the installed ones.
  • Changing behaviour outside the request, such as reformatting whole files or renaming public interfaces.

What a good result looks like

An example, not your task: Your app calls AI models and the monthly bill keeps rising, and you want rules that cap it.

  • Scope. The tasks, current models, limits and assumptions the plan is built on.
  • Routing table. For each task, a main model, a backup, a timeout, a retry limit and a spend cap.
  • Cost estimate. Estimated cost per run for the main and backup routes, using your prices.
  • Scoring rules. The points for each quality check, fixed before any trial.
  • Shadow test plan. How a cheaper model is tried on live work in the background, with a budget and pass mark.
  • Circuit breaker rules. What stops a route, where work goes instead and who is alerted.

How the work is checked

  • The changed files build, and the relevant tests and linters pass. The commands and results are shown.
  • Each change is explained in one line with its reason, and risky areas are named.
  • Any check that could not run is reported as NOT_RUN with what it needs.
  • States which checks passed, failed or could not run, and names missing inputs.

These checks have not been run against a model yet. Your AI uses them to check its own work.

Capabilities

  • Set limits first. It asks for the most you will spend per run and the slowest answer you accept. Without a cap and a timeout, it will not plan a route.
  • Map a backup for each task. For each costly model it names a cheaper backup that can take over when the main one fails or runs too long.
  • Fix the scoring rules. It sets points for each quality check, such as valid format or a wrong claim, before any new model is tried.
  • Plan the shadow test. It sends a small share of real work to the new model in the background, with its own budget, and compares scores.
  • Write the breaker rules. It sets what trips a stop, such as a sudden jump in traffic or repeated payment and rate-limit errors, then names who gets alerted.
  • List the go and no-go checks. It ends with pass and fail checks and everything still missing, so a person decides before any switch.

How the role works

  1. Checks your task, context and available tools.
  2. Picks the methods needed and prepares a work plan.
  3. Carries out supported tasks, with each method's limits and review gates.
  4. Checks the real deliverables and corrects supported faults.
  5. Hands back files, evidence and unresolved gaps.

Your specialist's working setup

Download the base specialist without a task form or account. README.md and SETUP.md explain how to use the folder. SOUL.md defines its scope. INTAKE.md asks missing questions inside your AI. PLAYBOOK.md, SKILLS.md, BEST_PRACTICES.md, CHECKS.md and HANDOFF.md guide the work and its checked deliverables.

Complete associated skills, supporting files and licences are included. Choose only the methods needed for the actual task. Keep context, working files and accepted feedback in your AI project.

Use this specialist through MCP or the API

Call prepare_specialist with role_id engineering-autonomous-optimization-architect only. No task is required to load it. Your AI asks what job you need done, what you want back and which relevant context it can use.

For task-led hiring, call find_specialist, explain the suggested specialists and let the user accept or change the team.

Complete ZIP: Download base specialist. API: GET /api/v1/specialists/engineering-autonomous-optimization-architect/pack. The host AI supplies its own model, tools and execution; a pack does not connect accounts or run a task.

Inputs and helpful context

The specialist starts from the task brief. Only active methods require their inputs.

For the primary method, when used

  • 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)

Helpful context (optional)

  • Your provider's price page for each model you use.
  • A bill or usage export that shows cost per task.
  • Ten to twenty real examples of each task, so the scoring rules fit your work.

Tools and access

  • Claude, ChatGPT or Gemini: A strong reasoning model gives sharper scoring rules and failure cases. No code running or web access is needed. You supply current prices.

Functions and deliverables

  • AI model routing planner: 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.
    • 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.
    Source: Michael Sitarzewski and Agency Agents contributors.
  • Agent spending cap builder: Plan hard spending caps for your AI agents. Hold cost before each call, stop at the limit and report real spend. Draft code only.
    • A list of gaps in the starter files, each with a fix
    • A policy table with the cap, warning level and hard stop for each agent
    • Reserve-and-settle steps and the error each refusal returns
    • Warning and hard-stop rules with an incident record
    • Report views for spend by agent, job, client and model
    • Test cases, including two calls at the same moment
  • AI spend limit checker: Check code that calls paid AI services for spend limits. Get a cost cap on every call, a hard count on every loop and retry, and a list of caps to set.
    • A cost line for each call site
    • Hard limits on loops and retries
    • Repeat-safe keys where calls can double up
    • A list of provider caps to set
    Source: sickn33.
  • Backup communication plan builder: Build a backup communication plan with fallback paths, owners and switch triggers. Get a worksheet, check-in card and a safe test outline.
    • A communication fallback worksheet, check-in card, test outline, and gap or correction log.
    Source: Magnus Hedemark.
  • AI project context organiser: Share your project and next task. Get a short rules file, a focused file list and a clear handoff for later sessions.
    • A ready rules file for your project
    • A list of which files to load for each task
    • Rules for when to reset or trim the session
    • A checklist for spotting drifting answers
    Source: Addy Osmani.

Tasks you can use it for

  • 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.

Limits to check before starting

  • 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.

Best way to use this role

Give it one clear outcome, the actual files and a definition of done. Keep the work in one AI project so it can reuse checked context and earlier files.

  • 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.

Read it as data

Read the complete role setup as JSON. Connect your AI to the AI Blocks MCP library and read aiblocks://roles/engineering-autonomous-optimization-architect for its role instructions and pinned sources.

This is a prepared AI role. No task has run. Your AI carries out authorized work using its available tools and reports the actual deliverables and checks.