⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

optim-agent

@optim-agent⭐ 801 stars

Use when the user wants to optimize configurable system parameters against a measurable scalar objective, especially for model training, inference, quantitative strategies, reinforcement learning, scientific workflows, or other expensive black-box evaluations where reading the project can improve trial selection.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐ 801 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

optim-agent lets Claude Code / Codex / OpenCode tune real system parameters by reading your code, proposing trials, and recording measured objective results. Use it when your system exposes configurable parameters and a measurable objective. It combines what each parameter means with what the trial history shows, then proposes the next configuration to evaluate. Objective evaluations remain authoritative: optim-agent proposes values, validates them against the declared space, records outcomes, and falls back to safe sampling when an agent reply is invalid.

ModelsSystemsResearch
Training, architecture, and RL experimentsInference, latency, cost, control, and decision rulesQuant signals, simulations, and scientific workflows

Why optim-agent

  • Semantic proposals - coding agents reason over parameter meanings, study context, and observed outcomes instead of treating every dimension as an anonymous coordinate.
  • Small-budget leverage - useful when evaluations are expensive and classical surrogates are still data-starved.
  • Agent CLI upside - proposal quality can improve as the underlying coding agents improve, such as moving from GPT-5.5 to GPT-5.6, without changing your optimization code.
  • Auditable decisions - JSON/SQLite studies retain configurations, outcomes, states, context, and optional agent rationale.
  • Bounded execution - the agent only proposes values; optim-agent validates them against the declared space, and invalid output falls back to safe sampling.

Install

Install the Codex skill:

$skill-installer install https://github.com/Optim-Agent/optim-agent

Install the Claude Code plugin:

claude plugin marketplace add Optim-Agent/optim-agent && claude plugin install optim-agent@optim-agent

Install the Python package:

# Stable release from PyPI
python -m pip install optim-agent

# Latest source from GitHub
python -m pip install "optim-agent @ git+https://github.com/Optim-Agent/optim-agent.git"

Requires one authenticated agent CLI on PATH: claude, codex, or opencode.

Quickstart

import optim_agent as oa

def objective(trial):
    threshold = trial.suggest_float(
        "threshold", 0.05, 0.95,
        context="decision threshold; higher values trade recall for precision",
    )
    budget = trial.suggest_int(
        "budget", 10, 200, log=True,
        context="compute or operating budget; larger values may improve quality",
    )
    return evaluate_system(threshold=threshold, budget=budget)  # domain code

study = oa.create_study(
    direction="maximize",
    sampler=oa.AgentSampler(
        backend="claude",  # or "codex" / "opencode"
        effort="high",
        context="maximize system quality under a strict operating-cost budget",
        history=5,
        explicit_reasoning=True,
        qualitative_notes=True,
    ),
    storage="study.json",  # optional: persist and resume
    summarize=True,  # optional: agent-written result summary after the last trial
)
study.optimize(objective, n_trials=20)
print(study.best_value, study.best_params)
print(study.summary)  # the summary agent's narration of the finished study

Optional context gives domain meaning to the study and parameters. Provide it study-wide on AgentSampler(context=...), per parameter on suggest_*(..., context=...), or both.

Where It Applies

AreaParameters optim-agent can tuneExample objective
Model traininglearning rates, architectures, augmentation, regularizationvalidation quality, compute, robustness
Inference and servingquantization, batching, decoding, caching, routingquality, latency, throughput, cost
Quantitative researchsignal windows, thresholds, rebalance rules, risk controlswalk-forward return, drawdown, turnover
Reinforcement learning and decisionsobjective weights, exploration schedules, environment settings, policy thresholdsreturn, safety, sample efficiency
Scientific workflowssimulation inputs, solver settings, experimental controlsfit, error, runtime, resource use
Black-box systemsany bounded categorical, integer, or continuous configurationscalar objective score

For reinforcement learning, optim-agent tunes the system around the learning loop; it does not replace the policy-learning algorithm.

Optimization Trajectory

Agent optimization trajectory compared with TPE

This seed-0 Branin trace compares TPE and GPT-5.5 under the same 10-trial budget, with incumbent objective values after each trial. It is a trajectory illustration; aggregate benchmark results and reproduction commands follow.

Optimizing Math Functions without Context: Branin-2D and Ackley-5D

Hard-function agents receive no supplied task context: only generic x1...x5 parameter names, numeric bounds, and trial history. Runs use 10 trials over five seeds; Random and TPE are unchanged baselines.

Top-tier Agents

No-context top-tier hard-function benchmark

methodmean best Branin ↓mean best Ackley-5D ↓
Random5.00819.639
TPE11.39518.843
GPT-5.51.3263.960
Opus-4.80.3980.061
Sonnet-53.8500.143
Kimi-K32.0820.907
Minimax-M30.97

// HOW IT'S BUILT

KEY FILES

SKILL.mdREADME.md

// REPO STATS

801 stars