Agent Actors: Plan-Do-Check-Adjust with Parallelized LLM Agent Trees
Create your own trees of AI agents that work towards a common objective. Together, let's explore the potential of Agent Actors and inspire the LLM community to delve deeper into this exciting realm of possibilities!
Watch this 2-minute demo walkthrough — https://www.loom.com/share/8e60585f069c4a9f8ac9f01204b41704
Here's a sample generated execution plan:
Key Features
- Time Weighted Long-Term Memory using
langchain.retrievers.TimeWeightedVectoreStoreRetriever - Synthesized Working Memory: An agent draws insights from and synthesizes their relevant memories into a "working memory" of 1–12 items for use with zero-shot prompts.
- Implements the Plan-Do-Check-Adjust (PDCA) operational framework for continuous improvement.
- Automatic Planning and Distribution of Tasks to Agents Our
ParentAgentclass plans tasks for its children to do and distributes them to be completed in parallel. - Parallel Execution of Agents
ChildAgents work in parallel to Do and Check their results. Before running, they wait for all task dependencies to be resolved and inject that into their context. - Create your own trees of autonomous AI agents You can nest
ParentAgents underParentAgents, or comingle them withChildAgents. Use your own vector store, retriever, or embedding function with ourParentAgentandChildAgentclasses. See how easy it is intest_system.py.
What will you build?
- Terminating auto-GPTs that converges across successive runs
- Your own research and reporting teams of agents
- Simulation-driven organizational behaviour research
- Create a developer team of AutoGPTs that code for you together
Limitations
- Proof of Concept, not production ready
- We've only tested used GPT3.5
Installation
Requires Python: ^3.10
Install through your choice of package manager:
poetry add git+https://github.com/shaman-ai/agent-actors.git
pipenv install git+https://github.com/shaman-ai/agent-actors.git#egg=agent-actors
Learn Agent Actors in 5 minutes
from agent_actors import (
Agent, # subclass and replace with your own `run` method
ChildAgent, # Do and Check
ParentAgent, # Plan and Adjust
ConsolePrettyPrinter, # Helpful for printing JSON task outputs, pass as a handler to CallbackManager
)
Read test_system.py!
Run Agent Actors
- Clone the repo
poetry install --with dev --with typing- Modify
test_system.pyto your own needs - Run
poetry run pytest -s -k 'test_name_str_to_filter_by'
You can also run all tests with poetry run pytest, but this may take a while to execute, and is likely to hit into API rate limits.
Contribute to Agent Actors
Check out this diagram to understand how the system works: https://beta.plectica.com/maps/W26XSGD28
Requests for Pull Requests
- Improved Agent Prompts: Develop better prompts for the Plan, Do, Check, and Adjust chains
- Visualization Tooling: Develop an interface for exploring first, then composing, an execution tree of Agent Actors, allowing researchers to better understand and visualize the interaction between the supervisory agent and worker agents.
- Evaluation Data: Understanding how this performs in different contexts is key to developing a better AGI architecture.
- Unlock Talking to Agents: The dialogue functions are there, and we're looking for help on how we can "talk" to these agents from another, say, IPython, to get a look into their state.
- Unlock Inter-Agent Communication: What happens if agents can talk to each other, not just return results to their parents and write memories to the global store?
License
BUSL-1.1
Gratefulness
We extend our gratitude to the contributors of the Python packages langchain and ray, without which this wouldn't be possible. We extend our gratitude to the amazing researchers who wrote Generative Simulacra [TODO], ReAct [TODO], and Jeremy Howard [TODO] and FastAI, without which this wouldn't be possible. And to BabyAGI and AutoGPT for inspiring us.
Citation
Citation Please cite the repo if you use the data or code in this repo.
@misc{agentactors,
author = {Shaman AI},
title = {Agent Actors: Plan-Do-Check-Adjust with Parallelized LLM Agent Trees},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/shaman-ai/agent-actors}},
}
Metadata
Release files for agent-actors 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_actors-0.1.0.tar.gz | 16.9 kB | Without provenance | Details for agent_actors-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_actors-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agent_actors-0.1.0-py3-none-any.whl |
Total release size: 35.8 kB
Release files / agent_actors-0.1.0.tar.gz
| Download URL | agent_actors-0.1.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dad636233b7c68e9765c3451fa5030504e691c89efd369ee91131f873f4eb940
|
|
BLAKE2b-256 checksum How to use checksums |
a5fc8be05219024958950e0befaa5194d0acc8192301934642b316edde75dd2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.11 Darwin/22.4.0
|
Release files / agent_actors-0.1.0-py3-none-any.whl
| Download URL | agent_actors-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84cd8feecb7ba8f45862a579e3b22e454bc2f847b0b0352ce62e04c6e3862bd4
|
|
BLAKE2b-256 checksum How to use checksums |
dfc5bace7ab05006a14f91764d1c71037eb3b117bed92bc6e6b53189962597ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.11 Darwin/22.4.0
|
Security for agent-actors 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.