Coder Social home page Coder Social logo

gentopia-ai / gentopia Goto Github PK

View Code? Open in Web Editor NEW
289.0 2.0 41.0 6.17 MB

Build Hierarchical Autonomous Agents through Config. Collaborative Growth of Specialized Agents.

License: MIT License

Python 99.55% Makefile 0.18% Batchfile 0.21% Dockerfile 0.06%

gentopia's Introduction

Gentopia

License: MIT PyPI Read the Docs Static Badge Static Badge Open Issues Dependency Status

Twitter Follow YouTube Channel Subscribers GitHub star chart

Gentopia is a lightweight and extensible framework for LLM-driven Agents and ALM research. It provides essential components to build, test and evaluate agents. At its core, Gentopia aims to assemble an agent with a single config, thus minimizing your effort in building, tuning, and sharing agents.

image

Gentopia maintains an agent platform GentPool to share specialized agents, where your agent interacts with other agents by cloning, hierarchical plug-in, or sharing environment. We provide a unique agent benchmark for holistic evaluation.

Motivation 🧠

Agent practitioners start to realize the difficulty in tuning a "well-rounded" agent with tons of tools or instructions in a single layer. Recent studies like TinyStories, Specializing Reasoning, Let's Verify SbS, ReWOO, etc. also point us towards an intuitive yet undervalued direction πŸ‘‰

An LLM is more capable if you create a context/distribution shift specialized to some target tasks.

Sadly, there is no silver bullet for agent specialization. For example, you can

  • Simply add Let's think step by step. in your prompt for more accurate Math QA.
  • Give a few-shot exemplar in your prompt to guide a better reasoning trajectory for novel plotting.
  • Supervise fine-tuning (SFT) your 70B llama2 like this to match reasoning of 175B GPT-3.5.
  • Tune your agent paradigm like this demo to easily half the execution time for Seach & Summarize.
  • And more ...

Isn't it beautiful if one shares his effort in specialized intelligence, allowing others to reproduce, build on, or interact with it? πŸ€— This belief inspires us to build Gentopia, designed for agent specialization, sharing, and interaction, to stackingly achieve collective growth towards greater intelligence..

Core Features πŸ’‘

  • βš™οΈ Config-driven agent assembling and chat.
  • πŸš€ Large amount of prebuilt agent types, LLM clients, tools, memory systems, and more.
  • πŸͺΆ Lightweight and highly extensible implementation of essential components.
  • πŸ§ͺ Aligning with state-of-the-art AI research.
  • 🀝 Enabling multi-agent interactions.
  • 🦁 Unique platform of agent zoo and eval benchmark.

Quick Start 🍏

conda create --name gentenv python=3.10
conda activate gentenv
pip install gentopia

or if you want to build with open LLMs locally πŸ‘‰ pip install gentopia[huggingface]

First time to Gentopia? Grab a coffee β˜• and

Take ~ 8 mins to check out the following demo tutorials YouTube Channel Subscribers

Or check out the Quick Start Doc.

Documentation πŸ“–

See here for full documentation.

🌟 Highlight Topics 🌟

News πŸ‘·

[Oct 7] The companion paper was accepted by #EMNLP 23. See you in Singapore! πŸ¦™πŸŒŽ

[Aug 6] We've submitted our work as a paper for EMNLP 2023. Special thanks to the research team and professors from NCSU, GMU, and CMU for collaboration :)

Join us! 🌎

Participate in this Utopia of superintelligence and help it grows! As a fully open-source project, we develop under public advice, ideas, and supervision. Meanwhile, here are ways you may contribute to Gentopia.

  • πŸ› Post an issue requesting necessary bug fixes, additional features, or roadmap suggestions. (Check closed ones first)
  • 🎯 Our dev team meets weekly to groom backlog into tickets. While we work on them, you can pick up others and create a Pull Request to request a merge. We always welcome new members in this way.
  • 🀝 Share your specialized agent to GentPool! Create an Agent PR (example) to merge your well-tuned agent into the pool. This allows others to use or build upon your agent.
  • ⭐ Help us spread! Give us a star, follow us on Twitter, join our Discord, and share with your friends!

gentopia's People

Contributors

billxbf avatar liuxukun2000 avatar jerrypeng21cuhk avatar twifor avatar eltociear avatar fengsxy avatar

Stargazers

Evergardener avatar  avatar Mohammed Faheem avatar Lu avatar  avatar Subesh avatar  avatar  avatar kingfly avatar philanthrope avatar Pav Les avatar Sarang Chouguley avatar Jeff Skafi avatar Jiangyuan Li avatar Yongchao Wu avatar Jasper avatar Yohan Lee avatar AI in PM avatar George avatar  avatar Zmu avatar Saurabh Jha avatar LifeSpark avatar  avatar Jonathon Brouse avatar Ahhyun Yuh avatar TomΓ‘Ε‘ DvoΕ™Γ‘k avatar Deng Ruoxi  avatar QIU Shuo avatar  avatar  avatar  avatar Jack Li avatar  avatar Dr. Christopher G. Snyder avatar Yi-Ting Cheng avatar  avatar andy avatar Vsevolod Leonov avatar Edilmo Palencia avatar Aashiq Muhamed avatar Shivakumar Anandan avatar Aria F avatar Yusuke avatar HuanHuan Ma avatar Luoci avatar Vladimiro Bellini avatar Faisal Alsrheed avatar William Cummings avatar Steve Woods avatar Vladislav Sorokin avatar Jenya Poyarkov avatar springtian avatar  avatar  avatar Carolin Lawrence avatar Avishekh Shrestha avatar Zihong avatar Jaemin Kim avatar Tao Lin avatar HuFeiHu avatar Saurav Joshi avatar Chen Weiqiang avatar  avatar  avatar WHL avatar Ryan Louie avatar Tyler W avatar John Ades avatar Joel Boehland avatar Kijin Choi avatar  avatar Anukul avatar Messi Hua avatar  avatar Jian Liao avatar  avatar Evgeny Erohin avatar  avatar Peter Zeng avatar song avatar Lau Van Kiet avatar Nikolaus Schlemm avatar Fazzie avatar Ahmed Elshalaby avatar Lennard Michael Strohmeyer avatar HyunjunJeon avatar  avatar  avatar Marcos NatΓ£ Santos avatar  avatar  avatar  avatar Abhimanyu Hans avatar den.on.rails avatar Yong Liu avatar Brad Pillow avatar Chenxin Li avatar Shai Koffman avatar Xupeng Wei avatar

Watchers

Steve Woods avatar  avatar

gentopia's Issues

Issue with Memory Implementation in ReWOO Agent

I'm trying to implement both Short and Long term Memory with the ReWOO Agent. Below is the configuration I used in my ReWOO Agent YAML file. However, when I conduct multiple conversations with the agent through Gentopia's interface, the LLM doesn't seem to retain memory as expected.

memory:
  memory_type: chroma
  conversation_threshold: 2      # first-level memory
  reasoning_threshold: 2         # second-level memory
  params:
    index: main
    top_k: 2

Can anyone confirm if the Short and Long term Memory has been correctly implemented for the ReWOO Agent, or if there's something I'm missing in my configuration?

bug: dep error on installation

happened while following https://gentopia.readthedocs.io/en/latest/installation.html
at

git clone [email protected]:Gentopia-AI/Gentopia.git
cd Gentopia
pip install -e .

the error:

Building wheels for collected packages: gentopia, cchardet, chroma, googlesearch-python, pypika, bibtexparser, free-proxy, sgmllib3k
  Building editable for gentopia (pyproject.toml) ... done
  Created wheel for gentopia: filename=gentopia-0.0.4-0.editable-py3-none-any.whl size=6705 sha256=ebde6ca84f48afef0057da894896f2209137ca967e47a2c8dd74329c52bc359b
  Stored in directory: /tmp/pip-ephem-wheel-cache-a0f80nl9/wheels/10/6b/92/8462a169f81f1e6457ae45d93e436c58a5d6a8bc0247818659
  Building wheel for cchardet (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  Γ— Building wheel for cchardet (pyproject.toml) did not run successfully.
  β”‚ exit code: 1
  ╰─> [19 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/version.py -> build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/__init__.py -> build/lib.linux-x86_64-cpython-311/cchardet
      running build_ext
      building 'cchardet._cchardet' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/cchardet
      creating build/temp.linux-x86_64-cpython-311/src/ext
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src/LangModels
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -Isrc/ext/uchardet/src -I/usr/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-311/src/cchardet/_cchardet.o
      error: command 'gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cchardet
  Building wheel for chroma (pyproject.toml) ... done
  Created wheel for chroma: filename=Chroma-0.2.0-py3-none-any.whl size=7097 sha256=97940b94a5d3e4b64110e20e63f160eb6c16ba5e097002d618f6f3c57899e246
  Stored in directory: /home/vikyw/.cache/pip/wheels/d9/fb/ff/59d3b021a3434588b65b15f1a785b4aebca8f21ea516319194
  Building wheel for googlesearch-python (pyproject.toml) ... done
  Created wheel for googlesearch-python: filename=googlesearch_python-1.2.3-py3-none-any.whl size=4204 sha256=b50f937c919e15875e4f3ca2a4fee0e8dc7fcd33bd731ce9cac6a2af3d95163d
  Stored in directory: /home/vikyw/.cache/pip/wheels/c3/a9/82/de72a96d14538012479281dfda86c35b6da183692b94f45818
  Building wheel for pypika (pyproject.toml) ... done
  Created wheel for pypika: filename=PyPika-0.48.9-py2.py3-none-any.whl size=53723 sha256=3ca1a5e4f64eccda1bcf0ce465f089c433f6b9cd74f1352edf7db6b7f9e6c2af
  Stored in directory: /home/vikyw/.cache/pip/wheels/a3/01/bd/4c40ceb9d5354160cb186dcc153360f4ab7eb23e2b24daf96d
  Building wheel for bibtexparser (pyproject.toml) ... done
  Created wheel for bibtexparser: filename=bibtexparser-1.4.0-py3-none-any.whl size=42426 sha256=861a9bcdb1e27503418553c8a361e3c0c997f628f9833cfefe05f6f9481ed996
  Stored in directory: /home/vikyw/.cache/pip/wheels/83/d6/92/151b2bc2dad15a2a24ede49aa09620d2655bec885795a6a92d
  Building wheel for free-proxy (pyproject.toml) ... done
  Created wheel for free-proxy: filename=free_proxy-1.1.1-py3-none-any.whl size=5636 sha256=41d27b05f7fef5a46bc505fe08976f84d2a6ffc235a03bac5a7325e35425b59b
  Stored in directory: /home/vikyw/.cache/pip/wheels/c6/7f/3f/b764995ae2502d8642977764577198043d3b6c6738534f5ffe
  Building wheel for sgmllib3k (pyproject.toml) ... done
  Created wheel for sgmllib3k: filename=sgmllib3k-1.0.0-py3-none-any.whl size=6047 sha256=d06b05cd2dd435b7ce928f2d9167b8d050563c1ef535305c0bd8683a1ddfac1f
  Stored in directory: /home/vikyw/.cache/pip/wheels/3b/25/2a/105d6a15df6914f4d15047691c6c28f9052cc1173e40285d03
Successfully built gentopia chroma googlesearch-python pypika bibtexparser free-proxy sgmllib3k
Failed to build cchardet
ERROR: Could not build wheels for cchardet, which is required to install pyproject.toml-based projects

Error using MultiProcessEvalPipeline and run_eval

I get error when using
MultiProcessEvalPipeline:
ImportError: cannot import name 'ZenoParameters' from 'zeno'

run_eval:
File "/Users/ahhyun/Jupyter/gentopia/GentPool/evaluate.py", line 43, in main
evaluator.run_eval(agent, save_dir=args.save_dir)
File "/Users/ahhyun/Jupyter/gentopia/GentPool/gentpool/bench/eval/eval_pipe.py", line 148, in run_eval
raise NotImplementedError("Consistency eval is not supported yet.")

How can I fix the problem?

PydanticUserError while compiling error from `basetool.py` caused by `ToolMetaclass`

When running a customized assembler.py, I received a pydnatic error saying, "Field name doesn't have the annotation." The detailed error screenshot is attached below and some printouts to help understand the problem.

error:
image

printout code and printouts:
# test block codes inside basetool.py under ToolMetaclass.__new__():
print("----test block-----")
print(f"tool name: {name} \n")
print(f"namespace dict annotation list: {dct.get('__annotations__', [])} \n")
print(f"namespace items: {[k for k,v in dct.items()]} \n")
print(f"namespace vals: {[v for k,v in dct.items()]} \n")
print("----test block end----")
image

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.