Langroid is an open-source Python framework for programming with large language models using a multi-agent architecture. Published on GitHub, it has collected about 4,119 stars and is under active development in 2026. Rather than treating an LLM application as a single prompt chain, Langroid lets you compose systems from collaborating agents, each with its own instructions, tools, and knowledge sources, coordinated through clean message-passing abstractions.
The framework is built around a few powerful ideas: agents as first-class objects, tasks that wrap agents with explicit interaction rules, and built-in support for function calling, retrieval-augmented generation, and structured outputs. It works with OpenAI models as well as local and open models, includes caching and streaming, and integrates popular vector stores for RAG. Because everything is plain Python, Langroid fits naturally into existing codebases and testing workflows, and its examples cover everything from chatbots and data extraction to multi-agent research and question answering over documents. The codebase emphasizes readable abstractions over magic, which keeps behavior predictable as systems grow.
Langroid is free and open source under the MIT license. You can install it from PyPI and use it in commercial projects at no cost; you only pay for the underlying LLM APIs or compute you choose to use.
Langroid is for Python developers and researchers who want a principled way to build multi-agent LLM applications — systems where several specialized agents cooperate — without giving up code clarity, testability, or control over how models are called.