Skip to main content

👋 join us on 𝕏 (Twitter), Discord and WeChat

Getting Started

Please see the overview for the general introduction of Lagent. Meanwhile, we provide extremely simple code for quick start. You may refer to examples for more details.

Installation

Install with pip (Recommended).

pip install lagent

Run a Web Demo

You need to install Streamlit first.

# pip install streamlit
streamlit run examples/internlm2_agent_web_demo.py

What's Lagent?

Lagent is a lightweight open-source framework that allows users to efficiently build large language model(LLM)-based agents. It also provides some typical tools to augment LLM. The overview of our framework is shown below:

image

Major Features

  • Stream Output: Provides the stream_chat interface for streaming output, allowing cool streaming demos right at your local setup.
  • Interfacing is unified, with a comprehensive design upgrade for enhanced extensibility, including:
    • Model: Whether it's the OpenAI API, Transformers, or LMDeploy inference acceleration framework, you can seamlessly switch between models.
    • Action: Simple inheritance and decoration allow you to create your own personal toolkit, adaptable to both InternLM and GPT.
    • Agent: Consistent with the Model's input interface, the transformation from model to intelligent agent only takes one step, facilitating the exploration and implementation of various agents.
  • Documentation has been thoroughly upgraded with full API documentation coverage.

💻Tech Stack

python

All Thanks To Our Contributors:

Citation

If you find this project useful in your research, please consider cite:

@misc{lagent2023,
    title={{Lagent: InternLM} a lightweight open-source framework that allows users to efficiently build large language model(LLM)-based agents},
    author={Lagent Developer Team},
    howpublished = {\url{https://github.com/InternLM/lagent}},
    year={2023}
}

License

This project is released under the Apache 2.0 license.

🔼 Back to top

Release files for lagent 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lagent 0.2.4
File Size Uploaded
lagent-0.2.4.tar.gz 60.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lagent 0.2.4
File Interpreter ABI Platform
lagent-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 146.5 kB

Release files / lagent-0.2.4.tar.gz

Download URL lagent-0.2.4.tar.gz
Size 60.9 kB
Tags Source
SHA-256 checksum
How to use checksums
788bbbedcfaa902e6f7cbb2b8df9f330812d66a34c12175d410b1fa7705df6c0
BLAKE2b-256 checksum
How to use checksums
46c77b29bbdce40e6db55c0a55bc607841a6c6e9f8561f6c6290f0a25d4422aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release files / lagent-0.2.4-py3-none-any.whl

Download URL lagent-0.2.4-py3-none-any.whl
Size 85.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0072b27b4d0aca950e15e1671c3068a258d627ca0c63e8f1049dc0957ef8df0e
BLAKE2b-256 checksum
How to use checksums
b719c67d38acb3bf8d23291527c9d67e3ac50e59038345093c74cbea90360a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page