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

Users

Unfollow A User

OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UNFOLLOW_A_USER])

List Gpg Keys For The Authenticated User

Lists the current user's GPG keys. OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GPG_KEYS_FOR_THE_AUTHENTICATED_USER])

Create A Gpg Key For The Authenticated User

Adds a GPG key to the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_GPG_KEY_FOR_THE_AUTHENTICATED_USER])

Get A Gpg Key For The Authenticated User

View extended details for a single GPG key. OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GPG_KEY_FOR_THE_AUTHENTICATED_USER])

Delete A Gpg Key For The Authenticated User

Removes a GPG key from the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_GPG_KEY_FOR_THE_AUTHENTICATED_USER])

List Public Ssh Keys For The Authenticated User

Lists the public SSH keys for the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_PUBLIC_SSH_KEYS_FOR_THE_AUTHENTICATED_USER])

Create A Public Ssh Key For The Authenticated User

Adds a public SSH key to the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_PUBLIC_SSH_KEY_FOR_THE_AUTHENTICATED_USER])

Get A Public Ssh Key For The Authenticated User

View extended details for a single public SSH key. OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_PUBLIC_SSH_KEY_FOR_THE_AUTHENTICATED_USER])

Delete A Public Ssh Key For The Authenticated User

Removes a public SSH key from the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_PUBLIC_SSH_KEY_FOR_THE_AUTHENTICATED_USER])

List Public Email Addresses For The Authenticated User

This text guides on setting the visibility of a user's email address via the specified GitHub endpoint. It mentions that OAuth app tokens and personal access tokens require the `user:email` sc
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_PUBLIC_EMAIL_ADDRESSES_FOR_THE_AUTHENTICATED_USER])

Users List Public Emails For Authenticated User

This text guides on setting the visibility of a user's email address via the specified GitHub endpoint. It mentions that OAuth app tokens and personal access tokens require the `user:email` sc
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_USERS_LIST_PUBLIC_EMAILS_FOR_AUTHENTICATED_USER])

List Social Accounts For The Authenticated User

Lists all of your social accounts.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_SOCIAL_ACCOUNTS_FOR_THE_AUTHENTICATED_USER])

Add Social Accounts For The Authenticated User

Add one or more social accounts to the authenticated user's profile. OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ADD_SOCIAL_ACCOUNTS_FOR_THE_AUTHENTICATED_USER])

Apps

List App Installations Accessible To The User Access Token

This GitHub App feature lets authenticated users view installations they have permissions (:read, :write, or :admin) for, including personal, collaborator, and organization repositories, detai
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_APP_INSTALLATIONS_ACCESSIBLE_TO_THE_USER_ACCESS_TOKEN])

List Repositories Accessible To The User Access Token

Auth users can access repos they own, collaborate on, or are in their org with permissions (`:read`, `:write`, `:admin`) detailed under `permissions` key for an installation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORIES_ACCESSIBLE_TO_THE_USER_ACCESS_TOKEN])

Add A Repository To An App Installation

Add a single repository to an installation. The authenticated user must have admin access to the repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ADD_A_REPOSITORY_TO_AN_APP_INSTALLATION])

Remove A Repository From An App Installation

Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_A_REPOSITORY_FROM_AN_APP_INSTALLATION])

List Subscriptions For The Authenticated User

Lists the active subscriptions for the authenticated user.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_SUBSCRIPTIONS_FOR_THE_AUTHENTICATED_USER])

List Subscriptions For The Authenticated User Stubbed

Lists the active subscriptions for the authenticated user.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_SUBSCRIPTIONS_FOR_THE_AUTHENTICATED_USER_STUBBED])

Interactions

Get Interaction Restrictions For Your Public Repositories

Shows which type of GitHub user can interact with your public repositories and when the restriction expires.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_INTERACTION_RESTRICTIONS_FOR_YOUR_PUBLIC_REPOSITORIES])

Set Interaction Restrictions For Your Public Repositories

Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set f
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_SET_INTERACTION_RESTRICTIONS_FOR_YOUR_PUBLIC_REPOSITORIES])

Remove Interaction Restrictions From Your Public Repositories

Removes any interaction restrictions from your public repositories.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_INTERACTION_RESTRICTIONS_FROM_YOUR_PUBLIC_REPOSITORIES])

Issues

List User Account Issues Assigned To The Authenticated User

GitHub's REST API shows issues and pull requests assigned to the user across owned/member repos. Pull requests are identified with a `pull_request` key. Use "List pull requests" for PR ids. Su
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_USER_ACCOUNT_ISSUES_ASSIGNED_TO_THE_AUTHENTICATED_USER])

Orgs

List Organization Memberships For The Authenticated User

Lists all of the authenticated user's organization memberships.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ORGANIZATION_MEMBERSHIPS_FOR_THE_AUTHENTICATED_USER])

Get An Organization Membership For The Authenticated User

This endpoint returns the membership status of an authenticated user in an organization unless the user is unaffiliated or the request is from a blocked GitHub App, resulting in a `404` or `40
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ORGANIZATION_MEMBERSHIP_FOR_THE_AUTHENTICATED_USER])

Update An Organization Membership For The Authenticated User

Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_AN_ORGANIZATION_MEMBERSHIP_FOR_THE_AUTHENTICATED_USER])

List Organizations For The Authenticated User

This API displays organizations for authenticated users, needing `user` or `read:org` scope. It limits visibility to organizations the user can operate on, rejecting inadequate scope with a `4
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ORGANIZATIONS_FOR_THE_AUTHENTICATED_USER])

Migrations

List User Migrations

Lists all migrations a user has started.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_USER_MIGRATIONS])

Start A User Migration

Initiates the generation of a user migration archive.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_START_A_USER_MIGRATION])

Get A User Migration Status

This text describes the process of fetching a user migration, detailing the possible states: `pending`, `exporting`, `exported`, and `failed`. It notes that a successful (exported) migration a
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_USER_MIGRATION_STATUS])

Download A User Migration Archive

The URL downloads a migration archive (tar.gz) with data (e.g., issues, pull requests, comments) and directories for attachments and repositories' Git data.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DOWNLOAD_A_USER_MIGRATION_ARCHIVE])

Delete A User Migration Archive

Migration archives are automatically deleted after 7 days. Despite this, migration metadata remains accessible via specific GitHub REST API endpoints even after archive deletion.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_USER_MIGRATION_ARCHIVE])

Unlock A User Repository

This text explains that you can unlock repositories after a user migration is complete, allowing their use or deletion. If a repository isn't locked, trying to unlock it will result in a `404
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UNLOCK_A_USER_REPOSITORY])

List Repositories For A User Migration

Lists all the repositories for this user migration.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORIES_FOR_A_USER_MIGRATION])

Packages

List Packages For The Authenticated User S Namespace

This endpoint lists packages owned by the user, requiring `read:packages` scope, and `repo` scope for certain registry types. See GitHub documentation for registry-specific permissions.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_PACKAGES_FOR_THE_AUTHENTICATED_USER_S_NAMESPACE])

Get A Package For The Authenticated User

To access a user-owned package, OAuth and classic tokens need `read:packages` scope. For certain GitHub Packages, `repo` scope is also necessary. Details on permissions at GitHub's documentati
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_PACKAGE_FOR_THE_AUTHENTICATED_USER])

Delete A Package For The Authenticated User

Authenticated users can delete their package unless it's public with over 5,000 downloads; then, contact GitHub support. OAuth and classic tokens need `read:packages` and `delete:packages` sco
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_PACKAGE_FOR_THE_AUTHENTICATED_USER])

Restore A Package For The Authenticated User

Authenticated users can restore deleted packages within 30 days if the namespace and version are available, provided they have the necessary OAuth or personal access token scopes, including `r
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_RESTORE_A_PACKAGE_FOR_THE_AUTHENTICATED_USER])

List Owned Package Versions

This endpoint lists versions of a user-owned package, requiring `read:packages` scope with OAuth or classic tokens. For certain registries, `repo` scope is also needed. Details on permissions
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_OWNED_PACKAGE_VERSIONS])

Get A Package Version For The Authenticated User

This endpoint retrieves a specific package version for packages owned by the authenticated user. It requires `read:packages` scope and, for certain registries, `repo` scope for access, based o
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_PACKAGE_VERSION_FOR_THE_AUTHENTICATED_USER])

Delete A Package Version For The Authenticated User

Deletes specific package version owned by the user. If public and has >5,000 downloads, contact GitHub support. Requires admin permissions, `read:packages`, `delete:packages`, and potentially
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_PACKAGE_VERSION_FOR_THE_AUTHENTICATED_USER])

Restore A Package Version For The Authenticated User

A user can restore a deleted package version within 30 days if its namespace and version are unclaimed. OAuth and personal tokens need `read:packages` and `write:packages` scopes, plus `repo`
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_RESTORE_A_PACKAGE_VERSION_FOR_THE_AUTHENTICATED_USER])

Projects

Create A User Project

Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthori
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_USER_PROJECT])

Repos

List Repositories For The Authenticated User

The text outlines that the authenticated user can access repositories they own, collaborate on, or are part of through an organization, given explicit `:read`, `:write`, or `:admin` permission
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER])

Repo S List For Authenticated User

The text outlines that the authenticated user can access repositories they own, collaborate on, or are part of through an organization, given explicit `:read`, `:write`, or `:admin` permission
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_LIST_FOR_AUTHENTICATED_USER])

Create A Repository For The Authenticated User

Creates a new repository for the authenticated user. OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scop
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])

Repo S Create For Authenticated User

Creates a new repository for the authenticated user. OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scop
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_CREATE_FOR_AUTHENTICATED_USER])

List Repository Invitations For The Authenticated User

When authenticating as a user, this endpoint will list all currently open repository invitations for that user.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_INVITATIONS_FOR_THE_AUTHENTICATED_USER])

Accept A Repository Invitation

Accept a repo invitation with invitation_id. Responses: 204 (Accepted), 403 (Forbidden), 409 (Conflict), 404 (Not Found), 304 (Not Modified). See docs: https://docs.github.com/rest/collaborato
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ACCEPT_A_REPOSITORY_INVITATION])

Decline A Repository Invitation

Authenticated users can delete a repository invitation by invitation ID. If declined, it returns 204, and for conflicts/errors such as 404 or 403, see GitHub Docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DECLINE_A_REPOSITORY_INVITATION])

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🧪