agentic-resource-aware-optimization
Skill4 starsChanged 5 months agoMITView on GitHub
Lets an agent dynamically monitor and manage compute, time, and money during operation — trading output quality against cost. A common design uses a Router Agent to classify request complexity (cheap model for simple, strong model for complex), a Critique Agent to refine routing, and fallback mechanisms for graceful degradation. Use under budget, latency, or hardware constraints.
In this repository21 other files it gives its agents.
- agentic-evaluation-monitoringSkill
- agentic-exception-handlingSkill
- agentic-exploration-discoverySkill
- agentic-goal-setting-monitoringSkill
- agentic-guardrails-safetySkill
- agentic-human-in-the-loopSkill
- agentic-inter-agent-communicationSkill
- agentic-knowledge-retrievalSkill
- agentic-learning-adaptationSkill
- agentic-mcpSkill
- agentic-memory-managementSkill
- agentic-multi-agentSkill
- agentic-parallelizationSkill
- agentic-pattern-selectorSkill
- agentic-planningSkill
- agentic-prioritizationSkill
- agentic-prompt-chainingSkill
- agentic-reasoning-techniquesSkill
- agentic-reflectionSkill
- agentic-routingSkill
- agentic-tool-useSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
No visibility into cost per task
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Resource-Aware Optimization
Agentic Design Pattern 16 of 21 — distilled from Antonio Gulli, Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems (Ch. 16).
What it is. Tier work to the cheapest sufficient resource: classify request complexity and route to a fast/cheap or powerful/expensive model accordingly, prune or summarize context, enforce budgets, and fall back gracefully when a model is throttled or unavailable.
Reach for this when
- Operating under financial budgets for API/compute
- Latency-sensitive applications needing fast responses
- Deploying on resource-constrained hardware (edge, limited battery)
- Balancing response quality against operational cost across varied task complexity
Don't reach for this when
- Prototype or low-volume usage
- Optimizing before correctness is established
- The savings are negligible relative to the added complexity
Shape of the solution
Use a Router Agent to classify incoming complexity and direct simple queries to a fast cheap model and hard ones to a powerful model; add a Critique Agent to evaluate quality and improve routing over time. Apply contextual pruning/summarization, set budgets, and define fallback to a default model for graceful degradation under throttling.
Common failure modes
- Premature optimization before it works
- Cache or routing staleness
- Quality regressions from cheaper models
- No visibility into cost per task
Composes with
agentic-routing— the complexity-based router at its coreagentic-evaluation-monitoring— guard quality while cutting costagentic-memory-management— context pruning/summarizationagentic-exception-handling— fallback on throttling
Selection signals live in this skill's description (used for auto-triggering). To choose among all 21 patterns, see agentic-pattern-selector. Conceptual source: Antonio Gulli, Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems, Ch. 16 — original distillation from the text, not reproduced prose, code, or figures.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

