Browse
Core Concepts
Reasoning
Memory & Retrieval
Agent Types
Design Patterns
Training & Alignment
Frameworks
Tools
Safety
Meta
Browse
Core Concepts
Reasoning
Memory & Retrieval
Agent Types
Design Patterns
Training & Alignment
Frameworks
Tools
Safety
Meta
Langroid is an open-source Python framework for building multi-agent LLM applications that treats agents as first-class citizens capable of collaborating through hierarchical task delegation and structured message passing.1).com/langroid/langroid|github.com/langroid/langroid]])) Created with a focus on developer ergonomics, Langroid provides a clean, code-driven abstraction where each agent wraps an LLM along with optional tools and vector stores.
Langroid's core design centers on two key abstractions:
Agents: First-class objects encapsulating LLM conversation state, memory (via vector stores), and tools. Each agent maintains its own context and can be specialized for particular tasks.
Tasks: Wrappers around agents that define specific instructions and enable hierarchical, recursive delegation. Tasks can spawn subtasks and delegate work to other agent-task pairs, forming collaborative workflows.
Key architectural features:
import langroid as lr from langroid.agent.tools.orchestration import DoneTool # Configure the LLM (works with [[openai|OpenAI]], [[anthropic|Anthropic]], local models) llm_config = lr.language_models.OpenAIGPTConfig( chat_model="[[openai|openai]]/gpt-4o", ) # Create a research agent with specific instructions researcher_config = lr.ChatAgentConfig( name="Researcher", llm=llm_config, system_message="You research topics and provide detailed factual summaries.", ) researcher = lr.ChatAgent(researcher_config) # Create a writer agent that refines research into polished text writer_config = lr.ChatAgentConfig( name="Writer", llm=llm_config, system_message="You take research notes and write clear, engaging prose.", ) writer = lr.ChatAgent(writer_config) # Wrap agents in Tasks for orchestration researcher_task = lr.Task(researcher, interactive=False) writer_task = lr.Task(writer, interactive=False) # The writer delegates research subtasks to the researcher writer_task.add_sub_task(researcher_task) # Run the pipeline: writer receives a goal and delegates as needed result = writer_task.run( "Write a brief overview of how HNSW graphs work for vector search." ) print(result)
Langroid excels in scenarios requiring fine-grained multi-agent collaboration:
| Feature | Langroid | CrewAI | AutoGen |
|---|---|---|---|
| Interface | Code-only (no GUI) | Orchestration-focused, integrable | Conversational agents |
| Focus | Custom multi-agent hierarchies | Production agent fleets | Research-oriented conversations |
| Customization | Full Python extensibility | Plugin marketplace, easier setup | Flexible conversation patterns |
| Best For | Developers/researchers needing fine control | Teams deploying agent workflows | Conversational multi-agent research |
| Vendor | Open-source community | CrewAI Inc. | Microsoft |
Choose Langroid when you need full control over agent hierarchies, task delegation logic, and integrations without a GUI layer. Choose CrewAI for production orchestration with monitoring, or AutoGen for conversational multi-agent patterns.