Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: supervisor should be configurable agent #68

Closed
grabbou opened this issue Dec 10, 2024 · 1 comment · Fixed by #105
Closed

feat: supervisor should be configurable agent #68

grabbou opened this issue Dec 10, 2024 · 1 comment · Fixed by #105

Comments

@grabbou
Copy link
Collaborator

grabbou commented Dec 10, 2024

Should have its own prompt and customization
Should be special one for dealing with smaller tasks, not only complex workflows
Can have access to additional data to be better at planning

@pkarw
Copy link
Collaborator

pkarw commented Dec 11, 2024

Related: #71
Related: #64

pkarw added a commit that referenced this issue Dec 12, 2024
…ve object (#105)

Fixes #68 
Related #102 

There are a lot of changes in this PR, I will break them down here,
together with motivation.

The prime motivation for the change was to simplify the structure of
"state" by getting rid of agent specific properties (such as agentName,
agentRequest) and moving to a simple state object that can have "child"
states (either single element, or an array).

That way, we could get rid of special handling for supervisor, resource
planner (two built-in agents) and further simplify the logic.

Thanks to that, we have "out-of-the-box" support for parallelism,
cancellations, hand-offs. If agent wants to delegate, simply create new
`workflowState` and add it as a child, then return state (see how
"supervisor" is implemented). If agent wants to hand-off the task, they
can simply replace their entire state (see how "resourcePlanner" gets
its job done).

Other changes worth mentioning:
- Agent does not have role anymore. Now, what matters is the key on
"team" object. This is aligned with how we define tools. This will make
it better and more future proof if we serialize state object on the
server. We no longer rely on array positions.
- Renamed "members" array to "team" object
- Supervisor and Planner are now normal agents (and you can overwrite
them, or change their behavior, or define your own)
- Added tool helpers to be used on the server side

Here is screenshot of what the output looks like at the moment:


![3EB0FB32C3162E9A2F78_1](https://github.com/user-attachments/assets/b2e3b7b4-afea-436e-b6b2-73e6f7407c13)

---------

Co-authored-by: Piotr Karwatka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants