AutoGPT
AutoGPT copied to clipboard
Task Scheduling and Multi-Tasking
Duplicates
- [X] I have searched the existing issues
Summary 💡
This was actually suggested to me by ChatGPT. The commands would look something like this:
(
"Schedule Task",
"schedule_task",
{"task_id": "<task_id>", "task": "<task_desc>", "date": "<date>", "time": "<time>", "repeat": "<interval/none>"}
),
("List Scheduled Tasks", "list_scheduled_tasks", {}),
("Remove Scheduled Task", "remove_scheduled_task", {"task_id": "<task_id/all>"}),
("Wait for Task Trigger", "wait_for_task", {"task_id": "<task_id>"})
I asked GPT-3.5 and GPT-4 to explain these to me and verified that they both understand what "<interval/none>" and "<task_id/all>" mean.
When a scheduled task is triggered, it injects the task into the latest memory, and then either removes it or re-schedules it. Whether or not it was re-scheduled should be stated to GPT-4 so it doesn't attempt to do so unnecessarily.
"Wait for Task Trigger" just provides sleep functionality if the agent is waiting on something, to save tokens.
Examples 🌈
As an example use case, any agent communicating asynchronously online would want to regularly check for responses. If its future tasking is reliant on responses then it can sleep between checks, otherwise it can do other things in the meantime.
Motivation 🔦
This provides AutoGPT with the long-term self-discipline that alarms afford to us humans. While I wouldn't say it provides long-term planning capabilities (unless testing reveals it uses these commands for that purpose), as it is time-based rather than sequential tasking-based, it's a simple stepping stone towards that.
This could really help improve Auto-GPT's performance with GPT-3.5
would also be very interested in playing with this - would this be something that is agent based, in other words would each agent be able to have its own scheduler ?
We now have a bunch of "event handling" related PRs, so such a scheduler should probably implement the interface of an abstract EventHandler.
Anything that is conceptually interrupting an agent, could be thought of as a scheduling/event management issue: #151
would also be very interested in playing with this - would this be something that is agent based, in other words would each agent be able to have its own scheduler ?
You can have an optional "agent" parameter in each task object, which is automatically added upon creation, and omitted when fetching the list of tasks for that agent. Global tasks can be created by the master agent and used to synchronize or focus sub-agents.
There is now this in the pipeline: #2739
Implementing would be pretty straightforward, and it would even make sense to have /some/ type of scheduler to use the "thinking" time to execute local tasks in the backgrounde
We're picking this up in work on #3536
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.
This issue was closed automatically because it has been stale for 10 days with no activity.