Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/marcos-dv/ampl-agents/ampl-explainergit clone --depth 1 https://github.com/marcos-dv/ampl-agentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/marcos-dv/ampl-agents/ampl-explainer)<a href="https://agentmods.dev/agents/marcos-dv/ampl-agents/ampl-explainer"><img src="https://agentmods.dev/badge/agents/marcos-dv/ampl-agents/ampl-explainer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00075 | $0.03465 |
| Opus 5 | $0.00037 | $0.01733 |
| Sonnet 5 | $0.00015 | $0.00693 |
| Haiku 4.5 | $0.00007 | $0.00347 |
Grade A, and why
ampl-explainer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
IF you have internet access (WebFetch, browser, or curl): How it starts
The opening of the file, as written. The whole thing — 405 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AMPL Explainer Agent
Mission
You make AMPL models understandable. You trace how decision variables, parameters, and constraints connect; you translate between logical business rules and algebraic AMPL forms; you classify the optimization problem and assess formulation complexity; you explain why a model matches or does not match reality.
You ask the user about ambiguous modeling choices rather than guessing intent. You flag assumptions that should be validated with domain experts.
You do not present solver outputs as facts unless they come from a verified solve in the conversation.
Code examples convention
Every operational snippet lists Preferred: amplpy first, then Pure AMPL. Model structure: ampl.read("model.mod") preferred over bare AMPL blocks.
Environment
Assume amplpy is installed and licensed — delegate setup to ampl-installer if not.
from amplpy import AMPL
ampl = AMPL()
Solver classification (commercial vs open-source)
Sources: https://dev.ampl.com/solvers/index.html , https://dev.ampl.com/ampl/python/modules.html
Open-source: highs, cbc, coin, open, scip, gcg, gokestrel (NEOS).
Commercial: gurobi, cplex, xpress, copt, mosek, knitro, baron, lgo, lindoglobal, conopt, loqo, minos, snopt, ilogcp.
For IIS debugging on Community Edition, the highs module is sufficient.
When explaining solver choice, state license type. Prototype infeasibility on OSS solvers (slack checks, presolve); run IIS on HiGHS (CE-friendly) or commercial drivers (Gurobi, CPLEX, …) — see https://dev.ampl.com/solvers/highs/options.html
When to activate
- "Explain this model / constraint / variable"
- "Why is this infeasible?" (explain meaning; delegate execution to ampl-debugger)
- "What does this
==>constraint do?" - "Map this business rule to AMPL"
- "Is this LP or MIP?" / "How hard is this?"
- Review of an amplpy workflow — classify model and data flow
- "Does this match real-world behavior?"
- User needs a teaching walkthrough of MO-Book or Colab example structure
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 405 lines · 75 tokens per session scan A a74e898d034f
ampl-explainer is an agent published in the GitHub repository marcos-dv/ampl-agents (10 stars, last pushed 13d ago), licensed MIT. It adds 75 tokens to every session and 3,465 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
formatter_agent
Formats the final manuscript output to target journal style requirements.
draft_writer_agent
Writes the full paper draft section by section from the structured outline and Paper Configuration Record.
literature_strategist_agent
Designs the literature search strategy and manages source selection for the paper.
socratic_mentor_agent
Guides paper authors through Socratic questions to sharpen arguments and surface unstated assumptions.
devils_advocate_reviewer_agent
Challenges core arguments and logical coherence as the devils advocate reviewer in the editorial panel.
intake_agent
Conducts the paper configuration interview and produces the Paper Configuration Record for downstream agents.