Favicon of Langroid

Langroid

An open-source Python AI agent framework under MIT, with Ollama support, document retrieval, and collaboration between agents using local or cloud models.

Screenshot of Langroid website

Langroid is a Python framework for developers building applications where several AI agents share a task. Each agent can keep its own conversation, use tools, and retrieve documents, while delegating work to other agents. It's open source under the MIT license.

You can run its agents with a local LLM through Ollama or oobabooga, or connect them to OpenAI and other remote providers through LiteLLM. Local model servers handle inference on your hardware; remote APIs send model requests to the chosen provider. A documented Mistral example extracts structured information from documents using only a local model.

Its main distinction is the way it organizes work around reusable agents and tasks. Developers can give agents separate responsibilities and combine them into larger workflows. The architecture draws on the Actor Framework and doesn't depend on LangChain or another LLM framework.

Document question answering includes retrieval and citations to supporting excerpts. Supported vector stores include Qdrant, Chroma, LanceDB, and Milvus. Dedicated agents cover document chat and SQL, alongside structured information extraction.

Agents can call OpenAI functions, use Langroid's own tool interface with other models, or access MCP server tools. Pydantic validates tool inputs and lets the model correct malformed responses. Langroid also caches prompts and responses with Redis and records agent interactions with message provenance, so developers can trace where an answer came from.

Similar to Langroid