ML Intern is an AI software agent that researches machine-learning topics, writes code, trains models, and ships models using the Hugging Face ecosystem. It is for ML engineers and developers who want an agent to work with papers, documentation, datasets, and hosted or locally served models.
Borrowing it
Nothing to install: this file belongs to huggingface/ml-intern. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/huggingface/ml-intern/main/AGENTS.mdgit clone --depth 1 https://github.com/huggingface/ml-internWrote 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/instructions/huggingface/ml-intern/agents-md)<a href="https://agentmods.dev/instructions/huggingface/ml-intern/agents-md"><img src="https://agentmods.dev/badge/instructions/huggingface/ml-intern/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/huggingface/ml-intern/agents-md"><img src="https://agentmods.dev/badge/instructions/huggingface/ml-intern/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.01040 | $0.01040 |
| Opus 5.5 | $0.00416 | $0.00416 |
| Sonnet 5.5 | $0.00208 | $0.00208 |
| Haiku 4.5 | $0.00104 | $0.00104 |
Grade A, and why
ml-intern AGENTS.md 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 1mo 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.
- Backend health check: `curl -g http://[::1]:7860/api` How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Notes
Local Dev Servers
- Frontend: from
frontend/, runnpm ciif dependencies are missing, thennpm run dev. - Backend (full/rollback): from
backend/, runuv run uvicorn main:app --host ::1 --port 7860. - Hosted Space:
backend/start.shrunsretired_main:app, which serves only the retirement page andGET /api. - Frontend URL: http://localhost:5173/
- Backend health check:
curl -g http://[::1]:7860/api - Frontend proxy health check:
curl http://localhost:5173/api
Notes:
- Vite proxies
/apiand/authtohttp://localhost:7860. - If
127.0.0.1:7860is already owned by another local process, binding the backend to::1lets the Vite proxy resolvelocalhostcleanly. - Prefer
npm ciovernpm installfor setup, sincenpm installmay rewritefrontend/package-lock.jsonmetadata depending on npm version. - Non-local LLM calls use
https://router.huggingface.co/v1with the active Hugging Face user's token. Web sessions and the CLI default to GLM 5.2. For local development, setHF_TOKENand optionallyML_INTERN_DEFAULT_MODEL_ID. - When asked to start the local server, export the GitHub CLI token first with
export GITHUB_TOKEN="$(gh auth token)". - When debugging a web app issue tied to a session ID, inspect the session data in
smolagents/ml-intern-sessionsfor additional context.
Development Checks
- Before every commit, run
uv run ruff check .anduv run ruff format --check .. - If formatting fails, run
uv run ruff format ., then re-run the Ruff checks before committing.
Git Workflow
- Before creating any new branch or worktree, switch to
mainand pull the latest changes.
GitHub CLI
- Always use the
ghCLI for GitHub operations such as opening, editing, inspecting, or commenting on PRs and issues. - For multiline PR descriptions, prefer
gh pr edit <number> --body-file <file>over inline--bodyso shell quoting,$env-var names, backticks, and newlines are preserved correctly. - If
ghreports an invalid token or auth failure, retry the command withGH_TOKENandGITHUB_TOKENunset, for exampleenv -u GH_TOKEN -u GITHUB_TOKEN gh pr create ..., soghcan use the stored login token instead of a stale environment token. - In Codex, sandboxed
ghauth checks can report a valid keyring login as invalid when GitHub network access is restricted. Before telling the user to re-authenticate, retry with both env tokens unset and GitHub network access enabled.
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.
- 1mo ago Changed · +1 lines · +33 tokens per session 60ab65c13f94
- 2mo ago First seen · 58 lines · 1,007 tokens per session scan A 2252def186a8
ml-intern AGENTS.md is an instructions file published in the GitHub repository huggingface/ml-intern (10,788 stars, last pushed 15d ago), licensed Apache-2.0. It adds 1,040 tokens to every session, about $0.0042 per session on Opus 5.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-30.
ml-intern AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ml-intern AGENTS.mdhuggingface/ml-intern | Instructions file | 11k | 15d ago | Apache-2.0 | A | 1,040 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |