Spaces:
Sleeping
title: Package Conflict Identifier
emoji: π¦
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
Package Conflict Identifier π¦π
Use "git" for accessing git and "origin" for accessing the hugging face spaces
git push git main , git push origin main
AI-powered package conflict identifier and resolver using Google's Agent Development Kit (ADK). It leverages a multi-agent architecture with Google Gemini and OpenRouter (Grok) models to diagnose dependency issues, research solutions, and generate fixed configuration files.
π― Features
π€ Advanced Multi-Agent Architecture:
- Context Search Agent: Retrieves insights from past sessions using Pinecone vector memory.
- Parallel Research Team: Concurrent searching of Official Docs and Community forums.
- Web Crawl Agent: Uses Firecrawl (via OpenRouter) for deep web scraping of documentation.
- Code Surgeon: Generates and validates
requirements.txtfixes.
π§ Hybrid Model Intelligence:
- Google Gemini 2.0 Flash Lite: For high-speed reasoning and orchestration.
- Grok 4.1 Fast (via OpenRouter): For specialized web crawling and context analysis.
π Model Context Protocol (MCP) Server:
- Exposes the agent's capabilities as a standard MCP tool (
solve_dependency_issue). - Connects seamlessly to MCP clients like Claude Desktop or other AI assistants.
- Exposes the agent's capabilities as a standard MCP tool (
πΎ Persistent Memory:
- Short-Term: SQLite/PostgreSQL session storage.
- Long-Term: Pinecone Vector Database for recalling past solutions.
π οΈ Intelligent Tooling:
retrieve_memory: Semantic search of previous conversations.google_search: Live web search.firecrawl: Advanced web scraping.
π Project Structure
package_conflict_resolver/
βββ .env # Environment variables (API Keys)
βββ requirements.txt # Dependencies
βββ main.py # CLI Entry Point
βββ src/
β βββ combined_server.py # Combined ADK Web UI + MCP Server
β βββ config.py # Configuration & Service Initialization
β βββ tools.py # Custom Tools (Search, Memory, Validation)
β βββ agents.py # Agent Definitions & Workflow
β βββ utils.py # Logging & Helpers
βββ ...
βββ src/
β βββ combined_server.py # Combined ADK Web UI + MCP Server
β βββ config.py # Configuration & Service Initialization
β βββ tools.py # Custom Tools (Search, Memory, Validation)
β βββ agents.py # Agent Definitions & Workflow
β βββ utils.py # Logging & Helpers
βββ ...
ποΈ Architecture
High-level architecture of the Package Conflict Identifier Agent
π Quick Start
1. Clone & Install
git clone <your-repo-url>
cd package_conflict_resolver
pip install -r requirements.txt
2. Configure Environment
Create a .env file with your API keys:
GOOGLE_API_KEY=your_gemini_key
OPENROUTER_API_KEY=your_openrouter_key
PINECONE_API_KEY=your_pinecone_key
DATABASE_URL=sqlite+aiosqlite:///legacy_solver.db
3. Run the Agent
Option A: Combined Server (Web UI + MCP) - Recommended This runs both the ADK Developer UI and the MCP Server on the same port.
python -m src.combined_server
- Web UI: http://localhost:7860/dev-ui/
- MCP SSE Endpoint: http://localhost:7860/mcp/sse
Option B: CLI Mode Option A: Combined Server (Web UI + MCP) - Recommended This runs both the ADK Developer UI and the MCP Server on the same port.
python -m src.combined_server
- Web UI: http://localhost:7860/dev-ui/
- MCP SSE Endpoint: http://localhost:7860/mcp/sse
Option B: CLI Mode
python main.py
π MCP Server Integration
This agent is deployed as an MCP server, allowing you to use its dependency solving capabilities directly from other AI tools.
Public Endpoint (Hugging Face Spaces)
- SSE URL:
https://yash030-ai-package-doctor.hf.space/mcp/sse
Usage with Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"AI Package Doctor": {
"command": "",
"url": "https://yash030-ai-package-doctor.hf.space/mcp/sse",
"transport": "sse"
}
}
}
Once connected, you can ask Claude:
"I have a conflict between numpy 1.26.4 and tensorflow 2.10.0. Can you help me fix it?"
Claude will use the solve_dependency_issue tool to analyze the problem using the full power of the agentic workflow.
π MCP Server Integration
This agent is deployed as an MCP server, allowing you to use its dependency solving capabilities directly from other AI tools.
Public Endpoint (Hugging Face Spaces)
- SSE URL:
https://yash030-ai-package-doctor.hf.space/mcp/sse
Usage with Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"AI Package Doctor": {
"command": "",
"url": "https://yash030-ai-package-doctor.hf.space/mcp/sse",
"transport": "sse"
}
}
}
Once connected, you can ask Claude:
"I have a conflict between numpy 1.26.4 and tensorflow 2.10.0. Can you help me fix it?"
Claude will use the solve_dependency_issue tool to analyze the problem using the full power of the agentic workflow.
π€ Agent Workflow
Query Creator Agent:
- Analyzes the user's error message.
- Uses
retrieve_memoryto check if this issue was solved before. - Generates search queries for the research team.
Context Search Agent:
- Specifically looks for relevant context in the project's long-term memory.
Parallel Research Team:
- Docs Search Agent: Searches official documentation.
- Community Search Agent: Searches StackOverflow/GitHub.
- Web Crawl Agent: Deep crawls specific documentation pages using Firecrawl.
Code Surgeon:
- Synthesizes all gathered information.
- Generates a corrected
requirements.txtor solution plan.
βοΈ Deployment & Persistence
Hugging Face Spaces
The project is configured to run on Hugging Face Spaces (Docker SDK).
- Dockerfile: Included in the root.
- Port: Exposes port
7860. - Storage: Uses
/datadirectory for persistent storage (if configured with persistent volume).
Hugging Face Spaces
The project is configured to run on Hugging Face Spaces (Docker SDK).
- Dockerfile: Included in the root.
- Port: Exposes port
7860. - Storage: Uses
/datadirectory for persistent storage (if configured with persistent volume).
Database
For production (e.g., Hugging Face Spaces), use a PostgreSQL database:
DATABASE_URL=postgresql+asyncpg://user:password@host/dbname
Long-Term Memory (Pinecone)
To enable persistent memory across restarts:
- Get a free API key from Pinecone.io.
- Set
PINECONE_API_KEYin.env. - The agent will automatically index and retrieve past sessions.
π License
MIT License.
π Credits
Built with: