Inspiration

Every back office has a twenty-minute chore that nobody should still be doing by hand: the same CSV, cleaned the same way, every week. "Point an AI agent at it" sounds like the fix, but an agent that re-reads the file and re-decides the rules on every run costs money each time, can quietly change its mind, and improvises when the input changes. We wanted the opposite: use AI once to learn the procedure, then run it as plain, verified code.

Then we asked the same question about shipping software. The code is written. Who reviews it, scans it, deploys it, and checks it still works? For this hackathon we moved again to GitLab and gave that work to GitLab Duo agents, with a person approving only what matters.

What it does

The app. You do a task about three times inside again's importer. Agents read the demonstrations, propose the rules, and ask about cases the demonstrations did not show. A verifier called FORK tests the learned recipe on a throwaway copy of your data against hundreds of cases, including a sealed acceptance set no agent can read. You approve. From then on, each new file is processed by deterministic code with 0 model calls. When the partner changes the file format, again pauses before writing anything and proposes the smallest repair for you to approve.

Measured on our live staging deployment, one full lifecycle (learn, run two batches, detect a format change, repair, finish the paused batch) made 18 model requests in total: 13 to learn, 5 to repair, and 0 for every automated batch.

The automation (new for this hackathon). Everything after the code is written runs on GitLab:

  1. Plan and create (Duo flow "Issue to MR"). Mention the flow on an issue. A planner agent reads the issue and the code and posts a plan with risks; a developer agent implements it, adds tests, runs the suite, and opens a merge request. It did this for a new /api/health version field (issue #2 ‚Üí MR !1) and for upgrading vulnerable dependencies (issue #4 ‚Üí MR !2), where it said plainly what it could not do.
  2. Verify, secure, package (GitLab CI/CD). 93 tests, SAST, secret detection, dependency scanning, Docker build, and container scanning on every push.
  3. Secure and govern: security triage that learns once. A plain CI job, triage-gate, checks every scanner finding against reviewed verdicts in the repo. A finding without a verdict stops the release and triggers the Duo flow "Security triage". The agent reads the code behind each new finding and opens one merge request with a verdict and code-cited evidence for each. The first time, it judged 13 findings: 11 false positives, 1 accepted risk, and 1 real weakness it fixed (database column names were not checked against the allowed list). After a person reviewed and merged it, the next pipeline passed all 13 known findings with 0 AI calls, and the triage flow did not run at all. AI only runs when something is new.
  4. Release and configure (GitLab CI/CD + Google Cloud). The pipeline copies the scanned image to Artifact Registry, deploys to Cloud Run staging with keyless auth, and runs the full teach ‚Üí verify ‚Üí approve ‚Üí run journey against the live site as a smoke test. Production waits for one click.
  5. Monitor (Duo flow "Release watch"). After each pipeline, an agent checks the health and running version of staging and production, reads the smoke test, and posts a release note on the merge request and the issue it closed. When the security gate stops a release, it says so in plain words and lists the new findings.

Level of autonomy: Supervised. Agents do every step; a person approves the outcomes that matter: verdict and fix merge requests, and the production deploy. That mirrors again itself: the AI proposes, a person approves, and the repeat runs on its own.

All nine stages are touched: plan, create, verify, package, secure, release, configure, monitor, govern.

How we built it

  • App: Python 3.12, FastAPI, SQLite, React 19 + Vite, Strands Agents SDK (agents only run during learning and repair).
  • GitLab: CI/CD with SAST, Secret Detection, Dependency Scanning and Container Scanning; a deterministic triage-gate job with a reviewed verdict file; GitLab Container Registry; staging and production environments; three custom GitLab Duo Agent Platform flows (flow registry v1 YAML) in .gitlab/duo/flows/, an agent-config.yml runtime, and an AGENTS.md with the project rules every agent follows.
  • Google Cloud: Cloud Run (staging and production), Artifact Registry, and Workload Identity Federation so GitLab deploys without any stored key: the pipeline's OIDC token is exchanged for short-lived credentials, and Google trusts only this project. The app runs as a service account with no permissions at all.

Challenges we ran into

  • The first deploy passed every test and then failed the live smoke test: a demo feature imported a helper the Docker image did not include. The staging smoke test caught it before production.
  • GitLab never starts a flow from an action taken by an agent or bot, so an agent's own branch pipeline cannot trigger the next flow. We designed the loop around that: human merges and approvals start the next step.
  • A security gate has to recognize a finding it has already judged even after unrelated edits move it. We key verdicts on the scanner's function-level fingerprint, not the line number.
  • One triage run failed on a GitLab-side lock error; retrying the gate job re-triggered it cleanly.

Accomplishments that we're proud of

  • An agent found and fixed a real weakness that pattern scanners only flagged among false positives, and a test proves it: it fails without the fix and passes with it.
  • Repeat security triage costs 0 AI calls, measured.
  • Zero stored cloud credentials, and a runtime identity with no permissions. What gets scanned is byte-for-byte what gets deployed.

What we learned

  • Agents are most useful when they are honest about limits: the dependency agent upgraded the Python packages and said it could not run npm, instead of guessing.
  • Pipeline triggers plus a deterministic gate make a cheap, safe pattern: plain code decides when AI is needed.
  • Small, specific prompts with project rules in AGENTS.md were enough for multi-step work: plan, code, tests, merge request, notes.

What's next

  • Let the release watcher open a rollback merge request when production health fails.
  • Teach again more connectors (Google Sheets, partner APIs).
  • Expire verdicts automatically when the code they cite changes in a meaningful way.

Credits

again was originally built by Udula Abeykoon, Enhe Bai and Luthira Abeykoon for the Agents for Humans hackathon. The GitLab automation and Google Cloud deployment were added for this hackathon.

Built With

  • artifact-registry
  • docker
  • fastapi
  • gitlab
  • gitlab-ci
  • gitlab-duo
  • google-cloud-run
  • python
  • react
  • semgrep
  • sqlite
  • strands-agents
  • trivy
  • vite
Share this project:

Updates

Submission history