Skip to content

armgit / camel

Public Imported from GitHub
0

๐Ÿซ CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

2.4 KB
Raw Blame

๐Ÿค– GitHub Repo Chat Explorer

A Streamlit-based chat interface powered by CAMEL-AI and MCP (Model Context Protocol) that lets you conversationally explore any GitHub repository. Ask questions like "How many files?", "Show me the README contents", or follow-up queriesโ€”all in context of the chosen repo.


โœจ Features

  • Interactive Chat UI: Chat with your repository using Streamlit's chat components.
  • Dynamic Context: Set or change the GitHub repo URL in the sidebar to switch contexts on the fly.
  • Session Memory: Keeps your question-answer history until you change the repo.
  • Agent-Powered: Under the hood, a ChatAgent + MCPToolkit fetches and processes repo data.

๐Ÿ“ธ Screenshot

Repo Chat Explorer UI

A conversation where the user asks about the repo structure and README file.


๐Ÿ“‹ Prerequisites

  • Python >=3.10,<3.13
  • Node.js & npm (for MCP server plugin)
  • OpenAI API key in .env:
    export OPENAI_API_KEY="your_key_here"
    

๐Ÿ› ๏ธ Installation

  1. Clone the repo

    git clone https://github.com/your-org/your-repo.git
    cd your-repo/owl/community_usecase/gitingest
    
  2. Python environment

    python -m venv venv
    source venv/bin/activate      # macOS/Linux
    venv\\Scripts\\activate     # Windows
    pip install -r requirements.txt
    
  3. Install MCP plugin

    npm install -g @openbnb/mcp-server-git
    

โš™๏ธ Configuration

  • .env: Create in project root:
    OPENAI_API_KEY=your_key_here
    
  • mcp_servers_config.json: Next to app.py:
    {
      "mcpServers": {
        "gitingest": {
          "command": "npx",
          "args": ["-y", "@openbnb/mcp-server-git"]
        }
      }
    }
    

๐Ÿš€ Running the App

streamlit run app.py

Set the repo in the sidebar, then start chatting!


๐Ÿ”ง Customization

  • Tweak system prompts in st.chat_message calls.
  • Adjust temperature or model type in ModelFactory.create.
  • Style the UI via CSS in the header section.

๐Ÿ“‚ Project Structure

Gitingest/
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ logo_camel_ai.png
โ”‚   โ”œโ”€โ”€ logo_github.png
โ”‚   โ””โ”€โ”€ screenshot_chat.png
โ”œโ”€โ”€ mcp_servers_config.json
โ”œโ”€โ”€ app.py              # Main Streamlit chat app
โ”œโ”€โ”€ requirements.txt    # Python dependencies
โ””โ”€โ”€ .env                # Env vars


*Happy repo chatting!*