Optim Agent logo

Optim Agent

Community
Optim-Agent
optim-agent

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.

Overview

PublisherOptim-Agent
Repositoryoptim-agent
Skill nameoptim-agent
Stars
801
Forks
43
Bundled files
238
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 238 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Optim-Agent on GitHub. Read the source before you install it.

Installation

Install the Optim Agent AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Optim-Agent/optim-agent/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Optim-Agent/optim-agent.git \
  .claude/skills/optim-agent
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Optim Agent in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Optim Agent on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Optim Agent is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

optim-agent

Act as the sampler inside any coding-agent session: Claude Code, Codex, OpenCode/OpenClaw, or another agent that can read project files and run shell commands. Read the project to understand parameter meaning and interactions, propose one configuration, run the real evaluator, and record the result through optim-agent's ask/tell API. Let the measured objective, not the agent's intuition, decide what works.

Load the workflow

Use this file as the operating guide for the active coding agent. In Codex, it can be installed directly from GitHub:

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

In Claude Code, OpenCode/OpenClaw, or another coding-agent environment, place this repository or SKILL.md in the agent-visible workspace and ask the agent to follow the optim-agent workflow. The workflow does not depend on Codex-only APIs; it needs file access, shell access, and Python.

Ensure the Python package is importable. Choose one source; do not install both:

bash
# 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"

For a reproducible GitHub install, append @<tag-or-commit> after .git.

Workflow

  1. Understand the system. Read the evaluation entry point and every file that defines the target parameters. Record each parameter's type, legal range, semantics, interactions, and operational constraints.

  2. Define the experiment. Confirm the scalar objective, minimize or maximize, trial budget, evaluation command, runtime/cost limit, and fixed workload or seed. For multiple metrics or hard constraints, agree on one scalar feasibility or penalty rule before running trials.

  3. Establish a baseline. Evaluate the current/default configuration with the same command and environment used for every later trial.

  4. Initialize or resume. Keep artifacts in the repository's ignored .optim-agent-runs/ directory:

    bash
    if git rev-parse --git-dir >/dev/null 2>&1 && ! git check-ignore -q .optim-agent-runs/; then
      printf '/.optim-agent-runs/\n' >> "$(git rev-parse --git-path info/exclude)"
    fi
    python
    from pathlib import Path
    import optim_agent as oa
    
    run_dir = Path(".optim-agent-runs")
    run_dir.mkdir(exist_ok=True)
    study = oa.create_study(
        direction="minimize",
        storage=run_dir / "skill-study.json",
        seed=0,
    )
    print([(t.params, t.value, t.state) for t in study.trials])
  5. Run one informed trial. Choose parameters from code understanding and all completed history, then use explicit ask/tell:

    python
    params = {"threshold": 0.72, "budget": 80}
    trial = study.ask(params)
    try:
        value = evaluate_system(**trial.params)
    except Exception:
        study.tell(trial, state="failed")
        raise
    else:
        study.tell(trial, value)

    For a deliberately stopped trial, report the latest valid intermediate metric first, then call study.tell(trial, state="pruned").

  6. Select the next point. Avoid accidental repeats, explore broadly before exploiting, respect bounds and constraints, and treat failed regions as evidence. If the evaluator is noisy, repeat promising configurations under the same workload before declaring a winner.

  7. Stop and report. Stop at the approved budget or stopping condition. Report the baseline, best value and parameters, trial count, failed/pruned trials, convergence trend, and exact reproduction command.

Recovery

JSON storage records a trial when study.tell runs. Before launching an expensive external evaluation, save its parameters, command, and output path in a per-trial directory under .optim-agent-runs/. After interruption, inspect that output before rerunning: if a valid result exists, recreate the same point with study.ask(params) and record it; otherwise rerun it deliberately.

Use SQLite storage (skill-study.db) only when the user explicitly wants multiple processes. Sequential trials are the default because each proposal should use the complete prior history.

Rules

  • Use ask/tell in skill mode; do not delegate proposal selection to AgentSampler when the session agent is meant to read and reason over code.
  • Keep evaluation inputs and outputs isolated from production configuration.
  • Never fabricate, infer, or manually improve an objective value.
  • Record crashes as failed; record intentional early stops as pruned.
  • Preserve the study and trial artifacts so the result is auditable and resumable.
  • Do not tune secrets, credentials, or unbounded parameters.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 140 more files.

Frequently asked questions

What does the Optim Agent AI skill do?

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.

Why use Optim Agent on TypingMind?

Because you install it once and use it with any model. Optim Agent is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Optim Agent in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Optim-Agent/optim-agent/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Optim Agent?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Optim Agent?

As many as you like. As long as a model supports skills, you can use Optim Agent with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Optim Agent AI skill free?

Yes. It is published on GitHub by Optim-Agent under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇