-
Notifications
You must be signed in to change notification settings - Fork 3.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
Scalability Concerns for Multi-Agent Problems in Crew AI #1989
Comments
I believe the issue lies in the for agent in self.agents:
agent.i18n = i18n
# type: ignore[attr-defined] # Argument 1 to "_interpolate_inputs" of "Crew" has incompatible type "dict[str, Any] | None"; expected "dict[str, Any]"
agent.crew = self # type: ignore[attr-defined]
# TODO: Create an AgentFunctionCalling protocol for future refactoring
if not agent.function_calling_llm: # type: ignore # "BaseAgent" has no attribute "function_calling_llm"
agent.function_calling_llm = self.function_calling_llm # type: ignore # "BaseAgent" has no attribute "function_calling_llm"
if not agent.step_callback: # type: ignore # "BaseAgent" has no attribute "step_callback"
agent.step_callback = self.step_callback # type: ignore # "BaseAgent" has no attribute "step_callback"
agent.create_agent_executor() To improve |
If you decide to implement this approach, I recommend building it on top of FastStream. This library simplifies integration with various message brokers, reducing the complexity typically associated with managing them. However, keep in mind that some setup and handling will still be required for specific brokers. For instance, with Kafka, you’ll need to implement configurations such as creating topics and partitions to ensure the system operates efficiently and is production-ready. I’d be happy to assist with this issue and contribute to making Crew AI more scalable! |
Hi @alm0ra, Usually major usage I have seen is where the output of one of the agent is input for another one, therefore Sequential is essential. If you have more of a general usecase, where there is no flow for the entire process, kickoff() can be ran async Refer to this documentation |
@Vidit-Ostwal “The output of one agent serves as the input for another, making sequential execution essential.” Now, imagine having multiple agents—for example, five. The process starts with the first agent, and in the worst-case scenario, all agents execute sequentially. This means that until the fifth agent completes its task, new requests cannot be processed because the first agent remains unavailable. Now, extend this scenario to a production workflow involving more than ten agents. The bottleneck becomes even more pronounced. However, if agents communicate asynchronously via messages through a broker, this limitation could be addressed efficiently. |
@alm0ra, now I understand the issue, atmost only one agent would be working at a time, or two depending whether they require each other or not, but meanwhile, till the entire things does not complete, we can not process any other request from production side. Let me know if you making a PR for this, I would like to contribute on this along with you, if you don't mind. |
The implementation of this feature ultimately depends on the maintainers of Crew AI and their decisions and plans for the future of the package. |
@alm0ra yep yep, i understand that, I am currently facing the same problem, where latency becomes an issue, when multiple hits are in the API. What you have proposed, partially solves my problem. And therefore I believe this kind of latency solving bug / feature request will surely come at a point and maintainers have to think about that at one point of time. The only question is how are they willing to approach the problem, with Kafka or something else, it's upon them only. |
Description
I have been researching how Crew AI addresses scalability issues for multi-agent problems but couldn’t find any detailed information or documentation on this topic. Additionally, I’ve come across discussions where people suggest that Crew AI may not be scalable in handling multi-agent scenarios effectively.
Steps to Reproduce
Expected behavior
Screenshots/Code snippets
Operating System
macOS Sonoma
Python Version
3.12
crewAI Version
0.98.0
crewAI Tools Version
1
Virtual Environment
Venv
Evidence
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: