Favicon of Langroid

Langroid

A Python AI agent framework coordinates tasks, retrieves documents with citations, and supports local models through Ollama or remote model APIs under MIT.

Screenshot of Langroid website

Langroid is a Python framework for developers building applications where AI agents divide up a task. Each agent can maintain its own conversation and use documents or tools, then delegate work to other agents.

  • Agent collaboration: Combine reusable agents with separate responsibilities into workflows that exchange messages and delegate subtasks.
  • Document answers: Retrieve relevant document passages and cite the excerpts supporting an answer, with Qdrant, Chroma, LanceDB, or Milvus as the vector store.
  • Tools and structured results: Agents can extract structured information, work with SQL, and call tools through OpenAI function calling, Langroid's native tool interface, or MCP servers.
  • Tracing: Logs retain the origin of messages so developers can inspect how agents reached a result; Redis caches prompts and responses by default.

Langroid supports local LLM servers such as Ollama and oobabooga, plus remote providers through LiteLLM and OpenAI APIs. Local servers run model inference on your hardware; remote APIs send model requests to the selected provider. A Mistral example demonstrates document information extraction using only a local model.

It's open source under the MIT license and requires Python 3.11 or later. The framework doesn't depend on LangChain or another LLM framework.

Similar to Langroid