---
title: "GitLab integration for AI agents | Langdock"
description: "Connect GitLab to Langdock. Agents and workflows can use 29 actions, such as “Create branch” and “Create commit”."
url: "https://langdock.com/integrations/gitlab"
language: "en"
---

[Integrations](https://langdock.com/products/integrations)

# GitLab integration for AI agents

Browse repos, search code, and manage merge requests, issues, and pipelines

Connect GitLab to Langdock and use it in chat, in agents and in workflows.

29 actions · 6 triggers

[Start free trial](https://app.langdock.com/signup) [Talk to sales](https://langdock.com/talk-to-sales)

## GitLab actions

Each action is one step an agent or workflow can run in GitLab.

- Create branch

  Creates a new branch in a project's repository from an existing branch, tag, or commit. Requires a token with api scope.
- Create commit

  Commits one or more file changes (create, update, delete, move) to a branch as a single atomic commit. This is how to push changes to GitLab: there is no local repository, so send the full file contents. Can create the branch from an existing one in the same call. Requires a token with api scope.
- Create issue · Creates an issue in a project. Requires a token with api scope.
- Create issue note · Adds a comment (note) to an issue. Requires a token with api scope.
- Create merge request

  Creates a merge request from a source branch into a target branch. Requires a token with api scope.
- Create merge request note · Adds a comment (note) to a merge request. Requires a token with api scope.
- Delete branch

  Permanently deletes a branch from a project's repository. Commits that are not on another branch become unreachable. Refuses the default branch and protected branches. Requires a token with api scope.
- Get commit diff · Gets the per-file diff for a specific commit in a project's repository.
- Get current user

  Retrieves the profile of the authenticated GitLab user, including id, username, name, and email.
- Get file content

  Retrieves the raw text content of a file in a project's repository. Use Get repository content first to find the path.
- Get issue · Retrieves a single issue by its project-scoped IID.
- Get issue notes · Lists the comments (notes) on an issue, by its project-scoped IID.
- Get job log · Retrieves the plain-text log (trace) of a specific CI/CD job.
- Get merge request

  Retrieves a single merge request by its project-scoped IID, optionally including its commits and pipelines.
- Get merge request diffs · Gets the changed files and diffs for a merge request, by its project-scoped IID.
- Get merge request notes · Lists the comments (notes) on a merge request, by its project-scoped IID.
- Get pipeline jobs · Lists the jobs that belong to a specific CI/CD pipeline.
- Get repository content

  Lists files and directories at a path in a project's repository tree. Use this to browse structure before reading a file.
- List branches · Lists branches in a project's repository, optionally filtered by a search term.
- List commits

  Lists commits in a project's repository, newest first, optionally filtered by branch, path, or date range.
- List issues · Lists issues in a project, filterable by state, labels, and search term.
- List labels · Lists the labels defined in a project, optionally filtered by a search term.
- List merge requests · Lists merge requests in a project, filterable by state, branch, and search term.
- List pipelines · Lists CI/CD pipelines in a project, filterable by ref and status.
- List projects

  Lists GitLab projects you are a member of by default. Returns id, path, name, and visibility for each project. Use Membership to list owned projects or any accessible projects.
- Manage pipeline

  Creates, retries, or cancels a CI/CD pipeline in a project. Requires a token with api scope.
- Merge merge request

  Merges an open merge request into its target branch. Requires a token with api scope. Fails if the MR is not mergeable (conflicts, missing approvals, or failing required checks).
- Search in GitLab

  Searches the GitLab instance for a chosen scope (projects, issues, merge requests, code, commits, users, and more). One scope per call. Blob and commit scopes need Advanced Search enabled at the instance level.
- Search project code

  Searches files inside one project by substring. Matches on the project's default branch and works on any GitLab tier, including free and self-managed.

## GitLab triggers

A trigger starts a workflow when something happens in GitLab.

- Changes in path

  Triggers when files under a specific path change in a project. Useful for docs or config sync workflows.
- Merge request merged · Triggers when a merge request is merged in a project.
- New commit · Triggers when a new commit is pushed to a specific branch of a project.
- New issue · Triggers when a new issue is created in a project.
- New merge request · Triggers when a new merge request is opened in a project.
- New release · Triggers when a new release is published in a project.

## Setup and permissions

An action can ask for your confirmation before it runs. In an agent, each action is set to “Always allow” or “Needs approval”.

### Documentation

- [Using integrations](https://docs.langdock.com/en/using-langdock/guides/integrations/using-integrations)
- [How connections work](https://docs.langdock.com/en/using-langdock/integrations/connections)
- [Manage access to actions](https://docs.langdock.com/en/admin/manage-integrations/manage-action-access)

[All integrations](https://langdock.com/products/integrations)
