A powerful multi-agent system built with Streamlit that provides three specialized AI agents for different tasks: Knowledge Processing, Code Analysis, and Code Review.
- Processes and answers questions based on provided PDF documents
- Uses advanced embeddings for accurate information retrieval
- Supports context-aware responses using the deepseek-r1 model
- Analyzes code quality and structure
- Provides detailed reports on:
- Code maintainability
- Performance considerations
- Best practices
- Potential improvements
- Performs comprehensive code reviews
- Identifies:
- Code quality issues
- Potential bugs
- Security concerns
- Performance bottlenecks
- Suggests specific improvements and fixes
- Python 3.8+
- Ollama with the following models:
- deepseek-r1
- nomic-embed-text
- Clone the repository:
git clone <repository-url>
cd <repository-name>- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
# Windows PowerShell
$env:OPENAI_BASE_URL="your-openai-base-url"
$env:OPENAI_API_KEY="your-openai-api-key"- Start the application:
streamlit run deepseek-rag-agents-ui.py-
Select an agent from the sidebar:
- Knowledge Agent: For querying PDF documents
- Code Analysis: For analyzing code quality
- Code Review: For detailed code reviews
-
Based on the selected agent:
- For Knowledge Agent: Type your question in the chat input
- For Code Analysis/Review: Paste your code in the text area and click the respective button
.
├── README.md
├── requirements.txt
├── deepseek-rag-agents-ui.py # Main Streamlit UI
├── knowledge_agent.py # Knowledge processing agent
├── code_analysis_agent.py # Code analysis agent
├── code_review_agent.py # Code review agent
├── code_analysis_docs.md # Documentation for code analysis
└── code_review_docs.md # Documentation for code review
Each agent can be configured through their respective files:
knowledge_agent.py: Configure PDF processing and knowledge base settingscode_analysis_agent.py: Customize code analysis parameterscode_review_agent.py: Adjust code review preferences
The application includes comprehensive error handling:
- Graceful handling of initialization errors
- Clear error messages for users
- Proper resource cleanup
- Timeout handling for long-running operations
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.