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

Metadata

Release files for xlagent 0.2.1

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

Source distribution (sdist)

Source distribution for xlagent 0.2.1
File Size Uploaded
xlagent-0.2.1.tar.gz 64.3 kB Details

Built distribution (wheel)

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

Total release size: 148.1 kB

Release files / xlagent-0.2.1.tar.gz

Download URL xlagent-0.2.1.tar.gz
Size 64.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f9f058328561fe388466b9b5705a45ef44f937a193a70231fa23fc3dc0d43405
BLAKE2b-256 checksum
How to use checksums
7312f25f9d8c2c87f802c015e945827231882286189a61707de8dae5a9fc02c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / xlagent-0.2.1-py3-none-any.whl

Download URL xlagent-0.2.1-py3-none-any.whl
Size 83.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f80e165f17abdc077b099b251bf17604ff2028290f13ec18c6d0c464656ef01
BLAKE2b-256 checksum
How to use checksums
79df7d050831c368b5d52580772587874cc727e9a1c80153fd5d298e8a525b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

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