A Svelte and FastAPI chat app that lets you ask questions about a GitHub repository or uploaded source folder, using online or local LLMs.
JetXu-LLM/llama-github
A Python library that retrieves relevant code, issues and repository info from GitHub for LLM chatbots and AI coding agents via agentic RAG.
- Stars
- 289
- Forks
- 22
- Open issues
- 10
- Last commit
- 3 months ago
What is it?
llama-github is a Python library that lets LLM chatbots, AI agents and automated development tools pull context from GitHub public projects for a coding question. Given a query, it selects candidate repositories, searches them, and turns the matching code snippets, issues and repository information into a knowledge context that a language model can use.
The library caches repository contents, including READMEs, structures, code and issues, across threads to reduce GitHub API usage on repeated lookups. It uses LLMs to analyze questions and build search criteria, supports both personal access tokens and GitHub App authentication, and can work with LangChain-compatible chat models and Jina embedding or reranking models. Its main entry point is the GithubRAG class with a retrieve_context method that returns a list of dictionaries containing at least a url and context.
The package targets Python 3.10 through 3.14 and is distributed on PyPI under the Apache-2.0 license.
Key features
- 01Retrieves code snippets, issues and repository information from GitHub based on a natural-language query.
- 02Caches repository contents across threads to reduce GitHub API token consumption.
- 03Uses LLMs to analyze questions and generate search strategies.
- 04Supports personal access tokens and GitHub App authentication.
- 05Works with LangChain-compatible chat models and Jina embedding or reranking models.
- 06Provides asynchronous processing for concurrent requests.
Use cases
- Adding GitHub-sourced code examples as context to a coding chatbot.
- Giving an autonomous coding agent relevant references from existing open-source projects.
- Building automated development workflows that need issue or pull request context from GitHub.
Quick start
- 1
Install the library from PyPI
pip install llama-github - 2
Initialize GithubRAG with your GitHub token and call retrieve_context with a query (see the usage example in the README)
Things to know
- Requires a GitHub access token and an OpenAI API key unless you use Simple Mode.
- Optional Jina API key is needed for high-concurrency production use.
In collections
Topics
FAQ
- What is llama-github?
- A Python library that retrieves relevant code, issues and repository info from GitHub for LLM chatbots and AI coding agents via agentic RAG. llama-github is a Python library that lets LLM chatbots, AI agents and automated development tools pull context from GitHub public projects for a coding question. Given a query, it selects candidate repositories, searches them, and turns the matching code snippets, issues and repository information into a knowledge context that a language model can use.
- Is llama-github free to use? What license does it have?
- llama-github is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is llama-github still maintained?
- Updated within 6 months. The last commit to llama-github was on Aug 12, 2026.
- What can I use llama-github for?
- Adding GitHub-sourced code examples as context to a coding chatbot. Giving an autonomous coding agent relevant references from existing open-source projects. Building automated development workflows that need issue or pull request context from GitHub.
- How do I install llama-github?
- Install the library from PyPI: pip install llama-github Initialize GithubRAG with your GitHub token and call retrieve_context with a query (see the usage example in the README)
- Where can I get llama-github?
- The source code and installation instructions are on GitHub: https://github.com/JetXu-LLM/llama-github
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A documentation assistant agent that answers questions about LangChain, LangGraph, and LangSmith, built as a Managed Deep Agent with a Next.js chat UI.
Open-source platform for building enterprise-grade AI agents, with RAG knowledge bases, visual workflows and MCP tool use.
Open-source AIaaS platform for building RAG, agent, and visual-logic AI projects and exposing them through a REST API with a built-in web UI.
An open-source .NET framework for building multi-agent AI applications that connect LLMs to business systems.
A secure, lightweight Rust-based personal AI agent framework running across chat channels like Telegram, Discord, Slack and WhatsApp.