More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Self-Tuning Controls

    1

    A production-ready registry for safe agent self-tuning, budget enforcement, and role-based parameter access.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Self-Tuning Controls

    Self-Tuning Controls

    Example session with this skill installed

    Set up a controls registry for my agent with the self-tuning-controls skill: a planner model pool (claude-sonnet-4-5=3, claude-haiku-4-5=1), daily_budget_usd=2.00 as operator-only, cycle_interval_minutes=30 shared between planner and accountant, and thinking_level=high as planner-only. Lock the model pool. Show me the prompt block the planner sees versus the accountant, then simulate the planner trying to set daily_budget_usd to 50 and cycle_interval_minutes to 5, and show the change log.

    • Read your context and instructions
    • Compiled the self-tuning controls

    The registry is built, exercised, and persisted. Script: registry_demo.py, which imports the skill's controls.py and saves controls.json alongside it.

    Registry contents

    ControlTypeDefaultAudienceLocked
    primary_model_weightsweightsclaude-sonnet-4-5=3,claude-haiku-4-5=1accountantyes
    thinking_levelstr (minimal/low/medium/high)highagentno
    daily_budget_usdfloat 0–10002.00operatorno
    cycle_interval_minutesint 1–144030bothno

    Planner prompt block (audience=agent):

    [LLM]
      thinking_level: high (choices: minimal, low, medium, high): Reasoning depth for the main planner
    
    [CADENCE]
      cycle_interval_minutes: 30 (1-1440) [shared]: Minutes between planner cycles when nothing wakes it early
    

    Accountant prompt block (audience=accountant):

    [LLM]
      [LOCKED] primary_model_weights: claude-sonnet-4-5=3,claude-haiku-4-5=1 (models: claude-sonnet-4-5, claude-haiku-4-5): Weighted pool for the main planner (operator-locked)
    
    [CADENCE]
      cycle_interval_minutes: 30 (1-1440) [shared]: Minutes between planner cycles when nothing wakes it early
    

    The budget cap appears in neither block, since operator controls are hidden from every model. The pool is visible to the accountant but marked locked, so it can reason about it without being able to move it. The planner never sees the pool at all.

    Simulated planner update of daily_budget_usd=50 and cycle_interval_minutes=5:

    daily_budget_usd: blocked  (now 2.0)
    cycle_interval_minutes: ok  (now 5)
    

    Change log after the update:

    2026-10-17T17:03:28Z [agent] cycle_interval_minutes: 30 -> 5
    

    The blocked write leaves no log entry, since nothing changed. The apply result dict is what you feed back to the planner so it learns the budget is not its to touch.

    Next step. The saved controls.json now holds the interval at 5, so a rerun loads that value. In production the accountant is the one to pull the interval back toward 30 if the five-minute cadence projects over the cap; wire that with the skill's accountant.py (Lever order + ratio_rule coherence checks) on a local model.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Letting an agent adjust its own parameters is the most efficient path to self-improvement, but often leads to uncontrolled cost blowouts or unstable behaviors. This skill provides a production-hardened controls registry that allows agents to tune their runtime safely. It enforces strict boundaries, typed validation, and role-based permissions to ensure the agent only modifies what it should.

    What it does

    • Typed Controls provides a registry for float, int, str, bool, and model-weight types with strict min/max bounds and validation.
    • Role-Based Access separates tunables by audience (agent, accountant, operator) to hide sensitive budget or safety knobs from the planner.
    • Temporary Overrides manages experimental changes that automatically revert after a specified number of cycles.
    • Budget Ledger tracks real-time spend across different models, including specific pricing for cached tokens.
    • Accountant Model uses a cheap secondary model to enforce coherence rules and cost cadence without jittering parameters.
    • Change Provenance maintains a detailed log of who moved which knob and why for auditing and debugging.

    How it works

    1. Initialize Registry by defining controls with audiences, bounds, and default values in a Python script.
    2. Inject Context into each agent cycle by rendering the permitted control blocks directly into the system prompt.
    3. Handle Updates by processing the agent's requested changes through validation and permission checks.
    4. Run Accountant as a pre-cycle step to enforce budget-related levers and snap controls to coherent ratios.

    Frameworks & tools

    This tool is provider-neutral and written in pure Python 3.9+ using only the standard library. It integrates with any LLM provider (OpenAI, Anthropic, Ollama) via simple tool-wiring patterns.

    Why this beats prompting it yourself

    Prompting an agent to "stay under budget" is unreliable and prone to drift. This skill provides hard constraints, persistence, and a secondary "accountant" logic layer that protects your infrastructure even if the main planner malfunctions.

    Use cases

    • Dynamic Cadence for agents that need to increase or decrease interaction frequency based on task urgency.
    • Model Pool Routing to swap between expensive and cheap models based on current budget remaining and task complexity.
    • Self-Optimizing Memory where the agent tunes its own context window and retrieval depth parameters.
    • Runtime Experiments to test new parameters for a fixed duration before reverting to safe defaults.

    Known limitations

    This logic is designed for cycle-based agents and requires external persistence (like a JSON file) between cycles. It does not include built-in model API clients.

    Requires manual persistence of state between agent cycles. Does not include model API clients or pre-configured provider pricing. Optimized for cycle-based rather than streaming-only workflows.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 28 days ago

    Requires

    Python 3.9+
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    *_controls.json
    budget.json

    Runs Python scripts locally. Persists the control registry and the optional budget ledger to JSON files at caller-supplied paths. No network calls; the accountant's model call goes through the chat function you pass in.

    Listed28 days ago

    What's inside

    Frequently Asked Questions

    This skill acts as a safety layer that prevents agents from causing cost overruns or unstable behaviors by enforcing strict bounds, budget ledgers, and role-based permissions on all self-tuning actions.

    Yes, it is provider-neutral and written in pure Python 3.9+, making it compatible with any LLM (like OpenAI or Anthropic) and any agentic framework that supports tool-wiring.

    Four standard-library Python modules: controls.py (the typed, bounded ControlRegistry with audiences, locks, change log, temporary overrides, per-audience prompt blocks and tool specs), budget.py (the DailyBudget ledger with cached-token pricing and same-day restore), accountant.py (levers, coherence rules and the cheap-model Accountant loop with its oscillation guard) and example_registry.py (twenty starter controls with audiences assigned, meant to be edited). Plus an 11-test offline suite and three reference docs: the design notes and failure modes, the full accountant prompt, and tool wiring for Anthropic, OpenAI and Gemini.

    Setting up involves defining your controls (such as min/max bounds and default values) in a Python script and connecting your preferred persistence layer, like a JSON file or database.

    The accountant is a second, cheap or local model that runs every cycle before the planner and owns the cost and cadence controls (sentry interval, wake target, model pools). It sees the budget ledger and a cost projection, proposes changes along a conservation-ordered list of levers, and its changes pass an oscillation guard (moves under 10 percent are dropped) and coherence rules that snap related controls into valid ratios. The planner never sees those knobs; its own requests are validated by the registry, not by the accountant.

    The skill includes a 'Temporary Overrides' feature that allows agents to test new parameters for a set number of cycles, after which the system automatically reverts to your safe default settings.

    New in Agents & Orchestration