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

Add ParallelAgent class #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

carr324
Copy link

@carr324 carr324 commented Nov 22, 2024

Issue number: N/A

Summary

Current version of the multi-agent-orchestrator package does not have any readily available agents to run concurrent operations across multiple agents. Default agents either run independently or need to be sequentially linked with a ChainAgent. A new ParallelAgent that allows multiple agents to run simultaneously would allow for more efficient runtimes and more advanced agentic designs.

Changes

New ParallelAgent module has been added by adapting some of the core logic from ChainAgent. Minimal use of external packages (only typing and asyncio as additional imports beyond modules in the src code). Asynchronously and simultaneously runs each individual agent provided to ParallelAgent, then outputting result as ConversationMessage class. The individual agents within the overall ParallelAgent can be of any default agent class. The combined response from all agents within the ParallelAgent is embedded in the ConversationMessage as a dictionary with agent names in keys and text responses as values.

Possible next steps:

  • Finalize python implementation of ParallelAgent
  • Replicate logic to TypeScript
  • Update documentation/website (mirror ChainAgent info on main package website)
  • Anything else suggested by package authors/maintainers

User experience

Users would be able to import and use the ParallelAgent class in a similar manner as ChainAgent.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
Is this a breaking change?

RFC issue number: N/A

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

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