"Agentic AI" is one of the most used terms in technology right now. This post explains what it means in plain language, how an AI agent works, and what it could mean for database administrators, including the risks.
From chatbot to agent
A chatbot answers questions. You ask, it replies, and you do the work. An AI agent is given a goal and works towards it on its own: it plans steps, uses tools (runs a query, reads a file, calls an API), looks at the results and decides what to do next, until the goal is reached or it needs a human.
| Chatbot | Scripted automation | AI agent | |
|---|---|---|---|
| Input | A question | A fixed trigger | A goal |
| Steps | One answer | Fixed, written in advance | Chosen as it goes |
| Uses tools | No, or rarely | Yes, the same ones every time | Yes, picks which ones to use |
| Handles surprises | Not applicable | Only if you coded for them | Often, by reasoning about results |
| Predictability | Medium | High | Lower, needs guardrails |
How an agent works
Most agents follow the same loop:
- Goal: "Find out why the order database was slow between 2 and 3 pm."
- Plan: the model decides the first step, for example "get the top wait events for that hour".
- Act: it calls a tool, such as a read-only SQL query or an AWR report.
- Observe: it reads the result.
- Repeat: based on what it saw, it chooses the next step, such as looking at the top SQL for that wait event, and keeps going until it can answer, or stops and asks a person.
The building blocks
- A large language model (LLM): the "brain" that understands the goal, reasons about results and writes the next step.
- Tools: functions the agent is allowed to call, such as run a query, search documents, read a log, open a ticket. The agent can only do what its tools let it do.
- Memory and context: what has happened so far in this task, plus knowledge it can look up, such as runbooks, past incidents or documentation (often called retrieval-augmented generation, RAG).
- Instructions and limits: what the agent is for, what it must never do, and when it must ask a human.
- Orchestration: the code that runs the loop, records every step and enforces the limits. On AWS, for example, Amazon Bedrock Agents provides this as a managed service; there are also open-source frameworks.
Some systems use several agents, each with one job (one gathers data, one analyses, one writes the report), coordinated by a supervisor agent.
What it could mean for DBAs
- First-response triage: when an alert fires, an agent gathers the alert log, top waits, blocking sessions and recent changes, and writes a summary before the on-call DBA logs in.
- Health checks and reports: run the daily checks, compare with yesterday and explain only what changed.
- Runbook assistant: answer "how do we fail over the sales database?" from your own runbooks, with links to the source.
- Migration helper: compare schemas, list objects that will not convert, and draft the plan for a review.
- Ticket work: draft the steps for routine requests (new user, add space), for a DBA to approve.
In all of these, the DBA's judgment does not go away. The agent does the gathering and first draft; the DBA decides.
Risks and guardrails
- Agents can be wrong with confidence. An LLM can misread a result or invent a detail. Check its conclusions against the evidence it shows.
- Least privilege. Give an agent read-only access to start. Never give it SYSDBA, production write access or the ability to drop objects.
- Human approval for changes. Anything that changes a system (kill a session, resize, restart, change a parameter) should need a person to approve it.
- Prompt injection. Text inside a log, ticket or web page can try to give the agent instructions. Treat everything the agent reads as data, and limit what its tools can do.
- Logging and audit. Record every tool call and result, so you can see exactly what the agent did and why.
- Data protection. Know where your data goes. Do not send customer data or passwords to a service your company has not approved.
- Cost. Every step uses model calls. Set limits on how many steps and how much spend one task can use.
How to start
- Pick one narrow, read-only task, such as "summarize last night's alert log errors".
- Give the agent only the tools that task needs.
- Run it alongside your normal process for a few weeks and compare its output with what your team found.
- Only then widen its scope, one tool at a time, keeping a human approval step for any change.
Agentic AI is best seen as a fast, tireless junior assistant: very useful for gathering and drafting, but it needs clear limits and a senior person who checks its work.
More DBA scripts are in my GitHub repository: github.com/sbajwa55/dba-scripts. For help with Oracle, cloud migrations or AWS, visit Bajwa Consulting Services.
