π€ Ollama_Agents: Your Advanced AI Assistant Builder with Graph Knowledgebase π
September 8, 2024 Β· View on GitHub
Welcome to Ollama_Agents! This repository allows you to create sophisticated AI agents using Ollama, featuring a unique graph-based knowledgebase. It's like having a high-tech AI laboratory with a built-in brain! π§ β¨
π What's New?
- πΈοΈ Graph-based Knowledgebase: A novel approach using JSON for flexible, relational knowledge storage
- π§ Enhanced Debug Agent with detailed cognitive processing visualization
- π³ Dynamic Knowledge Tree generation and management
- π Improved memory search and context management
- π§ Fact-checking and source credibility assessment
- π Multi-agent system with easy switching between agents
- π Interactive follow-up question handling
- π¨ Rich, colorful command-line interface with progress tracking
- π οΈ Modular design with improved error handling and logging
π₯οΈ Development Environment
This project is being developed on an M1 Mac Mini with 16GB of RAM, ensuring optimal performance for AI agent creation and testing.
π Key Features
- π Graph Knowledgebase: Utilizes a JSON-based graph structure for flexible and relational knowledge representation
- π Modular Architecture: Each function is in a separate module for easy customization and extension
- π¬ Interactive CLI: Built with
richfor a cinematic experience! - π Secure Configuration: Customize your AI's personality and behavior in
config.py - π§ͺ Comprehensive Testing: Because quality is our superpower!
- π Web Search Integration: Your AI can search the web using DuckDuckGo
- π Advanced Chat History: Never forget a conversation with built-in history management and analysis
- π§ Sophisticated Memory Search: Quickly retrieve and utilize relevant information from past interactions and uploaded documents
- π§΅ Fabric Integration: Use Fabric patterns for enhanced AI interactions
- π Multi-Agent System: Interact with multiple AI personalities in one session
- π€ Debug Mode: Visualize the agent's thought process and decision-making in real-time
- π³ Knowledge Tree: Dynamic generation and visualization of knowledge structures
- π§ Fact-Checking: Verify information and assess source credibility
- π€ User Profiling: Adapt responses based on user expertise and interests
π‘ Why JSON-based Graph Knowledgebase?
Our unique approach of using a JSON-based graph structure for the knowledgebase offers several advantages:
- π Flexibility: Easily adapt and evolve the knowledge structure as your AI learns
- π Rich Relationships: Capture complex relationships between concepts more intuitively than in traditional vector databases
- π Performance: Efficient querying and updating of interconnected information
- π§© Simplicity: No need for complex vector database setups or maintenance
- π¦ Portability: JSON format allows for easy data transfer and backup
- π Interpretability: Graph structure provides clear visibility into the AI's knowledge connections
This approach allows Ollama_Agents to have a more nuanced and context-aware understanding, leading to more intelligent and adaptive responses.
π οΈ Getting Started
Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
- Git
- Ollama
Setting Up the Environment
-
Clone this repository:
git clone https://github.com/yourusername/Ollama_Agents.git cd Ollama_Agents -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install dependencies:
pip install -r requirements.txt -
Set up your PYTHONPATH:
export PYTHONPATH=/path/to/your/Ollama_Agents:$PYTHONPATH
Installing Ollama
-
Visit the Ollama website and follow the installation instructions for your operating system.
-
Once installed, run Ollama and download a model (e.g., llama2:latest):
ollama run llama2:latest
Configuration
-
Customize your AI in
config.py. -
Set up your API keys and other configurations in a
.envfile (use.env.exampleas a template).
Running the Application
Run the main script:
python -m src.main
π Module Documentation
Detailed documentation for each module can be found in the docs/ directory. This includes information on both standard and advanced (adv_) modules:
Core Modules
Advanced (adv_) Modules
- Advanced Input Processor
- Advanced Context Manager
- Advanced Reasoning Engine
- Advanced Planning Engine
- Advanced Knowledge Manager
- Advanced Output Manager
Agent and Knowledge Management
System Architecture and Configuration
Memory and History
Utility and Logging
User Guides
π§ Debug Agent Commands
/help: Show available commands/search <query>: Perform an interactive web search/context: Show current context/clear_context: Clear the current context and bullet points/bullets: Display current bullet points/knowledge_tree: Display the knowledge tree/explain <concept>: Get an explanation of a concept/fact_check <statement>: Perform a fact check on a statement/profile: Display your user profile
π€ Contributing
Got ideas? We love them! π‘ Submit a pull request or open an issue. Let's build the future of AI together!
π License
This project is licensed under the MIT License. See LICENSE for details.
Built with β€οΈ and π§ by the Ollama_Agents team. Let's revolutionize AI knowledge representation! π