-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
MultiAgentWorkflow #17237
MultiAgentWorkflow #17237
Conversation
llama-index-core/llama_index/core/agent/multi_agent/multi_agent_workflow.py
Outdated
Show resolved
Hide resolved
async for event in handler.stream_events(): | ||
if hasattr(event, "delta"): | ||
print(event.delta, end="", flush=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these agents streaming dedicated events that can be shown in the UI (we're using this in create-llama).
There we're having the AgentRunEvent
see
https://github.com/run-llama/create-llama/blob/main/templates/components/multiagent/python/app/workflows/events.py
(ignore to_response
- this is for conversion to vercel data streams, this concern can be done outside of this PR)
here is an example using it to send the progress of tool calls:
https://github.com/run-llama/create-llama/blob/eec237c5feea1af9cdd5b276d34ebe3b8d0fd185/templates/components/multiagent/python/app/workflows/tools.py#L141
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! That is the main intention for these events, to show progress in some UI.
I didn't capture the concept of "in progress" or "completed" with this, its mostly all just events at points in time (here's the agent input, here's the agent stream, here's the agent output, heres a tool im about to call, here's the tool output) -- I could refactor, but not sure if its needed or not
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
A multi agent system implemented as a prebuilt workflow.
Currently, supports
FunctionToolWithContext
ctx.wait_for_event()
Usage Example:
https://gist.github.com/logan-markewich/f91929a4d0c7e41515bed1d2851c566c
Current Diagram:
Todo: