Skip to content

Support GitLab CLI(glab)integration in OpenAB Agent #712

@slps970093

Description

@slps970093

Description

OpenAB currently includes GitHub CLI (gh) in the default agent image, allowing agents to interact with GitHub resources such as repositories, issues, and pull requests through token-based authentication.

However, GitLab CLI (glab) is not currently included, which makes it difficult for agents to interact with GitLab projects, especially in organizations using GitLab Self-Managed instances.

This feature request proposes adding GitLab CLI (glab) support to the OpenAB agent image, while keeping authentication handled through the existing OpenAB agent environment configuration model.

Use Case

Many teams use GitLab or GitLab Self-Managed as their primary source control platform.

With glab available inside the OpenAB agent environment, agents could:

  • List and inspect GitLab issues
  • Create new issues from agent findings
  • List and create merge requests
  • Inspect repository information
  • Work with GitLab.com or GitLab Self-Managed instances
  • Run in Kubernetes or container environments without interactive login

Example commands:

glab auth status
glab repo view
glab issue list
glab issue create
glab mr list
glab mr create

### Proposed Solution

Add GitLab CLI (glab) to the OpenAB agent image, similar to how GitHub CLI (gh) is currently available.

The image should only include the glab binary. Authentication should be handled through environment variables, consistent with the existing OpenAB agent configuration model.

Example agent configuration:

agents:
  kiro:
    env:
      GITLAB_HOST: "https://gitlab.example.com"
      GITLAB_TOKEN: "${GITLAB_TOKEN}"

For Kubernetes deployments, users should be able to inject GitLab credentials through the existing environment variable mechanisms, such as envFrom, rather than hardcoding secrets into the image.

Example:

agents:
  kiro:
    envFrom:
      - secretRef:
          name: gitlab-secret
    inheritEnv:
      - GITLAB_TOKEN
      - GITLAB_HOST

Expected authentication variables:

GITLAB_HOST=https://gitlab.example.com
GITLAB_TOKEN=your_personal_access_token

Acceptance criteria:

glab --version works inside the agent container
glab auth status works when GITLAB_TOKEN is provided
Self-managed GitLab instances can be configured through GITLAB_HOST
Agents can run basic GitLab commands such as issue and merge request operations
Tokens are not baked into the image
Authentication uses existing OpenAB environment variable configuration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions