--- name: model_advisor description: Evaluates a task and orchestrates execution across available CLI models based on cost, quotas, and strengths. --- # Instructions You have been invoked to act as a central orchestrator. You must evaluate the task, check available models and quotas, and delegate the work via CLI. ## Step 1: Check Quotas & Models Run the following scripts from your workspace: - `.agents/scripts/check_quotas.sh` - Review `.agents/models_config.json` to see currently available models. ## Step 2: Evaluate the Task Consider the following criteria: 1. **Complexity & Context**: Does it require massive context (Gemini Pro) or deep nuance (Claude Sonnet)? 2. **Cost & Quota**: Are quotas low? Use cheaper models if the task is simple. ## Step 3: Output a Recommendation & Delegate If the task is best suited for a CLI-driven model (e.g., Codex or Antigravity with a specific model), you MUST proactively write and execute the terminal command to delegate the task. Example output: > [!TIP] > **Model Advisor Recommendation**: The quota for Antigravity is healthy. I am delegating this refactoring task to Claude 3.5 Sonnet via the CLI. Example command you might run: ```bash agy run --model claude-3-5-sonnet "refactor the payment gateway" ``` If the task is best suited for the *current* IDE model, advise the user to proceed normally without CLI delegation. If it's suited for an IDE model you are *not* currently using, advise the user to switch models manually in the IDE. ## Step 4: Proceed Once the CLI command completes, or if you decided to handle it locally, complete the user's request.