# InternLM/lagent

A lightweight framework for building LLM-based agents

Repository: https://github.com/InternLM/lagent
Canonical: https://ross.abutalabs.com/products/lagent
Language: Python
License: Apache-2.0
License Family: permissive
Topics: agent, gpt, llm, transformers
Last push: 2026-08-03T07:18:16+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 72, longevity 79
- inputs: {"age_days": 1109, "days_push": 30, "days_rel": 106, "gap_med": 59.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2278, forks 240 (observed 2026-08-28T04:06:33.699034+00:00)

## What it is
Lagent is a lightweight Python framework for building LLM-based agents, designed with a PyTorch-like philosophy where agents are composed like neural network layers with message passing. It supports single and multi-agent workflows, memory management, hooks, and integration with local LLM serving backends like vLLM.

## Use cases
- build llm agents in python
- create multi-agent applications
- build an agent framework on top of local llms
- add memory and hooks to llm agents
- prototype agentic workflows with open-source models
- connect vllm-served models to an agent pipeline

## When to choose
- you want a lightweight, code-first agent framework in Python
- you prefer a PyTorch-style compositional API for agents
- you need multi-agent communication with explicit message passing
- you run open-source models locally with vLLM or transformers

## When to avoid
- you need a batteries-included agent platform with a visual UI
- you only want hosted-API agents with minimal code
- you need a production orchestration system with built-in observability

## Facets
- artifact type: framework
- maturity: active
- function: agent-framework, llm-inference, prompt-engineering
- domain: artificial-intelligence, large-language-models, developer-tools
- platform: python, cross-platform
- tags: multi-agent, llm-agents, pytorch-inspired, agent-memory, tool-calling, ai-agents

## Member repositories
- InternLM/lagent (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:33.699034+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:41:24.219473+00:00, confidence not recorded.
  - readme: https://github.com/InternLM/lagent (fetched 2026-08-28T04:06:33.699034+00:00, sha 0dc9457eae26)
  - registry_pypi: https://pypi.org/pypi/lagent/json (fetched 2026-08-29T10:21:43.395364+00:00, sha c5cbd064fdfa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
