Integrations · GitLab
Guild agents read, update, and delete GitLab resources on your team’s behalf. Guild offers two GitLab integrations: one covers the GitLab REST API with a tool per operation, the other sends any GraphQL query or mutation through a single tool. Both keep your personal access token server-side, and credential policies decide which operations each agent may call.
Book a demo
See how teams govern agents that use GitLab.
Talk to sales
Get access to Guild, then connect GitLab to your first agent.
Choose an integration
Both integrations call GitLab.com with a GitLab personal access token. They differ in how an agent reaches the API.
Use GitLab for most agents: each operation is its own tool, so a credential policy can allow or deny it by name. Use GitLab GraphQL when an agent needs data the REST tools don’t cover, or wants several related records in one request.
How it works
1
Generate a GitLab personal access token
Create a personal access token in GitLab with the scopes your agent needs:
read_api for read-only work, or api to make changes. The same token works for both integrations.2
Connect the credential in Guild
Go to Access & setup > Credentials, click Connect, select gitlab-openapi or gitlab-graphql, and paste the token into API Key.
3
Import tools and pick what you need
Import the integration’s tools and use
pick() to include only the tools your agent needs.Why GitLab access needs governing
GitLab tools can delete projects, branches, pipelines, and merge requests, and can unassign runners or remove protection rules. A GraphQL mutation can change data across projects in one call. A personal access token scoped too broadly lets any agent that uses it act on any resource the token owner can reach. Guild’s credential policies let you writeALLOW and DENY rules that the credential proxy enforces before any request leaves Guild, limiting agents by operation name, HTTP method, agent identity, or workspace. A matching DENY rule always wins over any ALLOW rule.
Guild stores the token server-side and injects it as a header after the policy check passes. Agent code, prompts, and containers never see it. You can scope a credential to one workspace, one member, or one installed agent using the options in Credentials, so the token’s reach matches the agent’s actual job rather than the token owner’s full permissions.
Authentication
- Type: API key: a GitLab personal access token
- Applies to: both integrations, each with its own credential
PRIVATE-TOKEN for the REST integration and as a bearer token for GraphQL.
See Credentials for workspace, member, and agent-scoped credentials.
Usage
GitLab
GitLab GraphQL
Tools
GitLab tools
Tools in the latest published version ofguildai~gitlab-openapi:
All 167 tools
All 167 tools
GitLab GraphQL tools
Tools in the latest published version ofguildai~gitlab-graphql:
Frequently asked questions
Which GitLab integration should I connect?
Which GitLab integration should I connect?
Start with GitLab (
guildai~gitlab-openapi). Its tools map one to one to REST operations, which makes credential policies precise. Add GitLab GraphQL (guildai~gitlab-graphql) when an agent needs data the REST tools don’t cover.Can I limit an agent to read-only GitLab access?
Can I limit an agent to read-only GitLab access?
Yes. For the REST integration, write a credential policy that denies
POST, PUT, and DELETE operations, or denies operations by name pattern, while allowing everything else. GraphQL sends every query and mutation through one operation, so a policy can’t tell them apart; give a read-only GraphQL agent a token with the read_api scope instead.Does Guild support self-managed GitLab?
Does Guild support self-managed GitLab?
Not yet. Both integrations call GitLab.com.
Do the GitLab integrations support webhook triggers?
Do the GitLab integrations support webhook triggers?
No. Neither catalog entry lists webhook events, so GitLab events can’t trigger agents through Guild.
How do I give one agent its own GitLab token?
How do I give one agent its own GitLab token?
Open the installed agent’s page and connect a Dedicated to this agent credential. Only an admin of the account that owns the workspace, or the person who installed the agent, can connect one. See Credentials for the full resolution order.
Put a governed agent on GitLab this week
Book a demo
See how teams govern agents that use GitLab.
Talk to sales
Get access to Guild, then connect GitLab to your first agent.