mistral-managed-queue AGENTS.md

Repository-specific instructions for a Python MCP server and command-line tool that queues Mistral API requests in SQLite. Rate limiting means it deliberately spaces requests to comply with service limits.

In plain words
What is it for?
Use them when working on the queue database, Mistral API wrapper, worker commands, configuration, or tests. They document commands for submitting, fetching, processing, watching, and purging tasks.
Why use it?
They explain the project structure and prevent changes that could break task claiming, retries, rate limits, or concurrent queue processing.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/utenadev/mistral-managed-queue/agents-md
Clone the repo
git clone --depth 1 https://github.com/utenadev/mistral-managed-queue

Made for: Codex, OpenCode.

Per session 2,121 This file is loaded in full into every session.
When invoked 2,121 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.02121 $0.02121
Opus 5 $0.01060 $0.01060
Sonnet 5 $0.00424 $0.00424
Haiku 4.5 $0.00212 $0.00212

Measured 2d ago against content hash e8c28ff86c3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

mistral-managed-queue AGENTS.md scanned grade B 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 2d 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

| `MMQ_FAKE_RESPONSE` | — | Fixed fake response text (else echo prompt) |
AGENTS.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Project

mistral-managed-queue — Python MCP server + CLI that queues Mistral API calls with rate limiting (free-tier ~1 req/30s) via SQLite (WAL mode). Package layout under mmq/. Console script: mmq (mmq.cli:main).

Architecture

  • mmq/config.py — all constants + env-var defaults (wait times, model, DB timeouts).
  • mmq/db.py — SQLite layer: init_db, task lifecycle (register_task, claim_task, claim_next_task, get_task, touch_task, update_task_status), rate-limit gate (wait_for_rate_limit), purge_tasks, read_queue_status. Task claiming uses SQLite UPDATE ... RETURNING (needs SQLite >= 3.35).
  • mmq/core.py — Mistral wrapper (call_mistral_api with retries + shared gate), FakeMistralClient (offline e2e), queue execution:
    • execute_mistral_queue_async(req) — self-serve path (MCP): registers its own task and claims only its own (avoids cross-claim deadlock; see tests TestExecuteQueueConcurrent).
    • execute_next_task_async / drain_queue_async / watch_queue_async — the mmq work worker, which claims pending tasks by priority (DESC) then FIFO.
  • mmq/cli.py — subcommands: ask, fetch, work, purge, catalog fetch, mcp, --mcp.
  • mmq/mcp_server.py — FastMCP server; tools ask_mistral, get_queue_status.
  • mmq/README_MCP.md — MCP host setup (opt-in; ja/fr siblings alongside).
  • mmq/catalog/ — ORR-compatible catalog fetch/validate/write (fetch.py, validate.py, write.py, types.py). write_catalog_yaml(path, document) (order matters). Feature docs: mmq/catalog/README.md (ja/fr siblings).
  • mmq/__init__.py__version__ + re-exports. Version is kept in sync with pyproject.toml (currently 0.2.2).

Key Concepts

  • Rate gate: single shared row in SQLite; every API attempt (first included) waits on it, so all processes/CLI/MCP are uniformly throttled. 429s raise the shared backoff.
  • Self-serve vs worker: MCP ask_mistral processes its own request inline. mmq fetch only enqueues; mmq work (worker mode) drains the queue by priority.
  • Fake API: MMQ_FAKE_API=1 uses FakeMistralClient (echoes prompt unless MMQ_FAKE_RESPONSE set). MMQ_FAKE_FAIL=429|error simulates failures.

Read the full file on GitHub · 140 lines

Changes

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.

  1. 2d ago First seen · 140 lines · 2,121 tokens per session scan B e8c28ff86c3a

Subscribe to this mod's changes

mistral-managed-queue AGENTS.md is an instructions file published in the GitHub repository utenadev/mistral-managed-queue (0 stars, last pushed 6d ago), licensed MIT. It adds 2,121 tokens to every session, about $0.0106 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens