head to head · open source
PyRIT vs lean-ctx
PyRIT has 4,731 GitHub stars, 1,012 forks, 281 open issues and last shipped today. lean-ctx has 3,926 stars, 360 forks, 9 open issues and last shipped yesterday. PyRIT leads on adoption by 21% (4,731 vs 3,926 stars). PyRIT is written in Python under MIT; lean-ctx is written in Rust under Apache-2.0. PyRIT has attracted 21% as many forks as stars, lean-ctx 9%. PyRIT was the more recently maintained of the two, and both are self-hostable with no licence fee. The two share 1 topic tag (ai-security), so they are genuine substitutes rather than adjacent tools.
Two open source projects, one decision. Both are free and self-hostable — the differences are community size, license terms, language stack and release pace.
← all 20902 open source comparisons
Side by side
| PyRIT | lean-ctx | |
|---|---|---|
| GitHub stars | ★ 4.7K | ★ 3.9K |
| License | MIT | Apache-2.0 |
| Written in | Python | Rust |
| Last push | 2026-11-03 | 2026-11-02 |
| Forks | ⑂ 1.0K | ⑂ 360 |
| Self-hosting | Yes | Yes |
| Data ownership | Your server | Your server |
pick PyRIT if
- You weight community size — 4.7K stars and counting
- You want the MIT license terms
- Your stack matches Python
- You value the larger contributor base for long-term maintenance
pick lean-ctx if
- You want the lean-ctx feature set and don't need the biggest community
- You prefer the Apache-2.0 license terms
- Your stack matches Rust
- You evaluated both and lean-ctx fits your workflow better
About PyRIT
Python Risk Identification Tool for generative AI (PyRIT) The Python Risk Identification Tool for generative AI (PyRIT) is an open source framework built to empower security professionals and engineers to proactively identify risks in generative AI systems. Check out our website for more information about how to use, install, or contribute to PyRIT. Review our security policy to report vulnerabilities privately through the Microsoft Security Response Center. Visit our Discord server to chat with the team and community. Trademarks and Citations This project may contain trademarks or logos for projects, products…
read the full PyRIT overview →
About lean-ctx
██╗ ███████╗ █████╗ ███╗ ██╗ ██████╗████████╗██╗ ██╗ ██║ ██╔════╝██╔══██╗████╗ ██║ ██╔════╝╚══██╔══╝╚██╗██╔╝ ██║ █████╗ ███████║██╔██╗ ██║ ██║ ██║ ╚███╔╝ ██║ ██╔══╝ ██╔══██║██║╚██╗██║ ██║ ██║ ██╔██╗ ███████╗███████╗██║ ██║██║ ╚████║ ╚██████╗ ██║ ██╔╝ ██╗ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ LeanCTX Context Gateway for AI Systems. Control what your AI can see. LeanCTX sits between AI tools and the information they read. It selects task relevant context, applies supported access and content controls before delivery, and records the context operations and delivery evidence it can observe. Your…
read the full lean-ctx overview →
More in AI & Machine Learning
Related comparisons
More AI Security & Privacy projects
Compare either of these against the rest of the AI Security & Privacy field.
Frequently asked questions
Is PyRIT or lean-ctx more popular?
PyRIT has 4,731 GitHub stars and lean-ctx has 3,926. PyRIT has the larger community by that measure.
Are PyRIT and lean-ctx free?
Both are open source. PyRIT is licensed under MIT and lean-ctx under Apache-2.0. Neither carries a licence fee.
What is the difference between PyRIT and lean-ctx?
PyRIT is written in Python and lean-ctx in Rust. The practical differences are community size, licence terms, language stack and release cadence — all compared in the table above.
Which should I choose, PyRIT or lean-ctx?
Choose PyRIT if you want the larger community (4,731 stars) or its MIT licence terms. Choose lean-ctx if its feature set, stack or Apache-2.0 licence fits better. Both are self-hostable.