Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 9 committers (11.1%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Enhance LLM agents with rich tool APIs
Basic Info
Statistics
- Stars: 397
- Watchers: 10
- Forks: 34
- Open Issues: 7
- Releases: 2
Topics
Metadata Files
README.md
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).
https://github-production-user-asset-6210df.s3.amazonaws.com/26739999/289006700-2140015c-b5e0-4102-bc54-9a1b4e3db9ec.mp4
Quick Starts
Installation
Install the AgentLego package
shell
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 ImageDescription tool. We need to check the Set up section of
readme and install the requirements.
bash
pip install -U openmim
mim install -U mmpretrain
Use tools directly
```Python from agentlego import listtools, loadtool
print(list_tools()) # list tools in AgentLego
imagecaptiontool = loadtool('ImageDescription', device='cuda') print(imagecaptiontool.description) image = './examples/demo.png' caption = imagecaption_tool(image) ```
Integrated into agent frameworks
Supported Tools
General ability
- Calculator: Calculate by Python interpreter.
- GoogleSearch: Search on Google.
Speech related
- TextToSpeech: Speak the input text into audio.
- SpeechToText: Transcribe an audio into text.
Image-processing related
- ImageDescription: Describe the input image.
- OCR: Recognize the text from a photo.
- VQA: Answer the question according to the image.
- HumanBodyPose: Estimate the pose or keypoints of human in an image.
- HumanFaceLandmark: Estimate the landmark or keypoints of human faces in an image.
- ImageToCanny: Extract the edge image from an image.
- ImageToDepth: Generate the depth image of an image.
- ImageToScribble: Generate a sketch scribble of an image.
- ObjectDetection: Detect all objects in the image.
- TextToBbox: Detect specific objects described by the given text in the image.
- Segment Anything series
- SegmentAnything: Segment all items in the image.
- SegmentObject: Segment the certain objects in the image according to the given object name.
AIGC related
- TextToImage: Generate an image from the input text.
- ImageExpansion: Expand the peripheral area of an image based on its content.
- ObjectRemove: Remove the certain objects in the image.
- ObjectReplace: Replace the certain objects in the image.
- ImageStylization: Modify an image according to the instructions.
- ControlNet series
- CannyTextToImage: Generate an image from a canny edge image and a description.
- DepthTextToImage: Generate an image from a depth image and a description.
- PoseToImage: Generate an image from a human pose image and a description.
- ScribbleTextToImage: Generate an image from a sketch scribble image and a description.
- ImageBind series
- AudioToImage: Generate an image according to audio.
- ThermalToImage: Generate an image according a thermal image.
- AudioImageToImage: Generate am image according to a audio and image.
- AudioTextToImage: Generate an image from a audio and text prompt.
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.
Owner
- Name: InternLM
- Login: InternLM
- Kind: organization
- Email: internlm@pjlab.org.cn
- Location: China
- Website: https://internlm.intern-ai.org.cn/
- Twitter: intern_lm
- Repositories: 16
- Profile: https://github.com/InternLM
Citation (CITATION.cff)
cff-version: 1.3.1 message: "If you use this software, please cite it as below." authors: - name: "AgentLego Contributors" title: "AgentLego: Open-source tool API library to extend and enhance LLM agents" date-released: 2023-12-31 url: "https://github.com/InternLM/agentlego" license: Apache-2.0
GitHub Events
Total
- Issues event: 1
- Watch event: 58
- Fork event: 7
Last Year
- Issues event: 1
- Watch event: 58
- Fork event: 7
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| mzr1996 | m****6@1****m | 67 |
| Yining Li | l****2@g****m | 12 |
| Mashiro | 5****E | 10 |
| zhouzaida | z****a@1****m | 10 |
| Tau | t****g@o****m | 9 |
| Haian Huang(深度眸) | h****n@s****m | 5 |
| YirongYan | y****g@s****n | 3 |
| fanqiNO1 | 7****1 | 2 |
| tpoisonooo | k****n@a****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 7
- Total pull requests: 65
- Average time to close issues: 2 days
- Average time to close pull requests: 7 days
- Total issue authors: 7
- Total pull request authors: 11
- Average comments per issue: 0.43
- Average comments per pull request: 0.35
- Merged pull requests: 60
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- uniyushu (1)
- Hank10032 (1)
- Shiyao-Huang (1)
- GavinZhang0228 (1)
- ziky168 (1)
- vansin (1)
- xjspace (1)
Pull Request Authors
- mzr1996 (12)
- ly015 (12)
- HAOCHENYE (10)
- Tau-J (8)
- hhaAndroid (5)
- Jize-W (4)
- fanqiNO1 (4)
- Yanyirong (4)
- zhouzaida (3)
- JackWoo0831 (2)
- tpoisonooo (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 84 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 12
- Total maintainers: 1
proxy.golang.org: github.com/InternLM/agentlego
- Documentation: https://pkg.go.dev/github.com/InternLM/agentlego#section-documentation
- License: apache-2.0
-
Latest release: v0.2.0
published about 2 years ago
Rankings
proxy.golang.org: github.com/internlm/agentlego
- Documentation: https://pkg.go.dev/github.com/internlm/agentlego#section-documentation
- License: apache-2.0
-
Latest release: v0.2.0
published about 2 years ago
Rankings
pypi.org: agentlego
AgentLego is a versatile tool library for enhancing LLM-based agents.
- Documentation: https://agentlego.readthedocs.io
- License: Apache License 2.0
-
Latest release: 0.2.0
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v2 composite
- actions/setup-python v1 composite
- accelerate *
- addict *
- albumentations *
- einops *
- gradio *
- imageio *
- imageio-ffmpeg *
- invisible-watermark *
- langchain ==0.0.101
- numpy *
- omegaconf *
- open_clip_torch *
- openai *
- opencv-python *
- openmim *
- prettytable *
- safetensors *
- streamlit *
- test-tube *
- torchmetrics *
- transformers *
- webdataset *
- wget ==3.2
- yapf *
- docutils ==0.18.1
- modelindex *
- myst-parser *
- pytorch_sphinx_theme *
- sphinx ==6.1.3
- sphinx-copybutton *
- sphinx-notfound-page *
- sphinx-tabs *
- sphinxcontrib-jquery *
- tabulate *
- fastapi *
- openai *
- python-multipart *
- sentence-transformers *
- torch *
- torchaudio *
- torchvision *
- typing-extensions *
- uvicorn *
- Pillow *
- func_timeout *
- mmengine >=0.8
- numpy *
- opencv-python *
- packaging *
- prompt_toolkit *
- requests *
- thefuzz *
- tqdm *
- fastapi *
- python-multipart *
- typing-extensions *
- uvicorn *