Giter Club home page Giter Club logo

agentlego's Introduction

Open in OpenXLab docs PyPI license

English | 简体中文

Introduction

AgentLego is an open-source library of versatile tool APIs to extend and enhance large language model (LLM) based agents, with the following highlight features:

  • Rich set of tools for multimodal extensions of LLM agents including visual perception, image generation and editing, speech processing and visual-language reasoning, etc.
  • Flexible tool interface that allows users to easily extend custom tools with arbitrary types of arguments and outputs.
  • Easy integration with LLM-based agent frameworks like LangChain, Transformers Agents, Lagent.
  • Support tool serving and remote accessing, which is especially useful for tools with heavy ML models (e.g. ViT) or special environment requirements (e.g. GPU and CUDA).
AgentLego._720p.mp4

Quick Starts

Installation

Install the AgentLego package

pip install agentlego

Install tool-specific dependencies

Some tools requires extra packages, please check the readme file of the tool, and confirm all requirements are satisfied.

For example, if we want to use the ImageCaption tool. We need to check the Set up section of readme and install the requirements.

pip install -U openmim
mim install -U mmpretrain

Use tools directly

from agentlego import list_tools, load_tool

print(list_tools())  # list tools in AgentLego

image_caption_tool = load_tool('ImageCaption', device='cuda')
print(image_caption_tool.description)
image = './examples/demo.png'
caption = image_caption_tool(image)

Integrated into agent frameworks

Supported Tools

General ability

Speech related

Image-processing related

AIGC related

Licence

This project is released under the Apache 2.0 license. Users should also ensure compliance with the licenses governing the models used in this project.

agentlego's People

Contributors

mzr1996 avatar tau-j avatar ly015 avatar haochenye avatar zhouzaida avatar hhaandroid avatar yanyirong avatar tpoisonooo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.