# LM Format Enforcer — card for AI agents

Forces LLM output to follow a JSON Schema or regex.

Category: Prompts, structured output and evals · PyPI package `lm-format-enforcer` · latest version 0.11.3 (checked 2026-11-01)
Install: `pip install lm-format-enforcer`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 44.0 (#2667 of all tools, 41 of 78 in its category)
- Downloads last week: 711,429 (as of 2026-11-24), +6.9% over 4 weeks
- GitHub stars: 2,041 (as of 2026-11-24)
- Last push: 2026-04-04

## Often used with
NumPy 100.0%, Pillow 100.0%, aiohttp 97.1%, AnyIO 97.1%, attrs 97.1%, charset-normalizer 97.1%

## Checked alternatives (same job)
- Instructor: https://agentgid.com/tools/instructor/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/lm-format-enforcer/
- Homepage: https://github.com/noamgat/lm-format-enforcer
- Repository: https://github.com/noamgat/lm-format-enforcer

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
