Metadata-Version: 2.1
Name: agential
Version: 0.1.0
Summary: A flexible agent library.
Home-page: https://github.com/alckasoc/agential
License: MIT
Keywords: agent,LLM,poetry
Author: Vincent Tu
Author-email: tuvincent0106@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: faiss-cpu (>=1.7.4,<2.0.0)
Requires-Dist: func-timeout (>=4.3.5,<5.0.0)
Requires-Dist: google-api-python-client (>=2.100.0)
Requires-Dist: langchain (>=0.2.1,<0.3.0)
Requires-Dist: langchain-community (>=0.2.1,<0.3.0)
Requires-Dist: langchain-core (>=0.2.3,<0.3.0)
Requires-Dist: litellm (>=1.42.12,<2.0.0)
Requires-Dist: scipy (>=1.13.1,<2.0.0)
Requires-Dist: sentence-transformers (>=2.2.2,<3.0.0)
Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
Requires-Dist: torch (==2.2.0)
Requires-Dist: wikipedia (>=1.4.0,<2.0.0)
Project-URL: Repository, https://github.com/alckasoc/agential
Description-Content-Type: text/markdown
Language agent experimentation made easy.
[](https://codecov.io/gh/agential-ai/agential)
[](https://opensource.org/licenses/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`!
```python
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.
β β β βββ .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](https://github.com/alckasoc/agential/blob/main/CONTRIBUTING.md) for guidelines!
Please check out the [project document timeline](https://equatorial-jobaria-9ad.notion.site/Project-Lifecycle-Management-70d65e9a76eb4c86b6aed007f717aa41?pvs=4) 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!