Git Product home page Git Product logo

darwin-gpt's People

Contributors

muellerberndt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

darwin-gpt's Issues

Allow the agent to update itself with new functionality

This ticket should be tackled after #3 has been implemented.

Replace the WRITE_EXEC function with a new function that allows the agent to replace itself with a new version (instead of blindly forking additional processes). Specs:

  1. The agent should attempt to run the new version of the code received by GPT in a new process and capture STDOUT/STDERR.

2.a. If the new code runs without error, the agent should terminate.
2.b. In case of an error or crash, the agent should send an error report to GPT and request fixed code, and proceed with step 1.

The number of retries should be configurable.

Desired agent behavior

With this ticket, the agent should gain the capability to reliably update itself with new functionality, in particular new commands. Make sure that the prompt makes this clear to the agent and test whether GPT understands the process correctly.

Add task management, short-term and long-term memory

Add the necessary types of memory to the agent so that it can maintain context over multiple commands. The implementation should be as simple as possible (use local files, no external APIs). Keep in mind that the code needs to remain compact.

Create a flexible command loop / modular architecture

Instead of only writing and executing code once, create a loop that allows the agent to execute multiple commands (as received by GPT) that map to Python functions. To do this, we should create a standard interface (it's probably best to use a JSON format as Auto-GPT - investigate this). The loop should work as follows:

  1. The agent prompts GPT for the next command;
  2. GPT responded with the desired command and the command arguments;
  3. Agent executes the command and sends the command output, along with a query for the next command, to GPT (repeat in a loop).

The JSON request could look as follows (example - feel free to improve on this):

{"command": {
  "name:" "write_and_execute",
  "args": [
     "code": "(escaped_code)",
     "filename": "agent.py"
}}

Note that this is similar to how Auto-GPT and babyAGI work, however, we have to keep the code as compact as possible and in a single file to allow for easy self-replication.

For this ticket, implement only a single command named WRITE_EXEC(code) or similar that writes code to a file, forks a new process, and executes the updated code (exactly like it is currently done).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.