Skip to main content

pyAGI

pyAGI is a Python package that functions as an autonomous agent for your Python application. By interfacing with OpenAI models, it utilizes a sequence of prompts to instruct the AI in generating various outputs such as application descriptions, architecture outlines, user experience flows, and even code samples. All these are achieved using the langchain framework to construct chains of language models.

Features

  1. Supports several OpenAI models, including a range of GPT-3 and Davinci models.
  2. Provides functionality for generating:
    1. Application descriptions
      1. Software architecture outlines
      2. User experience flows
      3. Code flow descriptions
      4. Coding steps
      5. Application code

Setup

To use pyAGI, you need to have an OpenAI account and obtain your API key. Once you have your OpenAI API key, set it as an environment variable OPENAI_API_KEY in your system.

export OPENAI_API_KEY='your-api-key-here'

Installation

To install pyAGI, use pip:

pip install pyAGI

The package is available at PyPI pyAGI (https://pypi.org/project/pyAGI/).

Usage

After installing, you can use pyAGI to generate content for your application as follows:

from pyAGI.pyagi import PyAGI

Create a PyAGI instance with a selected OpenAI model
py_agi = PyAGI.create_llm_chain(selected_model="text-davinci-003")

# Run the PyAGI instance with the objective
py_agi({"objective": "Your Objective", "selected_model": "text-davinci-003"})

Usage without installing the pip package

python main.py "Objective of your app" "OpenAI Model"

For example:

python main.py "Build a weather app" "text-davinci-003"

Available Models

Currently supported models:

  • "text-davinci-002",
  • "text-davinci-003",
  • "gpt-3.5-turbo",
  • "gpt-3.5-turbo-0301",
  • "text-curie-001",
  • "text-babbage-001",
  • "text-ada-001"

Upcoming models (https://openai.com/waitlist/gpt-4-api):

  • "gpt-4",
  • "gpt-4-0314",
  • "gpt-4-32k",
  • "gpt-4-32k-0314"

Please note that upcoming models will not be supported until released.

Contributing

Contributions are welcome! Please open an issue if you encounter a bug, or a pull request if you have improvements to the existing code.

License

This project is licensed under the MIT License.

Release files for pyAGI 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyAGI 1.0.4
File Size Uploaded
pyAGI-1.0.4.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyAGI 1.0.4
File Interpreter ABI Platform
pyAGI-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / pyAGI-1.0.4.tar.gz

Download URL pyAGI-1.0.4.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2743754440f9abe8c44d0f4247d50e87ccd0a0d287e086e1f9ab99260a56b859
BLAKE2b-256 checksum
How to use checksums
2fc3c99974c9ef25a444539c5f16f45abb221ba2868e710ccf5f5af6c208a326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / pyAGI-1.0.4-py3-none-any.whl

Download URL pyAGI-1.0.4-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8231ae19a3b72340cf447838e7826efe3bcba8a6e85f62f27f3dedad717619fe
BLAKE2b-256 checksum
How to use checksums
f08cae9b08e17855a73bf0eb7f8d8401863d6783af42077f5e139bd93feddd25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page