What an Open, Bring-Your-Own-LLM Agent on ServiceNow Can Look Like
By Chris Gatlin, Founder, GMG Technology (gmgtechllc.com)
In one morning I built a working AI agent inside ServiceNow. Not a chatbot bolted onto a portal, but an assistant that lives on the platform, sees what I'm looking at, reads data under my own permissions, and proposes real configuration changes that only land when I say so.
I call it the GMG AI Agent. It's a scoped app, built on my personal developer instance with agentic coding. It's a prototype. But it works end to end, and I think it shows something worth talking about: what an open, bring-your-own-LLM agent on the Now Platform can look like.

Why I built it
Most of an admin's day isn't hard work. It's lost time: jumping between the incident, the CI, similar tickets, a business rule, and the right update set, then testing and doing it all again. AI should take that off your plate, but on ServiceNow today that means one licensed option and one model, chosen for you.
I'd already seen the alternative work. During my dev work on Weekend Warrior, my golf app, I built an admin agent right into the app to help me troubleshoot code on the fly, and it changed how fast I could fix things. That made me ask why a ServiceNow team couldn't have the same thing with the model they already pay for, their own budget limits, and guardrails they can read in code. I wanted to find out if it could be done, so I spent a morning building it.
What it does
It follows you around. A floating panel, delivered as a global UI Script, shows up on every classic form and list, in both UI16 and Next Experience classic pages. It knows the current page: the table, the record, around 15 field values from the form, and the list filter. It offers starter prompts that fit the page you're on, so on an incident you get incident questions, and on a list you get questions about that list.

It reads with your permissions. Every tool runs as the logged-in user through GlideRecordSecure, so ACLs apply. If you can't see a record, neither can the agent. The read tools are simple on purpose: get a record, query a short allowlist of tables, and find similar incidents. When I asked it to summarize INC0000060, it pulled the record and answered in about 8.5 seconds.
It builds, carefully. The agent can propose business rules, script includes, and client scripts. It shows the proposal as a card with a code diff. More on the guardrails below, because that part matters most.
It's LLM-agnostic. Providers live in a table. Claude from Anthropic is live today, and Grok or any OpenAI-compatible endpoint is supported. An adapter layer normalizes tool calls across providers, so the agent logic doesn't care which model is on the other end. It doesn't need a Now Assist license.
Bring your bot of choice: building flows
The GMG AI Agent can now propose Flow Designer flows. It shows a proposal card and creates nothing until you click Confirm. Flows are created as Draft and Inactive in their own update set, and nothing is deleted.

Supported today: one record trigger (created, updated, or both) with an optional condition, plus 1–10 actions — Update Record, Create Record, and Log — with values that can reference trigger fields. One example is a P1 incident flow that adds work notes, creates a Problem record, and logs.

This is a prototype. Not yet supported: branching, loops, approvals, notifications, subflows, scheduled triggers, and editing existing flows. Activating and running agent-built flows hasn't been tested yet.
An outside AI agent driving Workflow Studio in the browser also built a working flow by hand. You can bring your bot of choice, either inside the platform with guardrails or from outside through the UI.
Guardrails
An agent that can write code into your instance has to earn trust. I didn't want safety to depend on a well-worded prompt, so the rules are in code:
- Nothing writes until you click Confirm. The model can only create a pending proposal. Applying it is a separate step, and the server checks that the same user is confirming, that the proposal is still pending, and that it hasn't expired. This is enforced in code, not in the prompt.
- Every change gets its own update set. Each confirmed change lands in a new update set named "GMG AI – …", so it's easy to review, move, or back out.
- New rules start inactive. New business rules and client scripts are created inactive. You turn them on when you're ready.
- No deletes. The agent can't delete or deactivate anything.
- Syntax check before apply. Proposed scripts are checked before they're saved.
- Proposals expire in 30 minutes. Stale proposals can't be applied later by accident.
- Every action is logged. Questions, tool calls, proposals, confirmations, all of it.
Spend control
If you bring your own LLM, you own the bill, so cost tracking was part of the design from the start:
- Token and cost tracking per model.
- Daily and monthly budgets per provider. When a budget is reached, the call is blocked before any money is spent.
- A warning at 80% of budget.
- A cost footer on every answer, so you see what each question cost.
- A Usage page that shows it all in one place.

How it's put together
Under the hood it's standard platform building blocks: script includes for the LLM adapter, the agent loop, the tools, and the budget logic; Scripted REST endpoints for chat, page context, actions, and usage; a global UI Script for the panel; and a small piece in global that applies confirmed changes, re-checking ownership, status, age, and field allowlists one more time before it writes anything. Nothing exotic. That's the point. This is the kind of thing a ServiceNow builder can do on the platform today.
What's next
This is a prototype, and I want to take it further:
- More context, beyond classic forms and lists.
- More build tools, covering more of the configuration an admin touches every day.
- Deeper ITOM work, like reasoning over CIs and relationships.
- More providers, and letting teams pick which model to use for which job.
ServiceNow folks, let's talk
I'm not building this to compete with Now Assist. I'm building it because I think the platform is the right place for agents, and because customers will want choice in which models they use and full control over what an agent can touch and spend. An open, bring-your-own-LLM agent with hard guardrails is one way to give them that.
If you work on ServiceNow product, AI, or developer relations, or you're part of the developer community and want to compare notes, I'd like to talk. I'm happy to walk through the code, the guardrail design, and what I learned building it.
You can reach me through GMG Technology at gmgtechllc.com.
Chris Gatlin, Founder, GMG Technology