AI After the Demo — Part 13

It’s 8:15 on a Tuesday morning.
Jeannine opens her dashboard.
Or at least tries to.
The little spinning circle keeps spinning.
And spinning.
Eventually, the dashboard appears.
Except the numbers haven’t refreshed.
Meanwhile, the Finance team is complaining that their reports are taking forever.
The Sales team can’t get their customer information.
And someone from Operations has opened a ticket titled:
“EVERYTHING IS SLOW.”
Helpful that is. NOT.
The DBA checks SQL Server.
CPU is high.
Queries are piling up.
The reporting database is struggling.
Someone must have deployed something.
Except no one actually did.
No application changes.
No database changes.
No new reporting requirements.
And then someone notices a new workload.
An AI agent.
A very busy AI agent.
It has been asked to identify customers who might be at risk of leaving.
So it has been querying sales history.
Customer activity.
Service records.
Financial information.
And just about everything else it can get its digital hands on.
Repeatedly.
Because it’s trying to be thorough.
The agent isn’t broken.
It isn’t hallucinating.
It isn’t accessing anything it shouldn’t.
It’s doing exactly what we asked it to do.
Unfortunately, so is everyone else.
Welcome back to Production.
We Gave the Agent Access. We Forgot About Capacity.
When organizations start implementing AI, there’s usually plenty of discussion about access.
- Can the agent connect to the database?
- Can it query the warehouse?
- Does it have permission to retrieve customer information?
- Can it call the API?
Those are important questions.
But there’s another one we don’t always ask.
What happens when the agent actually starts using all that access?
Because giving an agent permission to query a system doesn’t mean the system has unlimited capacity to support those queries.
A database that comfortably handles fifty users might not appreciate an agent generating hundreds of analytical requests.
Especially when those requests involve large joins, aggregations, or repeated searches.
And especially when the agent decides it needs to ask another question.
And another.
And another.
It’s not necessarily malicious.
It’s just enthusiastic.
Which, in production, can be surprisingly expensive.
The Agent Doesn’t Know It’s Tuesday Morning
Let’s return to Jeannine.
Her dashboard normally refreshes around 8 AM.
Finance runs its morning reports.
Operations checks overnight processing.
Sales starts looking at customer activity.
The system is busy.
But predictably busy.
Then we introduce an agent that can investigate customer risk.
It doesn’t necessarily know that Tuesday morning is one of the busiest periods for the reporting environment.
It doesn’t know that the nightly load finished late.
It doesn’t know that a particular reporting query already consumes a substantial amount of resources.
Unless we explicitly provide that context or enforce appropriate controls.
So it starts investigating.
Maybe it asks for the last twelve months of customer activity.
Then it decides six months would provide a useful comparison.
Then it checks individual customer histories.
Then it expands the analysis to include service activity.
Then it reruns part of the analysis because the results look interesting.
Every request might be reasonable on its own.
Collectively?
Not so much.
A thousand individually reasonable queries can still create one completely unreasonable workload.
Your Agent Is Another Production Consumer
Here’s something I think we need to get comfortable saying.
An AI agent isn’t just a feature.
When it connects to enterprise systems, it becomes another workload.
It consumes resources.
- Database CPU.
- Memory.
- I/O.
- Network bandwidth.
- API capacity.
- Warehouse compute.
- Concurrency slots.
- And potentially resources in several systems at once.
In other words, the agent has operational consequences.
Just like any other application.
Except there’s a difference.
Traditional applications usually have reasonably predictable query patterns.
Not always, of course. Anyone who’s supported a poorly written reporting application knows better.
But we generally know what the application is supposed to execute.
An AI agent may generate different queries depending on the question, the available tools, the information it retrieves, and the decisions it makes along the way.
That makes its workload harder to predict.
And potentially harder to control.
We can’t treat an unpredictable workload as though it has predictable resource requirements.
The Query Was Fine. Until the Agent Ran It 400 Times.
Let’s imagine the DBA finds the problem.
There’s a query against customer transaction history.
It isn’t particularly terrible.
It completes in two seconds under normal conditions.
Maybe it could be optimized.
Maybe there’s an index that would help.
But it’s not the worst query anyone has ever written.
Then the DBA checks the execution count.
Four hundred executions.
In twenty minutes.
From the same agent identity.
Now the query looks considerably less innocent.
The agent has been investigating individual customers, retrieving similar information repeatedly.
Maybe it doesn’t realize the same data could have been retrieved in one batch.
Maybe it isn’t caching results.
Maybe each follow-up question triggers another database call.
The problem isn’t necessarily one bad query.
It’s the pattern of activity.
A query doesn’t have to be expensive to become expensive. It just has to run enough times.
And if the agent is allowed to run multiple investigations simultaneously, things get even more interesting.
The Sherpa’s Notebook
I’ve spent plenty of time investigating performance problems where the first instinct was to blame the database.
Sometimes that was fair.
Sometimes the query needed a better index.
Sometimes statistics were outdated.
Sometimes an execution plan went sideways.
But sometimes the real problem was simply that we were asking the system to do far more work than necessary.
One example that comes to mind involved a Snowflake process running a MERGE operation repeatedly throughout the day.
The process worked.
It loaded the data correctly.
And it consumed a substantial amount of compute time.
But much of that work was unnecessary because the source data hadn’t changed.
By adding a lightweight check of the source’s refresh timestamp, row count, and hash value, we could determine whether the MERGE was actually needed.
The result?
We went from hours of daily compute time to roughly three minutes.
Same business outcome.
Far less unnecessary work.
Now imagine giving an AI agent access to that environment.
And allowing it to repeatedly execute expensive operations simply because it believes another check might be helpful.
The lesson isn’t that Snowflake is expensive.
Or that AI agents shouldn’t query databases.
It’s that workload discipline matters, regardless of who – or what – is initiating the work.
An AI agent doesn’t magically make unnecessary processing worthwhile.
It just gives us another way to generate it.
The Warehouse Can Scale. Your Budget Might Disagree.
Now, some people will say: “That’s why we use the cloud. We can scale.”
And they’re not entirely wrong.
Snowflake can scale compute.
Fabric provides different capacity and workload management capabilities.
Azure services can scale.
There are ways to increase resources and isolate workloads.
But scaling isn’t the same as controlling.
If an agent runs an inefficient process repeatedly, adding compute may help it finish faster.
It doesn’t necessarily make the process more efficient.
And depending on the platform and configuration, additional capacity may introduce additional cost.
Meanwhile, the agent might be querying an OnPrem SQL Server that doesn’t have the luxury of adding compute with a few clicks.
Or an API with a strict rate limit.
Or a source application that wasn’t designed for hundreds of analytical requests.
The cloud can make a workload scalable. It doesn’t automatically make that workload sensible.
And someone will eventually notice the bill.
Probably Finance.
They seem to have a talent for that.
Don’t Let the Agent Write Checks the Infrastructure Can’t Cash
So what do we do?
Start by treating the agent as a production workload.
Not as an exception to the rules.
It needs a resource budget.
A concurrency limit.
A maximum number of tool calls.
Query timeouts.
Appropriate retry behavior.
And controls around the types of operations it can perform.
If the agent is using SQL Server, we might restrict it to approved stored procedures or curated views rather than allowing unrestricted analytical SQL against operational tables.
If it’s using Snowflake, we might isolate its workload with an appropriate warehouse and resource monitor, while also applying query limits and cost controls.
If it’s using Fabric, we need to understand the capacity impact and monitor consumption alongside other workloads.
If it’s calling APIs, rate limits and request budgets matter.
And if it needs to perform an expensive investigation, maybe that work belongs in a scheduled batch process instead of happening interactively at 8:15 AM.
The agent doesn’t need unlimited freedom to be useful.
It needs a well-designed operating environment.
Sometimes the Best Query Is the One You Don’t Run
Here’s another thing I’d like agents to become better at.
Recognizing when they already have enough information.
Suppose Jeannine asks, “Which customers are showing signs of reduced purchasing activity?”
The agent retrieves recent purchasing trends.
Then it checks historical patterns.
Then it retrieves customer details.
So far, so good.
But does it need to repeat those queries every time Jeannine asks a follow-up question?
Probably not.
Could it reuse a previously calculated customer-risk dataset?
Maybe.
Could it retrieve information for fifty customers in one request instead of fifty individual calls?
Possibly.
Could the business maintain a curated analytical dataset specifically for this purpose?
Absolutely.
This is where good data architecture becomes extremely valuable.
Instead of allowing the agent to discover the same information from raw operational systems over and over again, we can provide reliable, appropriately refreshed data products.
We can expose approved tools that perform efficient operations.
We can establish caching and freshness rules.
And we can make it easier for the agent to do the right thing.
The best way to optimize an AI-generated query might be to prevent the agent from generating it in the first place.
What About the Other Users?
There’s another dimension here.
Fairness.
Not fairness in the model’s answers.
Fairness in access to shared resources.
Jeannine’s dashboard shouldn’t become unusable because an agent decided to perform an extensive investigation.
Finance shouldn’t lose access to its morning reporting because the agent has consumed the available capacity.
And Operations shouldn’t have to explain why critical processing is delayed by an experimental workload.
We need to decide which workloads have priority.
What can run during business hours?
What should be scheduled?
What should be throttled?
What should be stopped when the environment is under pressure?
Those decisions belong in workload management and orchestration.
Not in a polite prompt asking the agent to avoid being inconvenient.
Because the agent may have no reliable way to know that the system is under pressure unless we’ve built that visibility and control into the architecture.
The Monitoring Dashboard Says Everything Is Healthy
Now imagine the AI application’s dashboard.
The model is responding.
The tools are available.
The agent is completing its tasks.
No errors.
No failures.
Green across the board.
Meanwhile, the database team is investigating resource contention.
The reporting team is dealing with slow dashboards.
And Finance is asking why compute consumption has increased.
Both views can be technically accurate.
The AI application is healthy.
The shared environment is not.
An agent can meet every one of its own performance targets while degrading the performance of everything around it.
That’s why monitoring only the agent isn’t enough.
We need to understand the resources it consumes and the effect it has on other workloads.
Not just whether its own requests succeed.
Build a Workload Contract
Before we turn an agent loose in production, I’d want a workload contract.
Not a fifty-page document nobody reads.
A practical definition of how the agent is expected to behave.
- What systems can it access?
- What operations can it perform?
- How much work can it initiate?
- How many concurrent requests are allowed?
- What are the timeouts?
- When can it run expensive analysis?
- What happens when a resource budget is exceeded?
- What gets priority when capacity is constrained?
- And who owns the operational consequences?
Those answers shouldn’t be scattered across prompts, application configuration, and tribal knowledge.
They should be explicit.
Measurable.
Enforceable.
And reviewed as usage grows.
Because the agent that performs beautifully with five users may behave very differently when five hundred people discover it.
The Sherpa’s Lesson
AI agents can be extraordinarily useful.
They can investigate problems.
Analyze customer behavior.
Retrieve information across systems.
And automate work that previously required people to jump between applications.
That’s the exciting part.
But they also create new workloads.
And those workloads don’t exist in isolation.
They share infrastructure with the applications, reports, integrations, and business processes that already depend on it.
We need to design for that reality.
Control concurrency.
Limit unnecessary work.
Use curated data.
Isolate workloads where appropriate.
Monitor resource consumption.
And make sure the agent understands – or is constrained by – the operational boundaries of the systems it uses.
Because the agent isn’t the only customer of your data platform.
Jeannine still needs her dashboard.
Finance still needs its reports.
Operations still needs its morning processing.
And the business still expects everything to work.
Your AI agent is doing its job. So why is everything slower?
Because we gave it access to production.
And forgot that production was already busy.
Leave a Reply
You must be logged in to post a comment.