A decentralized multi-agent system designed for collaborative problem-solving, featuring specialized agents working together through a graph-based communication structure. We approach the problem of reproducibility of agentic conversations through our system by breaking down chain of thought through specialized instances of AI agents. We then perform a union find on extremely similar queries in order to create virtual nodes, which store multiple pathways for similar queries. Using CrossEncoder from sentence transformers we are able to rank nodes on a level by level basis to produce favourable nodes on each level. The connection of favourable levels in each level forms the critical path in the network of conversations.
- Provide cachable solutions to commonly asked questions
- Comparing adversarial patterns to a golden set for the initial query
- Reinforcement Learning - utilizing conversation pathways for model optimization
The system consists of three main components:
-
Chief Agent: System orchestrator
- Implementation details in
src/multiagent.py
- Core routing and coordination logic
- Implementation details in
-
Specialized Agents: Research, Coding, and Critic agents
- Individual agent implementations in respective modules
- See
src/multiagent.py
for agent interfaces
-
Graphs: Communication optimization
- Graph structures in
graphs/conversation_graph.py
- Virtual node implementation in
src/slime_mold.py
- Graph structures in
-
Base Agent Framework: Foundation for all agent types
- See
src/multiagent.py
for implementation - Includes agent state management and messaging system
- See
-
Response System: Manages agent interactions through Graphs
- Graph-based routing implemented in
graphs/conversation_graph.py
- Message handling and routing logic
- Graph-based routing implemented in
-
Solution Architecture: Stores and retrieves solution patterns
- Virtual node implementation in
src/slime_mold.py
- Union-find clustering for similar queries
- Virtual node implementation in
-
Safety Framework: Comprehensive security measures
- Implementation in
src/safetyframework.py
- Pattern detection and content filtering
- Implementation in
Test implementations are available in the tests
directory:
tests/test_conversation.py
: Conversation graph teststests/test_slime_mold.py
: Test fixtures and utilities
Detailed documentation:
The system includes comprehensive safety features (see src/safetyframework.py
):
- Adversarial pattern detection
- Harmful content filtering
- Manipulation pattern recognition
- Privacy protection mechanisms
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Inspired by Physarum polycephalum behavior
- Built with networkx, LangChain and Sentence Transformers
Would you like me to add any additional sections or make any modifications?
For detailed implementation of specific components, please refer to:
MultiAgent System: src/multiagent.py Safety Framework: src/safetyframework.py Slime Mold Algorithm: src/slime_mold.py Conversation Graphs: graphs/conversation_graph.py
- Syntactic Code Understanding
- Code Equivalence Detection