https://github.com/seehiong/ai-knowledge-assistant
AI knowledge assistant using multi-agent processing with context-aware analysis
https://github.com/seehiong/ai-knowledge-assistant
Last synced: about 18 hours ago
JSON representation
AI knowledge assistant using multi-agent processing with context-aware analysis
- Host: GitHub
- URL: https://github.com/seehiong/ai-knowledge-assistant
- Owner: seehiong
- Created: 2024-11-24T13:01:18.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-24T13:42:53.000Z (11 months ago)
- Last Synced: 2025-04-09T14:06:27.099Z (6 months ago)
- Language: Python
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Knowledge Assistant
An intelligent multi-agent system for processing and querying personal knowledge bases. Built with LangChain, LangGraph, and Ollama, it uses Retrieval-Augmented Generation (RAG) to provide contextual and accurate responses.
## 🚀 Features
- **Multi-Agent Intelligence**
- Specialized agents for retrieval, research, writing, and critique
- State preservation between agent interactions
- Detailed logging and debugging capabilities
- Contextual query understanding- **Modern Web Interface**
- Full-viewport responsive design
- Collapsible agent reasoning sections
- Real-time markdown rendering
- Interactive chat experience
- Loading animations and error handling- **Knowledge Processing**
- Vector-based document storage with ChromaDB
- Support for PDF document ingestion
- Metadata-rich document handling
- Contextual retrieval system## 🛠️ Technical Stack
### Backend
- Python 3.10+
- LangChain & LangGraph for agent orchestration
- Ollama for local LLM inference
- ChromaDB for vector storage
- FastAPI for API endpoints
- Unstructured for document processing### Frontend
- HTML5 & Modern CSS
- Vanilla JavaScript
- Marked.js for markdown rendering
- Responsive Flexbox layout## 🚦 Getting Started
1. **Set Up Python Environment**
```bash
# Create a virtual environment
python3 -m venv .venv# Activate the virtual environment
# On Windows
.venv\Scripts\activate
# On Unix or MacOS
source .venv/bin/activate# Upgrade pip
python3 -m pip install --upgrade pip
```2. **Install Dependencies**
```bash
# Install all required packages
pip install -r requirements.txt
```3. **Configure Environment**
Create a `.env` file with:
```env
OLLAMA_BASE_URL="http://host.docker.internal:11434"
OLLAMA_MODEL="llama3"
```4. **Start the Assistant**
```bash
uvicorn api:app --reload
```5. **Access the Interface**
Open `http://localhost:8000` in your browser to start interacting with your AI Knowledge Assistant.## 📂 Project Structure
```
.
├── api.py # FastAPI endpoints
├── main.py # Agent workflow and chain
├── processor.py # Document processing
├── static/
│ └── index.html # Web interface
├── docs/ # Knowledge base storage
└── chroma_db/ # Vector store
```## 🤖 Agent Workflow
1. **Retriever Agent**
- Searches knowledge base for relevant information
- Returns context for further processing2. **Researcher Agent**
- Analyzes retrieved context
- Identifies key information and relationships3. **Writer Agent**
- Drafts comprehensive responses
- Incorporates context and analysis4. **Critic Agent**
- Reviews and refines responses
- Ensures accuracy and completeness## 💡 Usage
1. **Knowledge Base Setup**
- Place documents in the `docs` directory
- System automatically processes and indexes them2. **Interacting with the Assistant**
- Use the web interface to ask questions
- View detailed agent reasoning
- Get contextual, sourced responses## 🔒 Security Notes
- Environment variables for configuration
- Input validation on all endpoints
- Secure document handling
- Local LLM inference## 🚧 Known Limitations
- Requires pre-existing knowledge base
- Limited agent interaction flexibility
- Performance considerations with large documents## 📝 Future Enhancements
- Enhanced multi-format document support
- Advanced reasoning capabilities
- Dynamic agent role assignment
- Improved error recovery
- Comprehensive unit testing## 🤝 Contributing
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
## 📄 License
This project is licensed under the MIT License - see the LICENSE file for details.