Inspiration

Not long after the release of generative AI models like ChatGPT and Gemini, I listened to an online lecture given by a professor who illustrated the concept of agentic frameworks and how these could be applied by the AI industry in the future. I thought this would be a good opportunity to execute that idea.

What it does

Imagine the capability of one generative AI model. Already you can imagine some pretty big things. Now imagine what you could do with a dozen!

HiveMind capitalizes on model uniqueness and uses the best of what can be offered by any given AI model. Right now, GPT-4 is well known for general purpose text generation. Llama 3 for fine-tuning. Claude 3 for document analysis, and the list goes on. HiveMind brings all of their best qualities together into a single integrated, collaborative AI environment

Why Agentic Collaboration?

  • Asynchronous Workflow, lets agents go off and do their own thing!
  • Brings the best of what each model has to offer
  • Refined output, since each agent re-evaluates the results of other agents.

How it was built

I used React.js and ChakraUI to build out the frontend, separating the dashboard into the main components (chatlog, homepage, filesystem, etc). The backend is hosted on Node.js and takes care of agentic instantiation with Gemini API and Socket.io.

Challenges I ran into

I ran into the issue of having a synchronized file system that all AI agents have real-time access to. For the most part it was a struggle with enabling each agent to add, edit, and save files because the API doesn't inherently produce files. My solution was to add a custom command that each agent could execute in their text-based response in order to trigger a file save, specifically by responding with SAVE(file_name, file_type):file_text. This ended up working better than expected.

Accomplishments that I'm proud of

I have been able to create user-agent and agent-agent communication working in a seamless way that allows for very natural conversational progression. Honestly very cool to see the agents getting to work and allowing me to go hands-off.

What I've learned

AI contextualization in such a huge environment was way more difficult than I thought, since I had to ensure that each agent acknowledged system prompts, their own custom personality prompts, and previous chat history all in one. I've also learned a lot about dealing with the backend and API communication.

What's next for HiveMind

I will definitely continue this project and build it out further. Agentic workflows are super interesting to me and I'd like to add more features in the future. Currently thinking about agentic decision making and somehow solving discrepancies between models. Perhaps by making some sort of a voting system for agents.

Share this project:

Updates