GitLab work tracking AI cost on every issue
Argent Strategic Intelligence books each AI agent's spend to the GitLab issue it worked on, rolls it up, holds work at its cap, and writes the cost and a signed summary back to GitLab.
AI spend on the GitLab issue it served
AI agents now write code, tests and documents against real work items, and their bill usually arrives as one number at month end. Argent connects to GitLab and books every agent's AI spend to the issue it worked on.
- Your GitLab projects, epics and issues appear in Argent's Work catalog, kept in step with GitLab.
- Each request that goes through Argent is priced on Argent's signed ledger and booked to the issue the agent declared, then rolled up through the epic to the project.
- A budget can sit on the issue, the epic or the project. At the cap, the work waits for its budget owner.
- The cost can be written back into GitLab, so the issue itself shows what its AI work cost.
What Argent does with GitLab
| Step | What happens |
|---|---|
| Sync the board | Argent reads the projects, epics and issues on the boards you choose into its Work items, picking up where the last read stopped. GitLab wins on state: the sync reads and never overwrites. |
| Book the spend | In ADE, the Argent Development Environment, the developer picks the issue when launching a session, and the agent can declare the issue it is on with a tool. Each sub-agent's spend is kept separate. Argent books the session's priced spend to that issue, once. |
| Cap it | An admin sets a cap on an issue, epic or project, with a warning at 80 percent. At 100 percent, set to Pause, the next prompt of every ADE session on that work is held until the budget owner chooses Raise cap or One-time overage. |
| Write the cost back | A cost value on each synced issue, equal to its lifetime AI spend and rewritten only when it changes. |
| Write the work back | On commit, ADE drafts one summary comment (what changed, which files, the cost of that stretch). The developer approves it, Argent removes secrets, signs it and posts it to the issue. Closing the issue in ADE can close it in GitLab too. |
How the cost shows up in GitLab
Each synced issue can show its lifetime AI spend inside GitLab.
Argent writes the cost into GitLab custom fields of the Number type, which GitLab offers on its Premium and Ultimate tiers and which live in your top-level group. An issue carries its own cost; an epic carries the total under it. With no field named, each issue gets the cost as one comment instead, kept up to date in place.
- Values are absolute, never increments, so a missed run cannot double-count.
- A field or permission GitLab refuses shows as a cost error on the connection, with a fixed plain sentence and a signed row, never silently.
- Cost write-back has its own switch per connection.
How it connects
Argent talks to GitLab's API over HTTPS, as the bot account behind the token.
- Credential: a group or project bot access token with
apiscope. - No secret in Argent's database. The credential stays in your vault and Argent stores a reference to it. Works with HashiCorp Vault and OpenBao, AWS Secrets Manager, CyberArk Conjur or Infisical.
- Guarded calls. Every call goes through Argent's protected HTTPS client, which refuses private addresses and redirects to other hosts. Calls go to
gitlab.com. - Bounded sync. Each run reads a capped amount, so a misbehaving server cannot stall Argent or fill its database.
- Plain errors. Failures are stored as fixed codes and sentences; GitLab's own response text is never kept.
What you configure
- Create the GitLab credential: a group or project bot access token with
apiscope. Store it in your vault. - Connect GitLab in the Argent console under Work, Trackers, with the address and the vault reference.
- Pick the boards to sync. Argent maps GitLab's project, epic and issue to its own project, feature and story levels.
- Turn on the write-backs you want. Every switch ships Off: Summary comment, and Close the issue, and optionally Closed board list (default
workflow::done). - Name the cost fields and switch cost write-back on for the connection.
- Set budgets on the work items that need a cap, and say whether 100 percent pauses or only alerts.
Spend is booked for agents that work through Argent; ADE is where the developer picks the issue and the agent declares it.
Signed, and GitLab stays in charge
Every write-back is signed in Argent's ledger before it is posted, and refused if the ledger is down.
- The Tracker sync trail lists each write: the person, the GitLab issue, COMMENT, STATUS CHANGE or CLOSE, and POSTED, RETRYING or REFUSED BY TRACKER.
- Each comment ends with
Posted by Argent on behalf of <person>, agent <agent>.and its record id. - If someone already moved the issue in GitLab, the tracker wins: Argent leaves it as GitLab has it.
- No agent can lift a hold or approve its own comment: every write an agent asks for waits for its human owner.
Hand the trail to an auditor with one-click audit evidence.
Where this fits
- Capability: agent work tracking, the full story with the film and data sheet; AI spend caps for the budgets underneath.
- Goals: control budget and token spend, agent identity and ownership.
- Use case: securing AI coding agents.
- Other work trackers: Jira, GitHub, Linear, Notion.
- Ticketed approvals: ServiceNow and Jira Service Management.
Browse all integrations.
Want this running on your own use cases?
Book a demo