Agents 2.0 Documentation

repository·master·Indexed 26 days ago

https://github.com/aiwaves-cn/agents

A framework for building and training self-evolving language agents using symbolic learning. It treats agent pipelines as computational graphs where prompts and tools are optimized via language-based loss and gradients, utilizing a process of forward passes, language loss calculation, and back-propagation to update symbolic components.

Tokens
363
Snippets
1
Records
2
Agent score
41%

What's inside Agents 2.0

  1. Overview of Agents 2.0 Symbolic Learning

    master

    Agents 2.0 introduces a framework for training language agents through symbolic learning, inspired by connectionist learning (neural networks).

    Key concepts include:

    • Agent Pipeline as Computational Graph: The agent pipeline corresponds to a neural net's computational graph.
    • Nodes as Layers: Each node in the pipeline acts as a layer.
    • Prompts and Tools as Weights: The symbolic components (prompts and tools) within a node function like weights.
    • Language-based Learning: The framework implements a "forward pass" (agent execution) to create a trajectory, calculates a "language loss" via prompt-based evaluation, performs "back-propagation" to generate "language gradients" (textual reflections), and updates symbolic components and the computational graph using specialized prompts.
  2. Install Agents 2.0

    master

    You can install the Agents library directly from the GitHub repository using pip. Choose the method based on whether you want to use it as a dependency or develop it locally.

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