How does it work?
TaskManager gets created, with a goal, a list of tools, and its own LLM. It includes a bunch of prompts which is used internally. When initialized, it creates an initial list of tasks to get started (this behaviour is different when initializing with certain arguments, but I'll get into that later).
As a developer, it's up to you how you process those tasks, but you can see what I would do at the end of
main.py. But, as a task is completed, you give the TaskManager the name of the task and the result. The
TaskManager will then use another prompt to reflect on the results of this task. This is called the refinement process. If additional tasks are needed, they will be added here. Info that may be needed for future tasks is saved to
stored_info, and stuff for the end result should go to
When the final goal has been met, the
TaskManager will run the
complete_func (which you can define in the initialization) which will - by default - save all variables to a file.
Internal LLM to fix JSON output
Can persist state
text-davinci-003or something by default (cheap)