Skip to content

This is a prototype for a self-modifying and self-optimizing autonomous agent that uses several LLMs to progress toward a goal

License

Notifications You must be signed in to change notification settings

cpravetz/cktAGT

Repository files navigation

cktAGT

This is a javascript implementation of an AGT that will be able to:

  • create its own plugins to accomplish new tasks as it encounters them and
  • select optimal LLMs to use based on the Goal and Tasks it is completing

There is no stable release as we continue to push a great deal of changes to the system. If you have cloned a copy and it doesn't work for you - try again in a day or two. Please do use the issues area on github to share anything that arises. For now, it's more likely than not you will run into an error.

Much of this code remains untested and unproven. Given the capabilities of the system, it is theoretically possible the system will do things that aren't desirable especially if you give it destructive prompts or allow it to build harmful code.

These are very early days, and the front-end is barebones. Don't laugh at it.

You need to install node and the packages listed in package.json. Settings are stored in a file named .env in the root directory and there is a template for that file in env.template.

cktAGT can currently use GPT-3.5, GPT-4, any model on huggingface, bard and gorilla.

The command "node index.js" will start the application. Open a browser and navigate to //localhost:3000 if running on the same computer.

To prevent cktAGT from running amuck, you can limit the number of tasks the agent completes before requesting approval to process. The "Run continuous" check box will set the system free, but putting a number into the "Steps approved" nd pressing Submit will allow the system to proceed with that number of steps. If you have already approved steps that haven't been used yet, the system will add the new number to the existing approval. In other words, if you approve 10 steps and after the system has completed one step, you approve 10 again, the system will consider itself as approved for 19 steps.

You can simply delete any plugins that you are not comfortable deploying. The pluginManager class loads all plugins from the ./plugins folder.

All plugins has the save basic structure
{
    version - returns a version number, which is not used yet
    command - returns the name of the command that this plugin handles
    args: a description of the inputs needed by the function
        ...plugin specific code...
    execute(agent, command, task) - processes the commandObject and returns a structured outputObject
}

the commandObject is
{
    name: the name for this instance of a command,
    args: { an object with the arguments required for this particular command }
}

the outputObject is
{
    outcome: either "SUCCESS" or "FAILURE",
    text: a string to show the human user via the say() function once the plugin execute completes
    results: {an object with command specific results, for failures will have error: with an error message},
    tasks: [an array of new tasks to be launched]
}

About

This is a prototype for a self-modifying and self-optimizing autonomous agent that uses several LLMs to progress toward a goal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published