AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Asynchronous User Interaction via Redis for AutoGPT

Open ryanpeach opened this issue 1 year ago • 32 comments

Hey everyone, I've been working on integrating Redis and a separate terminal-based CLI client with AutoGPT to enable asynchronous question-and-answer user interactions. This is just a draft PR, so any feedback or contributions are more than welcome!

This will allow the agent to ask follow up questions based on long term work done on it's goals. Checking its work against the users wishes, etc. It also allows the system to set up user notifications.

Just like a person can have an inner monologue while they talk to a person, this allows chatgpt to interact with a human without impeding its ability to live and work asynchronously, as most of the other PR's about user QA do.

ryanpeach avatar Apr 04 '23 04:04 ryanpeach

Ooh, would love to see this across the finish-line!

yousefissa avatar Apr 04 '23 05:04 yousefissa

@ryanpeach This is exciting stuff! Really looking forward to playing with it, how close are we? 😊

Torantulino avatar Apr 04 '23 09:04 Torantulino

@ryanpeach since you're on this, i'd like to request you make an attempt to make it generic as possible your asynchronous workflow sounds increadible please make it easy for me and others to add whatsapp support instead of RabbitMQ hope that it would be easy to plug in other com libs aswell thanks a lot!

fire17 avatar Apr 04 '23 12:04 fire17

@fire17 So I am totally trying to make it very generic. RabbitMQ is not in competition with Whatsapp and Signal and such in this architecture, the CLI client is. Making a Whatsapp or Signal client is 100% on my roadmap. So the whatsapp or signal client would still pop from the rabbitmq queue, then they would send it to signal or whatsapp, wait for response, send it back to rabbitmq. Basically as an adaptor.

@Torantulino I'd love to see it working by end of day but maybe unrealistic. Maybe end of week.

ryanpeach avatar Apr 04 '23 15:04 ryanpeach

So making a progress report:

The main client currently connects to the rabbitmq database but occasionally connection is being dropped. I'm having trouble to get the AI to use the commands in order for me to debug them. The qa client has been rewritten using Rich to provide a very nice UI for question answering, but I haven't tested it yet. I'm a bit bogged down at work. Still hope to work on it and be done this week, at least this weekend.

ryanpeach avatar Apr 05 '23 17:04 ryanpeach

Also, I'm starting to think redis sets and pub/sub might be better to add the questions to, because if you close the client you lose all the questions asked so far. Upvote this post if you'd rather see a redis, I'm sure it'd be more useful for other database related needs too.

ryanpeach avatar Apr 05 '23 18:04 ryanpeach

@ryanpeach this might be one of the more important prs in of the more important repos Really hope to see this go live soon

Much love Redis ftw!

fire17 avatar Apr 05 '23 23:04 fire17

I must be out of the loop, because I have no idea what RabbitMQ or QA is, and can't really tell from the code either. From what I see it looks like a cool feature, but could probably use some documentation work. Does this make it required to run RabbitMQ in order to use Auto-GPT?

sberney avatar Apr 06 '23 07:04 sberney

Ok so I switched to redis, it is much easier to program in.

It's now complete! See discord for some amazing examples.

@sberney QA stands for question and answer.

ryanpeach avatar Apr 07 '23 21:04 ryanpeach

Had to merge https://github.com/Torantulino/Auto-GPT/pull/142 in to make this work. We desperately need a module.

ryanpeach avatar Apr 09 '23 02:04 ryanpeach

#142 is already a big change. Just extract all small changes from this and #142 and let @Torantulino merge them separately. Then rebase these ones on top. If you need help rebasing or splitting I can do, but I would like to get a confirmation from @Torantulino that my work will get reviewed and merged quickly so that I won't just create more trivial PRs.

nponeccop avatar Apr 09 '23 11:04 nponeccop

@ryanpeach Now it's out of date again (partially due to the big scope). Resolve the conflicts and rollback the unrelated changes. I guess mark it as a draft too because we need #621 to get focused and merged first.

nponeccop avatar Apr 10 '23 08:04 nponeccop

I’ll start actively maintaining it after some (any) pr making scripts a module is merged. That’s a large part of the diff, and continuing to contribute to the repo is just not worth the effort without that change.

ryanpeach avatar Apr 10 '23 15:04 ryanpeach

This PR is going into draft until basic code quality is reached and I’m contacted that it is ready to be given active attention on a day I can focus to bring it up to contribution standards. Reaching basic code quality prevents large merge conflicts, and allows for testing so PRs don’t break functionality. It also allows for a speedy pr review process. Until then, I’ll be maintaining an active fork with best practices for python development. Feel free to fork this code to make the idea work in your repo.

ryanpeach avatar Apr 10 '23 15:04 ryanpeach

@ryanpeach I agree it would have been really nice if we had merged at least the module improvement.

waynehamadi avatar Apr 11 '23 14:04 waynehamadi

This change looked pretty good when you were streaming the other day, I'll see if I can easily clean this up real quick.

BillSchumacher avatar Apr 15 '23 22:04 BillSchumacher

This change was a bit too big, and broken for me in vscode when I tried to resolve conflicts. The functionality was great though.

BillSchumacher avatar Apr 15 '23 22:04 BillSchumacher

come back @ryanpeach :) there is less conflict now in the repo it's more modular

waynehamadi avatar Apr 16 '23 21:04 waynehamadi

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 15:04 github-actions[bot]

@ryanpeach CI is red

nponeccop avatar Apr 18 '23 12:04 nponeccop

@merwanehamadi maybe this weekend I can work to bring this back. @nponeccop @Torantulino would this get PR attention if I fixed it?

The repo looks significantly better since the separation of master and stable.

ryanpeach avatar Apr 18 '23 15:04 ryanpeach

I've been working on a fully stateless, multi-tennant, langchain, sms based version of this over in https://github.com/ryanpeach/smsAGI . But I'm fully open to contributing to this wider project.

ryanpeach avatar Apr 18 '23 15:04 ryanpeach

Oh my god you're back @ryanpeach !!! come in discord we have to talk !

waynehamadi avatar Apr 18 '23 15:04 waynehamadi

we have to talk about langchain and autogpt

waynehamadi avatar Apr 18 '23 15:04 waynehamadi

I hear there is now a concept of core vs plugins? Please tell me exactly what you would like me to do @Torantulino and I'll have it done the weekend after. I probably won't bother to make it a plugin, so please approve this change as a core change if you'd like it integrated.

ryanpeach avatar Apr 18 '23 19:04 ryanpeach

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

commenting to subscribe, would also like to see this integrated

Boostrix avatar May 09 '23 10:05 Boostrix

commenting to subscribe, would also like to see this integrated

@Boostrix As a quick note, you can subscribe without commenting using the sidebar on the right.

onekum avatar May 10 '23 18:05 onekum

yikes, thanks - my first time on this facebook for coding thingy !

Boostrix avatar May 10 '23 18:05 Boostrix

This would be a high upgrade, would love to see this come into fruition!

UP929312 avatar May 14 '23 10:05 UP929312