Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
GitHub tool allows you to search repositories, manage issues, and interact with GitHub’s API.
Installation
pip install "praisonai[tools]"
Environment Variables
export GITHUB_TOKEN=your_personal_access_token
Get your token from GitHub Settings.
Quick Start
from praisonai_tools import GitHubTool
# Initialize
github = GitHubTool()
# Search repos
results = github.search_repos("machine learning python")
print(results)
Usage with Agent
from praisonaiagents import Agent
from praisonai_tools import GitHubTool
agent = Agent(
name="DevAssistant",
instructions="You help with GitHub tasks.",
tools=[GitHubTool()]
)
response = agent.chat("Find popular Python AI frameworks on GitHub")
print(response)
Available Methods
search_repos(query, limit=10)
Search GitHub repositories.
from praisonai_tools import GitHubTool
github = GitHubTool()
repos = github.search_repos("langchain", limit=5)
get_repo(owner, repo)
Get repository details.
repo = github.get_repo("MervinPraison", "PraisonAI")
list_issues(owner, repo, state=“open”)
List repository issues.
issues = github.list_issues("MervinPraison", "PraisonAI", state="open")
create_issue(owner, repo, title, body)
Create a new issue.
github.create_issue("owner", "repo", "Bug: Something broken", "Description here")
Common Errors
| Error | Cause | Solution |
|---|
GITHUB_TOKEN not configured | Missing token | Set environment variable |
Rate limited | Too many requests | Use authenticated requests |
Not found | Repo doesn’t exist | Check owner/repo name |