lagent


Namelagent JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/InternLM/lagent
SummaryA lightweight framework for building LLM-based agents
upload_time2024-02-26 03:09:07
maintainer
docs_urlNone
author
requires_python
licenseApache 2.0
keywords artificial general intelligence agent agi llm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div id="top"></div>
<div align="center">
  <img src="docs/imgs/lagent_logo.png" width="450"/>

[![docs](https://img.shields.io/badge/docs-latest-blue)](https://lagent.readthedocs.io/en/latest/)
[![PyPI](https://img.shields.io/pypi/v/lagent)](https://pypi.org/project/lagent)
[![license](https://img.shields.io/github/license/InternLM/lagent.svg)](https://github.com/InternLM/lagent/tree/main/LICENSE)
[![issue resolution](https://img.shields.io/github/issues-closed-raw/InternLM/lagent)](https://github.com/InternLM/lagent/issues)
[![open issues](https://img.shields.io/github/issues-raw/InternLM/lagent)](https://github.com/InternLM/lagent/issues)
![Visitors](https://api.visitorbadge.io/api/visitors?path=InternLM%2Flagent%20&countColor=%23263759&style=flat)
![GitHub forks](https://img.shields.io/github/forks/InternLM/lagent)
![GitHub Repo stars](https://img.shields.io/github/stars/InternLM/lagent)
![GitHub contributors](https://img.shields.io/github/contributors/InternLM/lagent)

English | [简体中文](README_zh-CN.md) | [日本語](README_ja_JP.md) | [हिंदी](README_in_HIN.md) | [বাংলা](README_in_beng.md) | [한국어](README_KR_Kr.md)

</div>

<p align="center">
    👋 join us on <a href="https://twitter.com/intern_lm" target="_blank">𝕏 (Twitter)</a>, <a href="https://discord.gg/xa29JuW87d" target="_blank">Discord</a> and <a href="https://r.vansin.top/?r=internwx" target="_blank">WeChat</a>
</p>

<div align="center">

https://github.com/InternLM/lagent/assets/24622904/3242f9bf-32d2-4907-8815-e16a75a4ac0e

</div>

## Getting Started

Please see the [overview](docs/en/get_started/overview.md) for the general introduction of Lagent. Meanwhile, we provide extremely simple code for quick start. You may refer to [examples](examples/) for more details.

### Installation

Install with pip (Recommended).

```bash
pip install lagent
```

### Run a Web Demo

You need to install Streamlit first.

```bash
# 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](https://github.com/InternLM/lagent/assets/24351120/cefc4145-2ad8-4f80-b88b-97c05d1b9d3e)

## 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

<p>
  <a href="">
    <img src="https://img.shields.io/badge/Python-007ACC?style=for-the-badge&logo=python&logoColor=yellow" alt="python" />
  </a>

### All Thanks To Our Contributors:

<a href="https://github.com/InternLM/lagent/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=InternLM/lagent" />
</a>

## Citation

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

```latex
@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](LICENSE).

<p align="right"><a href="#top">🔼 Back to top</a></p>



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/InternLM/lagent",
    "name": "lagent",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "artificial general intelligence,agent,agi,llm",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/51/53/e85b062c1ecdf5f116ccf6527359c9a82e3ab2c0e76a38ea9133306d8cca/lagent-0.2.2.tar.gz",
    "platform": null,
    "description": "<div id=\"top\"></div>\n<div align=\"center\">\n  <img src=\"docs/imgs/lagent_logo.png\" width=\"450\"/>\n\n[![docs](https://img.shields.io/badge/docs-latest-blue)](https://lagent.readthedocs.io/en/latest/)\n[![PyPI](https://img.shields.io/pypi/v/lagent)](https://pypi.org/project/lagent)\n[![license](https://img.shields.io/github/license/InternLM/lagent.svg)](https://github.com/InternLM/lagent/tree/main/LICENSE)\n[![issue resolution](https://img.shields.io/github/issues-closed-raw/InternLM/lagent)](https://github.com/InternLM/lagent/issues)\n[![open issues](https://img.shields.io/github/issues-raw/InternLM/lagent)](https://github.com/InternLM/lagent/issues)\n![Visitors](https://api.visitorbadge.io/api/visitors?path=InternLM%2Flagent%20&countColor=%23263759&style=flat)\n![GitHub forks](https://img.shields.io/github/forks/InternLM/lagent)\n![GitHub Repo stars](https://img.shields.io/github/stars/InternLM/lagent)\n![GitHub contributors](https://img.shields.io/github/contributors/InternLM/lagent)\n\nEnglish | [\u7b80\u4f53\u4e2d\u6587](README_zh-CN.md) | [\u65e5\u672c\u8a9e](README_ja_JP.md) | [\u0939\u093f\u0902\u0926\u0940](README_in_HIN.md) | [\u09ac\u09be\u0982\u09b2\u09be](README_in_beng.md) | [\ud55c\uad6d\uc5b4](README_KR_Kr.md)\n\n</div>\n\n<p align=\"center\">\n    \ud83d\udc4b join us on <a href=\"https://twitter.com/intern_lm\" target=\"_blank\">\ud835\udd4f (Twitter)</a>, <a href=\"https://discord.gg/xa29JuW87d\" target=\"_blank\">Discord</a> and <a href=\"https://r.vansin.top/?r=internwx\" target=\"_blank\">WeChat</a>\n</p>\n\n<div align=\"center\">\n\nhttps://github.com/InternLM/lagent/assets/24622904/3242f9bf-32d2-4907-8815-e16a75a4ac0e\n\n</div>\n\n## Getting Started\n\nPlease see the [overview](docs/en/get_started/overview.md) for the general introduction of Lagent. Meanwhile, we provide extremely simple code for quick start. You may refer to [examples](examples/) for more details.\n\n### Installation\n\nInstall with pip (Recommended).\n\n```bash\npip install lagent\n```\n\n### Run a Web Demo\n\nYou need to install Streamlit first.\n\n```bash\n# pip install streamlit\nstreamlit run examples/internlm2_agent_web_demo.py\n```\n\n## What's Lagent?\n\nLagent 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:\n\n![image](https://github.com/InternLM/lagent/assets/24351120/cefc4145-2ad8-4f80-b88b-97c05d1b9d3e)\n\n## Major Features\n\n- Stream Output: Provides the `stream_chat` interface for streaming output, allowing cool streaming demos right at your local setup.\n- Interfacing is unified, with a comprehensive design upgrade for enhanced extensibility, including:\n  - Model: Whether it's the OpenAI API, Transformers, or LMDeploy inference acceleration framework, you can seamlessly switch between models.\n  - Action: Simple inheritance and decoration allow you to create your own personal toolkit, adaptable to both InternLM and GPT.\n  - 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.\n- Documentation has been thoroughly upgraded with full API documentation coverage.\n\n## \ud83d\udcbbTech Stack\n\n<p>\n  <a href=\"\">\n    <img src=\"https://img.shields.io/badge/Python-007ACC?style=for-the-badge&logo=python&logoColor=yellow\" alt=\"python\" />\n  </a>\n\n### All Thanks To Our Contributors:\n\n<a href=\"https://github.com/InternLM/lagent/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=InternLM/lagent\" />\n</a>\n\n## Citation\n\nIf you find this project useful in your research, please consider cite:\n\n```latex\n@misc{lagent2023,\n    title={{Lagent: InternLM} a lightweight open-source framework that allows users to efficiently build large language model(LLM)-based agents},\n    author={Lagent Developer Team},\n    howpublished = {\\url{https://github.com/InternLM/lagent}},\n    year={2023}\n}\n```\n\n## License\n\nThis project is released under the [Apache 2.0 license](LICENSE).\n\n<p align=\"right\"><a href=\"#top\">\ud83d\udd3c Back to top</a></p>\n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A lightweight framework for building LLM-based agents",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/InternLM/lagent"
    },
    "split_keywords": [
        "artificial general intelligence",
        "agent",
        "agi",
        "llm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e424eff9542944d455af33eef393af81345bd3e0c78bf59c383eabbecbdeadbc",
                "md5": "0d3ef00b8fc71e6cddf8195590718136",
                "sha256": "633b08e7998196ac07a727b4e902cc42064f7bc4a67a043f000e1f71f4a67974"
            },
            "downloads": -1,
            "filename": "lagent-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0d3ef00b8fc71e6cddf8195590718136",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 69724,
            "upload_time": "2024-02-26T03:09:04",
            "upload_time_iso_8601": "2024-02-26T03:09:04.807466Z",
            "url": "https://files.pythonhosted.org/packages/e4/24/eff9542944d455af33eef393af81345bd3e0c78bf59c383eabbecbdeadbc/lagent-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5153e85b062c1ecdf5f116ccf6527359c9a82e3ab2c0e76a38ea9133306d8cca",
                "md5": "9aa706faefab1b44c16a54352f857658",
                "sha256": "ea9d2aa0708745d0c84b8ac02a2327c92caf568533fcb2fe9048f87926393658"
            },
            "downloads": -1,
            "filename": "lagent-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "9aa706faefab1b44c16a54352f857658",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 50226,
            "upload_time": "2024-02-26T03:09:07",
            "upload_time_iso_8601": "2024-02-26T03:09:07.042640Z",
            "url": "https://files.pythonhosted.org/packages/51/53/e85b062c1ecdf5f116ccf6527359c9a82e3ab2c0e76a38ea9133306d8cca/lagent-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-26 03:09:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "InternLM",
    "github_project": "lagent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "lagent"
}
        
Elapsed time: 0.19558s