Lagent is a lightweight open-source framework from the InternLM team for building LLM-based agents. With around 2,300 stars on GitHub and active development continuing into 2026, it provides the core building blocks — agents, memory, and action executors — needed to turn a language model into a system that can plan, use tools, and complete multi-step tasks.
Where many agent frameworks are heavy, Lagent is deliberately small and readable. It defines a clean agent abstraction with a memory module for conversation history, an action executor that runs tools, and support for popular reasoning patterns. Developers can plug in models served through Hugging Face Transformers or hosted APIs, then compose agents ranging from simple ReAct loops to multi-agent setups.
Lagent ships with example agents that demonstrate common patterns, including tool-using assistants that can run Python code, search the web, and chain actions together. Its modular design means each piece — the model wrapper, memory, and action set — can be swapped independently, which has made it a common teaching and research codebase in the InternLM ecosystem alongside projects like LMDeploy and InternChat.
Because it comes from the InternLM organization, Lagent pairs naturally with InternLM chat models, but nothing ties it to them — any model exposed through its LLM interface works. Developers typically start from the example agents, swap in their own tools, and grow the agent’s action set incrementally, which keeps the framework approachable for a first agent project.
Lagent is free and open source under the Apache-2.0 license. There is no hosted cloud tier or paid edition; any costs come from the LLM APIs you choose to connect.
Developers and researchers who want a small, hackable framework for prototyping LLM agents and studying agent architectures without a heavy platform.