GithubHelp home page GithubHelp logo

jonnyquan / agents Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aiwaves-cn/agents

0.0 0.0 0.0 57.54 MB

An Open-source Framework for Autonomous Language Agents

License: Apache License 2.0

Python 100.00%

agents's Introduction

Agents 2.0: Symbolic Learning Enables Self-Evolving Agents

[🤖Project] [📄Paper] [📝Docs] [🌟Overview] [🔧Installation] [🚩Citation]

License: Apache


🔔News

  • [2024-06-25] We release Agents 2.0, a major update to the original library, adding support for agent learning and evaluation.

🌟Overview

Agent symbolic learning is a systematic framework for training language agents, which is inspired by the connectionist learning procedure used for training neural nets. We make an analogy between language agents and neural nets: the agent pipeline of an agent corresponds to the computational graph of a neural net, a node in the agent pipeline corresponds to a layer in the neural net, and the prompts and tools for a node correspond to the weights of a layer. In this way, we are able to implement the main components of connectionist learning, i.e., backward propagation and gradient-based weight update, in the context of agent training using language-based loss, gradients, and weights.

We implement loss function, back-propagation, and weight optimizer in the context of agent training with carefully designed prompt pipelines. For a training example, our framework first conducts the "forward pass" (agent execution) and stores the input, output, prompts, and tool usage in each node in a "trajectory". We then use a prompt-based loss function to evaluate the outcome, resulting in a "language loss". Afterward, we back-propagate the language loss from the last to the first node along the trajectory, resulting in textual analyses and reflections for the symbolic components within each node, we call them language gradients. Finally, we update all symbolic components in each node, as well as the computational graph consisting of the nodes and their connections, according to the language gradients with another carefully designed prompt. Our approach also naturally supports optimizing multi-agent systems by considering nodes as different agents or allowing multiple agents to take actions in one node.

Workflow Illustration


🔧Installation

Installation from git repo branch:

pip install git+https://github.com/aiwaves-cn/agents@master

Installation for local development:

git clone -b master https://github.com/aiwaves-cn/agents
cd agents
pip install -e .

⭐ Star History

Star History Chart


🚩Citation

If you find our repository useful in your research, please kindly consider cite:

@article{zhou2024agents2,
      title={Symbolic Learning Enables Self-Evolving Agents}, 
      author={Wangchunshu Zhou and Yixin Ou and Shengwei Ding and Long Li and Jialong Wu and Tiannan Wang and Jiamin Chen and Shuai Wang and Xiaohua Xu and Ningyu Zhang and Huajun Chen and Yuchen Eleanor Jiang},
      year={2024},
      eprint={2406.18532},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2406.18532}, 
}

@article{zhou2023agents,
      title={Agents: An Open-source Framework for Autonomous Language Agents}, 
      author={Wangchunshu Zhou and Yuchen Eleanor Jiang and Long Li and Jialong Wu and Tiannan Wang and Shi Qiu and Jintian Zhang and Jing Chen and Ruipu Wu and Shuai Wang and Shiding Zhu and Jiyu Chen and Wentao Zhang and Xiangru Tang and Ningyu Zhang and Huajun Chen and Peng Cui and Mrinmaya Sachan},
      year={2023},
      eprint={2309.07870},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2309.07870}, 
}

agents's People

Contributors

jianghuyihei avatar callanwu avatar mikedean2367 avatar eleanorjiang avatar michaelzhouwang avatar rainstorm12 avatar stephenqsstarthomas avatar guspan-tanadi avatar litmirror123 avatar juanjuandaddy avatar dependabot[bot] avatar howarddai avatar hydecaesar avatar oe-heart avatar tanj85 avatar chaser164 avatar ammar-web avatar eltociear avatar ekiwi111 avatar tanys123 avatar ishaan-jaff avatar sakurajimamaiii 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.