Skip to content

cequence-io/babyagi-s

Repository files navigation

BabyAGI - Scala Port and Beyond

version License

This project provides a line-by-line port of BabyAGI - the first prototype of LLM-driven AI agent - in Scala to serve as a starting point for further explorations and customizations in Scala or any other JVM language. This means we haven't aimed to optimize or refactor anything besides a few parts where a direct mapping from Python to Scala code wasn't possible. To validate consistency with the original Python version we also provide two test suites for prompts and the task storage.

Note that this is a port of the original Python code as of 5.5.2023, and it is not guaranteed to be in sync with the latest version of the original project in the future.

The runnable app object BabyAGI (here) follows the original Python code as closely as possible with two exceptions:

  • There is no LLAMA support, hence OpenAI API is mandatory (unless you run in human mode)
  • The only supported vector database/provider is Pinecone (no Chroma / Weaviate)

To cover this functionality we rely on OpenAI and Pinecone Scala clients.

✔️ Important: We are working now on an improved, cleaner version of BabyAGI, which means we will be functionally and architecturally diverging from the "reference point" - the original ported Scala version. We also provide Azure form recognizer support for processing of documents by the AI agent.

Config ⚙️

The following set of environmental variables (as in the Python version) is expected

  • OPENAI_API_KEY
  • OPENAI_API_ORG_ID (optional)
  • PINECONE_API_KEY
  • PINECONE_ENVIRONMENT
  • RESULTS_STORE_NAME (e.g. baby-agi-test-table)
  • OBJECTIVE (e.g. Save the planet Earth from the socio-economic collapse)
  • INITIAL_TASK (e.g. Develop a task list)

Execution 🚀

Simply run BabyAGI in the port package - here.

License ⚖️

This library is available and published as open source under the terms of the MIT License.

Contributors 🙏

This project is open-source and welcomes any contribution or feedback (here).

Development of this library has been supported by - Cequence.io - The future of contracting

Created and maintained by Peter Banda.