Use Github with AI Agents

A platform for version control and collaboration, allowing you to work together on projects from anywhere.
🔗 Connect and Use Github
1. 🔑 Connect your Github account
2. ✅ Select an action
3. 🚀 Go live with the agent
What do you want to do?
Actions
meta
security-advisories
apps
classroom
codes-of-conduct
emojis
dependabot
secret-scanning
activity
gists
gitignore
issues
licenses
markdown
orgs
actions
oidc
code-scanning
codespaces
copilot
packages
interactions
migrations
projects
repos
billing
teams
reactions
rate-limit
checks
dependency-graph
git
pulls
search
users
Main

API actions for Github for AI assitants/agents

Language
JS
PYTHON

Meta

Github Api Root

Get Hypermedia links to resources accessible in GitHub's REST API
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GITHUB_API_ROOT])

Meta Root

Get Hypermedia links to resources accessible in GitHub's REST API<<DEPRECATED use github_api_root>>
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_META_ROOT])

Security-advisories

List Global Security Advisories

The text describes how to find global security advisories with specific parameters. By default, it excludes malware advisories, which can be included by setting the `type` parameter to `malwar
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GLOBAL_SECURITY_ADVISORIES])

Security Advisories List Global Advisories

The text describes how to find global security advisories with specific parameters. By default, it excludes malware advisories, which can be included by setting the `type` parameter to `malwar
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_SECURITY_ADVISORIES_LIST_GLOBAL_ADVISORIES])

Get A Global Security Advisory

Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GLOBAL_SECURITY_ADVISORY])

Apps

Create A Github App From A Manifest

This endpoint is for the handshake in the GitHub App Manifest flow, allowing retrieval of app `id`, `pem` (private key), and `webhook_secret` with a temporary `code` after app creation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_GITHUB_APP_FROM_A_MANIFEST])

List Installation Requests For The Authenticated App

Lists all the pending installation requests for the authenticated GitHub App.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_INSTALLATION_REQUESTS_FOR_THE_AUTHENTICATED_APP])

Delete An App Authorization

OAuth and GitHub app owners can revoke user grants with Basic Authentication, using `client_id` and `client_secret`, along with a valid `access_token`. This action deletes all OAuth tokens and
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_APP_AUTHORIZATION])

Check A Token

This API method enables OAuth/GitHub apps to verify token validity without facing login rate limits, using Basic Authentication with client_id and client_secret. Invalid tokens return a 404 NO
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CHECK_A_TOKEN])

Reset A Token

This API method lets OAuth and GitHub apps auto-reset valid OAuth tokens. Apps must save the "token" from the response. Basic Authentication with app credentials is needed. Invalid tokens retu
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_RESET_A_TOKEN])

Delete An App Token

Owners of OAuth or GitHub apps can revoke a specific token using Basic Authentication with the app's `client_id` and `client_secret`.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_APP_TOKEN])

Create A Scoped Access Token

Create a repo or permission-scoped token using a non-scoped token, specifying accessible repositories and permissions. Invalid tokens yield a 404 error. Use Basic Authentication with the GitHu
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_SCOPED_ACCESS_TOKEN])

Get An App

**Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_APP])

Classroom

Get An Assignment

Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ASSIGNMENT])

List Accepted Assignments For An Assignment

Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ACCEPTED_ASSIGNMENTS_FOR_AN_ASSIGNMENT])

Get Assignment Grades

Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_ASSIGNMENT_GRADES])

List Classrooms

Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_CLASSROOMS])

Get A Classroom

Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_CLASSROOM])

List Assignments For A Classroom

Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ASSIGNMENTS_FOR_A_CLASSROOM])

Codes-of-conduct

Get All Codes Of Conduct

Returns array of all GitHub's codes of conduct.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_ALL_CODES_OF_CONDUCT])

Get A Code Of Conduct

Returns information about the specified GitHub code of conduct.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_CODE_OF_CONDUCT])

Emojis

Get Emojis

Lists all the emojis available to use on GitHub.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_EMOJIS])

Emo J Is Get

Lists all the emojis available to use on GitHub.<<DEPRECATED use get_emojis>>
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_EMO_J_IS_GET])

Dependabot

List Dependabot Alerts For An Enterprise

The endpoint lists Dependabot alerts for enterprise-owned repositories, accessible only to enterprise members who are organization owners or security managers. OAuth tokens require `repo` or `
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DEPENDABOT_ALERTS_FOR_AN_ENTERPRISE])

Secret-scanning

List Secret Scanning Alerts For An Enterprise

This endpoint provides secret scanning alerts for enterprise repositories, focusing on new alerts in organizations where the user holds ownership or security management roles. Access requires
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_SECRET_SCANNING_ALERTS_FOR_AN_ENTERPRISE])

Activity

List Public Events

We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_PUBLIC_EVENTS])

Get Feeds

GitHub offers authenticated users feeds like public/private timelines, user/organization timelines, & security advisories in JSON/Atom formats. Private feeds need Basic Auth.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_FEEDS])

Gists

List Gists For The Authenticated User

Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GISTS_FOR_THE_AUTHENTICATED_USER])

Create A Gist

Allows you to add a new gist with one or more files. **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses intern
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_GIST])

Gist S Create

Allows you to add a new gist with one or more files. **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses intern
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GIST_S_CREATE])

List Public Gists

Public gists can be listed from most to least recently updated, with pagination allowing up to 3000 gists retrieval, e.g., 100 pages of 30 gists or 30 pages of 100 gists.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_PUBLIC_GISTS])

Gist S List Public

Public gists can be listed from most to least recently updated, with pagination allowing up to 3000 gists retrieval, e.g., 100 pages of 30 gists or 30 pages of 100 gists.<<DEPRECATED use list_
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GIST_S_LIST_PUBLIC])

List Starred Gists

List the authenticated user's starred gists:
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_STARRED_GISTS])

Get A Gist

This endpoint fetches a gist with options for raw markdown (default) or base64-encoded content, supporting custom media types detailed at GitHub docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GIST])

Update A Gist

Edit a gist by updating its description or files, where unchanged files remain as is. Editing requires at least a description or file change. Supports media types for raw or base64-encoded con
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_GIST])

Delete A Gist

This endpoint deletes a gist using its ID. It returns a 204 on success and error statuses like 404, 304, or 403 for issues. More info at GitHub docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_GIST])

List Gist Comments

This API endpoint lists gist comments, supporting media types for raw markdown (default) or base64-encoded contents for handling invalid UTF-8 sequences. For more, see GitHub's media types doc
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GIST_COMMENTS])

Create A Gist Comment

This endpoint allows comments on gists and supports media types for raw markdown or base64-encoded content. See GitHub's "Media types" for more info.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_GIST_COMMENT])

Get A Gist Comment

This endpoint lets you comment on a gist with options for media types: raw markdown (default) and base64-encoded content. For more, visit GitHub's media types documentation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GIST_COMMENT])

Update A Gist Comment

This endpoint allows updating a gist comment and supports two custom media types: `application/vnd.github.raw+json` for raw markdown (default), and `application/vnd.github.base64+json` for bas
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_GIST_COMMENT])

Delete A Gist Comment

To delete a gist comment, use the gist and comment IDs. Possible responses: 204 (deleted), 304 (not modified), 404 (not found), 403 (forbidden). Details at GitHub API docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_GIST_COMMENT])

List Gist Commits

This endpoint fetches a list of gist commits using `gist_id`, offering pagination via `per_page` & `page`. It provides details like commit URL, version, user info, and date. Check the document
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GIST_COMMITS])

List Gist Forks

This endpoint lists all forks of a specified gist (`gist_id`), supporting pagination via `per_page` and `page`. It returns gist forks with user info and metadata. For more, see GitHub's Docume
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GIST_FORKS])

Fork A Gist

Forks a GitHub gist using its ID, returns forked gist details in JSON with a 201 status for success. Requires `gist_id`. See documentation for more.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_FORK_A_GIST])

Check If A Gist Is Starred

This endpoint determines if a gist is starred by ID, returning 204 if yes, 404 if not found, 304 if unchanged, and 403 if access is denied. More information is available in the GitHub docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CHECK_IF_A_GIST_IS_STARRED])

Star A Gist

Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_STAR_A_GIST])

Unstar A Gist

Endpoint supports un-starring a gist via DELETE method, providing responses for success (204), not modified (304), not found (404), and forbidden (403). More details at GitHub docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UNSTAR_A_GIST])

Get A Gist Revision

This endpoint fetches a specific gist revision, supporting custom media types for raw markdown or base64-encoded content. For details, see GitHub's media types documentation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GIST_REVISION])

Gitignore

Get All Gitignore Templates

List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user).
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_ALL_GITIGNORE_TEMPLATES])

Get A Gitignore Template

This endpoint retrieves the contents of a .gitignore template, supporting custom media types including `application/vnd.github.raw+json` for raw content. More on media types at GitHub docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GITIGNORE_TEMPLATE])

Frequently asked questions

What is Composio.dev?

Composio.dev is a platform for building AI applications, designed to make the process of developing AI solutions super easy and fun! It provides a comprehensive set of tools and libraries that simplify the process of developing AI solutions, allowing you to focus on the creative aspects of your project without getting bogged down by the technical details.

How does Composio.dev support Github?

Composio.dev seamlessly integrates with Github, allowing you to leverage its capabilities within the Composio.dev platform. You can utilize Github to call functions across various platforms, including Google, GitHub, and others, making it a breeze to incorporate different services into your AI applications. Additionally, it supports user authentication via OAuth2 and can work in conjunction with other popular frameworks like LangChain and CrewAI, giving you the flexibility to build truly innovative AI solutions.

What models can I use with Github?

With Github, you have access to a wide range of state-of-the-art language models, including GPT-4o (OpenAI), GPT-3.5 (OpenAI), GPT-4 (OpenAI), Claude (Anthropic), PaLM (Google), LLaMA and LLaMA 2 (Meta), Gemini, and many others. This flexibility allows you to choose the model that best suits your specific use case, whether you're building a chatbot, a content creation tool, or any other AI-powered application. You can experiment with different models and find the one that delivers the best performance for your project.

How can I integrate Github into my project?

Composio.dev provides a seamless integration for Github, making it super easy to incorporate this powerful framework into your projects. You can leverage the Composio.dev API to call functions from Github, allowing you to tap into its capabilities with just a few lines of code. The SDK is available in Python, JavaScript, and TypeScript, so you can work with your preferred programming language and integrate Github into your projects seamlessly.

What is the pricing for Github?

Github is completely free to use, with a generous free tier that allows up to 1000 requests per month. This makes it accessible for developers and organizations of all sizes to explore and experiment with this powerful tool without any upfront costs. Whether you're a student working on a personal project or a startup building the next big thing, you can get started with Github without worrying about breaking the bank.

What kind of authentication is supported for Github?

Github supports OAuth2 authentication, ensuring secure and authorized access to its functionalities. You can leverage the Composio.dev API to handle authentication and call functions from Github seamlessly. The SDK is available in Python, JavaScript, and TypeScript for your convenience, making it easy to integrate authentication into your projects and keep your users' data safe and secure.

Can I add Github to my project?

Absolutely! You can easily incorporate Github into your project by utilizing the Composio.dev API. This API allows you to call functions from Github, enabling you to leverage its capabilities within your application. The SDK is available in Python, JavaScript, and TypeScript to facilitate integration, so you can work with the language you're most comfortable with and add Github to your project with ease.

What is the accuracy of Github?

Github is designed to provide highly accurate and reliable results, ensuring that your AI applications perform at their best. The integration with Composio.dev ensures precise function calls, enabling you to build robust and powerful AI applications with confidence. Github's comprehensive framework and the ability to leverage state-of-the-art models ensure reliable and accurate outcomes for your AI development needs, whether you're working on a chatbot, a content creation tool, or any other AI-powered project.

What are some common use cases for Github?

Github can be used for a wide range of AI applications, making it a versatile tool for developers and creators alike. Some common use cases include natural language processing, text generation, question answering, sentiment analysis, and more. It's particularly useful for building chatbots, virtual assistants, content creation tools, and other AI-powered applications that can help you automate tasks, engage with users, and create compelling content. Whether you're working on a personal project or building a product for your startup, Github can help you bring your ideas to life.

How does Github handle data privacy and security?

Data privacy and security are crucial considerations when working with AI systems, and Github takes these issues seriously. It follows industry best practices and adheres to strict data protection regulations, ensuring that your data is kept safe and secure. Github provides robust security measures, such as encryption and access controls, to ensure the confidentiality and integrity of your data. You can rest assured that your sensitive information is protected when using Github for your AI development needs.
+ Integrate seamlessly with your agentic frameworks
Composio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and Sizes
Building for AI across continents🧪