The demo version of an agent is thirty lines. The version that touches a real enterprise system is mostly not about the model at all. These notes are about the parts that change.
Tool calls are privileged operations
In a demo, a tool call returns a string. In a real system, a tool call is an operation performed by a principal, subject to a permission check, writing an audit record, and possibly failing because a downstream quota is exhausted. The agent loop has to be aware of all three.
public sealed record ToolInvocation(
string PrincipalId,
string ToolName,
JsonElement Arguments,
string CorrelationId);
public interface ISafeTool
{
string Name { get; }
Task<ToolResult> InvokeAsync(ToolInvocation invocation, CancellationToken ct);
}
Every tool in the registry takes the principal and the correlation id. Nothing is ambient. That single design choice eliminated an entire class of “which user did this” incidents during the pilot.
Retrieval needs a freshness contract
A vector store answers a similarity question. The system needs an answer to a staleness question, and the two are not the same. Each retrieved chunk carries a source revision, and the agent is required to state that revision when it summarises.
var hits = await _retrieval.SearchAsync(query, topK: 8, ct);
var fresh = hits.Where(h => h.SourceRevision >= _clock.LastIndexedRevision(h.SourceId));
Cheap, and it stops the agent from confidently reporting a value that was true six hours ago.
Budgets beat retries
The first version retried on failure and had no ceiling. In production that turned a downstream slowdown into a request storm. The second version gives each agent run a token budget, a wall-clock budget and a tool-call budget, and treats exhaustion as a normal terminal state with a clear message.
Budget exhaustion being a first-class outcome, rather than an error, is what made the behaviour predictable under load.
Observability is a feature, not a panel
Every run emits the full tool-call sequence with timings and argument digests. Not the arguments themselves, the digests, because arguments can contain personal data. When something goes wrong, the trace has to answer “what did it do and in what order” without a data protection review.
What I still do not trust
Agent-written code that runs without review. The tooling here generates a diff and a test, and a human merges. That is slower than letting the agent commit, and it is the difference between an agent that is useful in a regulated environment and one that is a liability.
The number I care about
Not benchmark accuracy. The metric that mattered in the pilot was: how often did a run end in a state a human could not explain from the trace alone. Getting that to zero took more engineering than getting the task success rate up.
Cite this entry
Copy the block you need.
@misc{huang2026enterpriseaiagents,
author = {Mr Huang},
title = {Enterprise AI Agents in .NET 10: Wiring an Agent to Real Systems},
year = {2026},
url = {https://selfevo.dev/en/blog/tech/enterprise-ai-agent-dotnet10},
note = {selfevo, blog}
} TY - GEN
AU - Mr Huang
TI - Enterprise AI Agents in .NET 10: Wiring an Agent to Real Systems
PY - 2026
UR - https://selfevo.dev/en/blog/tech/enterprise-ai-agent-dotnet10
PB - selfevo
ER - Mr Huang (2026). Enterprise AI Agents in .NET 10: Wiring an Agent to Real Systems. selfevo. https://selfevo.dev/en/blog/tech/enterprise-ai-agent-dotnet10