🤖 Llama AGI 🦙
This python package allows you to quickly create Auto-GPT-like agents, using LlamaIndex and Langchain.
Setup
Install using pip:
pip install llama-agi
Or install from source:
git clone https://github.com/run-llama/llama-lab.git
cd llama-lab/llama_agi
pip install -e .
Example Usage
The following shows an example of setting up the AutoAGIRunner, which will continue completing tasks (nearly) indefinitely, trying to achieve it's initial objective of "Solve world hunger."
from langchain.agents import load_tools
from langchain.llms import OpenAI
from llama_agi.execution_agent import ToolExecutionAgent
from llama_agi.runners import AutoAGIRunner
from llama_agi.task_manager import LlamaTaskManager
from llama_agi.tools import search_notes, record_note, search_webpage
from llama_index import ServiceContext, LLMPredictor
# LLM setup
llm = OpenAI(temperature=0, model_name='text-davinci-003')
service_context = ServiceContext.from_defaults(llm_predictor=LLMPredictor(llm=llm), chunk_size_limit=512)
# llama_agi setup
task_manager = LlamaTaskManager([args.initial_task], task_service_context=service_context)
tools = load_tools(["google-search-results-json"])
tools = tools + [search_notes, record_note, search_webpage]
execution_agent = ToolExecutionAgent(llm=llm, tools=tools)
# launch the auto runner
runner = AutoAGIRunner(task_manager, execution_agent)
objective = "Solve world hunger"
initial_task = "Create a list of tasks"
sleep_time = 2
runner.run(objective, initial_task, sleep_time)
More examples can be found in the examples folder!
Llama Ecosystem
- LlamaIndex (connecting your LLMs to data): https://github.com/jerryjliu/llama_index
- LlamaHub (community library of data loaders): https://llamahub.ai
Metadata
Release files for llama-agi 0.2.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 | |
|---|---|---|---|---|
| llama_agi-0.2.0.tar.gz | 10.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_agi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.6 kB
Release files / llama_agi-0.2.0.tar.gz
| Download URL | llama_agi-0.2.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3736e723d835753b2bddd8ef7fb8287cf6482e1c8197012d67a87aa8dce760b
|
|
BLAKE2b-256 checksum How to use checksums |
44b3a8bad199fe62258eb92718ee7417183f1b039e5634812e7d6737d96acf42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.0 Linux/5.10.102.1-microsoft-standard-WSL2
|
Release files / llama_agi-0.2.0-py3-none-any.whl
| Download URL | llama_agi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96f16734956414e56fea39f9cfadce8372c73ae23f9f819e251be7938b80ef9d
|
|
BLAKE2b-256 checksum How to use checksums |
4440d3b611762c36ce27012df0ebdef1734d851f7169a2811fd505bcb484a8ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.0 Linux/5.10.102.1-microsoft-standard-WSL2
|
Security for llama-agi 0.2.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.