1. Create an access token in GitLab
Neo works with any of GitLab’s three access tokens. Pick the narrowest one that covers what your agents need:1
Open the token page
For a project access token, open the project, then Settings > Access tokens. For a group access token, the same in the group. For a personal access token, sign in as Neo’s user, click the avatar, then Edit profile > Access tokens.
2
Add the token
Click Add new token. Name it
Neo, and set an expiry date: GitLab requires one, and Neo needs a new token when it passes.3
Pick the role and scope
Select the api scope, or read_api for an agent that only reads. For a project or group token, pick the role: Developer can commit to branches that are not protected and open merge requests; Maintainer can also commit to a protected branch such as
main and change settings. GitLab, not Neo, refuses what the role does not allow.4
Copy the token
Click Create token and copy it. GitLab shows it once.
2. Add the token in Neo
1
Open Integrations
Open Integrations → GitLab in the Neo Dashboard. The card is under Project Management.
2
Save the address and the token
For GitLab URL, enter
https://gitlab.com, or the address of your own GitLab server such as https://gitlab.example.com. A server under a sub-path takes its API address, such as https://example.com/gitlab/api/v4. Paste the Access Token and click Save. Neo saves the address as your GitLab’s API address, ending in /api/v4. Neo checks the token with GitLab before it saves, so a wrong or expired token is rejected straight away.A GitLab server of your own
Neo calls your GitLab from the internet over HTTPS, with a certificate from a public authority. A server reachable only inside your network needs a reverse proxy that publishes the API path (/api/v4) and admits only Neo’s IP addresses. If GitLab refuses a token you know is right, check that the proxy passes the PRIVATE-TOKEN header through.
3. Turn GitLab on per agent
Open the agent from Agents, go to its Tools & Settings tab, click Project Management, and expand the GitLab block. Pick a preset, then change any group: each group can be Disabled, Read Only or Read / Write, and a Read / Write group can ask a technician before each change. In the agent’s instructions, name the project and branch it works in.Keep a copy of your Neo workspace in GitLab
Create a scheduled agent, for example every night, that copies your whole Neo workspace into a repository: every agent, memory, skill (each file as its own file), intent and your tenant settings, one file per record, and one commit for each change:- Create a project for the copy, such as
neo-workspace, and a project access token for it with the api scope and the Maintainer role (or let Developers push to its default branch). - Give the agent Neo API > Agents & Schemas, Agent Memories, Skills and Tenant Settings at Read Only, and GitLab > Repository at Read / Write.
- In its instructions, write: “Commit a copy of the Neo workspace into the folder
neoon themainbranch of the GitLab projectmy-group/neo-workspace, and delete the file of anything that no longer exists.”
main.
