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

Remove flow task; add threadmessage construct #39

Merged
merged 1 commit into from
May 16, 2024
Merged

Remove flow task; add threadmessage construct #39

merged 1 commit into from
May 16, 2024

Conversation

jlowin
Copy link
Member

@jlowin jlowin commented May 16, 2024

The @flow decorator was using a "parent task" to automatically track all tasks added in the flow, but this confused the agents, who viewed that task as part of their mandate (and created complexity around how to decide if it was successful, failed, skipped, etc).

Instead, we replace the parent task with the existing task-tracking mechanism of the flow, and spawn a Controller to run all registered tasks to completion before returning from the flow decorator.

This also includes an important enhancement: the ThreadMessage object. Agents often post messages, then repeat the entire message as a Task result. By passing a special ThreadMessage object, they can indicate that the task result should be loaded from a previous response, saving time and tokens.

@jlowin jlowin merged commit fb7f379 into main May 16, 2024
1 of 3 checks passed
@jlowin jlowin deleted the decorator branch May 16, 2024 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant