Skip to main content

A flexible agent library.

Project description

Language agent experimentation made easy.

codecov License: MIT

Agential provides clear implementations of popular LLM-based agents across a variety of reasoning/decision-making and language agent benchmarks, making it easy for researchers to evaluate and compare different agents.

๐Ÿค” Getting Started

First, install the library with pip:

pip install agential

Next, let's query the ReActAgent!

from agential.llm.llm import LLM
from agential.cog.react.agent import ReActAgent

question = 'Who was once considered the best kick boxer in the world, however he has been involved in a number of controversies relating to his "unsportsmanlike conducts" in the sport and crimes of violence outside of the ring?'

llm = LLM("gpt-3.5-turbo")
agent = ReActAgent(llm=llm, benchmark="hotpotqa")
out = agent.generate(question=question)

๐Ÿงญ Project Organization


โ”œโ”€โ”€ agential                           <- Source code for this project.
โ”‚ย ย  โ”œโ”€โ”€ cog   
โ”‚   โ”‚   โ”œโ”€โ”€ agent                      <- Model/agent-related modules.
โ”‚   โ”‚   โ”‚     โ”œโ”€โ”€ strategies           <- Strategies encapsulate agent logic for each benchmark/benchmark type.
โ”‚   โ”‚   โ”‚     โ”‚       โ”œโ”€โ”€ base.py  
โ”‚   โ”‚   โ”‚     โ”‚       โ”œโ”€โ”€ qa.py
โ”‚   โ”‚   โ”‚     โ”‚       โ”œโ”€โ”€ math.py
โ”‚   โ”‚   โ”‚     โ”‚       โ””โ”€โ”€ code.py
โ”‚   โ”‚   โ”‚     โ”‚
โ”‚   โ”‚   โ”‚     โ”œโ”€โ”€ agent.py             <- Agent class responsible for selecting the correct strategy, prompts/few-shots, and generating responses.
โ”‚   โ”‚   โ”‚     โ”œโ”€โ”€ functional.py        <- Functional methods for agent. The lowest level of abstraction.
โ”‚   โ”‚   โ”‚     โ”œโ”€โ”€ output.py            <- Output class responsible for formatting the response from the agents.
โ”‚   โ”‚   โ”‚     โ”œโ”€โ”€ prompts.py           <- Prompt templates.
โ”‚   โ”‚   โ”‚     โ””โ”€โ”€ <modules>.py         <- Any additional modules you may have for the strategies. Agnostic to benchmarks/benchmark-types.
โ”‚   โ”‚
โ”‚ย ย  โ”œโ”€โ”€ eval                           <- Evaluation-related modules.
โ”‚   โ”‚
โ”‚ย ย  โ”œโ”€โ”€ llm                            <- LLM class.
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ utils                          <- Utility methods.
โ”‚       
โ”œโ”€โ”€ docs                               <- An mkdocs project.
โ”‚
โ”œโ”€โ”€ notebooks                          <- Jupyter notebooks. Naming convention is a number 
โ”‚                                         (for ordering), the creator's initials, and a short `-` delimited โ”‚ description, e.g. `1.0-jqp-initial-data-exploration`.
โ”‚  
โ”œโ”€โ”€ references                         <- Data dictionaries, manuals, and all other explanatory materials.
โ”‚
โ”œโ”€โ”€ reports                            <- Generated analysis as HTML, PDF, LaTeX, etc.
โ”‚ย ย  โ””โ”€โ”€ figures                        <- Generated graphics and figures to be used in reporting.
โ”‚
โ””โ”€โ”€ tests                              <- Tests.

๐Ÿ™ Acknowledgement

๐Ÿ˜€ Contributing

If you want to contribute, please check the contributing.md for guidelines! Please check out the project document timeline on Notion and reach out to us if you have any questions!

๐Ÿ˜ถโ€๐ŸŒซ๏ธ Contact Us!

If you have any questions or suggestions, please feel free to reach out to tuvincent0106@gmail.com!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agential-0.1.0.tar.gz (194.7 kB view hashes)

Uploaded Source

Built Distribution

agential-0.1.0-py3-none-any.whl (251.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page