Jul 18, 2026 · 11003 words · 52 min read

Autonomous Networks#

To save money, the CDN introduced a traffic optimizer that decided how many users should reach a PoP over each of its ISPs. The ISP circuits had different costs (some could be ~30% cheaper than others), and during some periods the network ran well under capacity. The optimizer re-planned the users’ spread over the ISPs, moving as many as possible to the cheaper providers if the path was good enough. It worked pretty well, and the transit bill dropped.

Then, one night, the optimizer shifted all the traffic (the whole cdn-eu prefix set) to the cheapest ISP in the Frankfurt PoP. At 03:00, the ISP looked fine: low load, and latency below the threshold. By the optimizer’s goal (minimize cost while the path is good enough), it was the optimal decision.

But what looked good at 03:00 was not the same at 09:00, when the traffic ramped up. The cheap ISP turned jittery under load: latency was acceptable on average but terrible at the 95th percentile, which is the metric a content-delivery service cares about. The p95 time to first byte went from 40 milliseconds to 90, and stayed there because the optimizer had no reason to move users back. It did what it was told, but what it was told was incomplete: the jitter budget was not a constraint, and nobody had simulated the plan under peak load.

The optimizer did not malfunction, but it did not have the whole picture because no one had defined it. The scariest automation failures are the optimal ones because they behave as expected, but any decision is only as good as the info it is based on.

This chapter complements the loops developed in Part 5, building on top of the previous deterministic loops (which follow the rules as a human wrote them), and adds a certain autonomy to choose the proper plan via a decision layer using an agentic architecture: agents coordinating to solve network problems as a team of network engineers would do. It completes the agentic orchestration introduced in the Agentic Orchestration section of Chapter 8.

This is an exciting scenario that is constantly evolving these days, and rather than delivering an implementation guide (you will find references for it at the end of the chapter), this chapter provides a mental model to approach it and start embracing the power of autonomous networks.

From Fixed Loop to Decision#

At every rung below this one, a human authored the loop’s actions. The engineer decided that a drifted config should be reconciled, that an ISP degraded past a threshold should be drained. The machine executed those decisions faithfully, which is what automation is for. At this rung the human stops authoring the actions and starts authoring the bounds: the constraints the system must never violate and the objectives it should pursue within them. The system chooses the action.

In the five stages of Chapter 16, that shift lands mostly on one stage, Decide, as Figure 18.1 shows. Sense now reads the probe history and a forecast built from it. Compare has no fixed target, because there is no single right state to compare against, only better and worse plans. Decide is where the new work happens: an optimizer and an AI agent choose a plan, and the risk tier decides whether it may go ahead. Act stays the change workflow it has always been, now with a canary in front.

The decision loop

Figure 18.1: The decision loop.

That is a genuine shift, and it changes what can go wrong. A deterministic loop fails in ways you can enumerate: it reverts a change it should not have, it flaps a marginal ISP. A decision layer fails in ways you did not think of, because its whole purpose is to handle cases you did not pre-script. Non-determinism is the price of generality, and it is why the bounds in the What It May Decide Alone section are the center of this chapter.

The layering is important: autonomy sits on top of the fixed loops, not in place of them. When the situation matches a deterministic rule, use it, because it is testable, explainable, fast, and cheap. The agent is invoked for the cases with no rule, and even then it does not act directly. It proposes, the proposal is simulated and gated, and only then does it become a change, through the same change workflow a human’s change goes through.

Two consequences of that layering are easy to miss, and both matter operationally:

  • The agent has to be invoked by something, and that trigger is itself governed. The healing loop of Chapter 17 hands off to the agent when its binary rule runs out. That happens when it wants to drain an ISP but the minimum-service floor or the capacity check forbids it, so there is a trade-off to decide and no threshold to trip. It also happens when a scheduled optimization window opens. The agent does not wander the network looking for things to improve; it is called for a bounded question.
  • Because autonomy sits on top, its failure is not an outage. If the agent or the optimizer is unavailable, the deterministic loops keep running on the last approved plan: the network still conforms and still heals, it just stops optimizing until the layer returns. Building autonomy as an extension is what makes that graceful degradation free.

Decision loops are less exotic than the word “autonomous” suggests, and you may already run some. Wireless controllers re-plan channels and transmit power on their own (radio resource management); SD-WAN controllers choose a path per application. Both are vendor-built decision loops over one domain. The decision layer of the Network Automation Platform (NAP) is worth building where the decision spans domains or vendors, or where the objective is yours to define, such as cost against your own commits.

Figure 18.2 shows the three layers: the decision layer on top, the deterministic loops beneath it, and one governed path to the network at the bottom.

The decision layer above the deterministic loops

Figure 18.2: The decision layer above the deterministic loops.

Inside the decision layer there are two very different components, and in the next section, I pull them apart.

The Two-Component Model#

“The AI decides” is not an architecture. Any decision that needs a plan rather than a rule splits into two very different components, with different properties and different risks. One computes: it forecasts what will happen and searches for the best plan under constraints. The other reasons: it decides what question to ask, which constraints apply today, and whether to trust the answer. Figure 18.3 opens up the decision layer of Figure 18.2 to show them.

The two components of the decision layer

Figure 18.3: The two components of the decision layer.

In the content network, the two look like this:

  • Mathematical: It forecasts per-ISP performance from the synthetic-monitoring history built in Chapter 17, and it solves an optimization. It spreads each prefix set’s users across the available ISPs to minimize cost, subject to the minimum-service floor, the consumer Service Level Objective (SLO) tolerances, and the capacity of each ISP. This is where the actual decision math lives, and it is the more trustworthy half because it is constrained and testable. You can run it against held-out history and check its plans. It is closer to an optimizer with a forecast than to anything mysterious.

  • Agentic: It is the reasoning layer from the Agentic Orchestration section of Chapter 8, built on a Large Language Model (LLM), and its job is not to compute the numbers but to run the decision. It frames the problem and gathers the intended state from the Source of Truth (SoT) and the operational data from Observability. It decides what constraints apply right now and invokes the optimizer as a tool. Then it interprets the result, explains it, and hands it to the guardrails. It handles the messy, underspecified parts that a solver cannot: is this even a situation that should be optimized, or one that should be escalated?

The problem the mathematical component solves has one quantity to minimize and everything else as a constraint:

minimize   total_cost = sum over isp of bill(isp)

  bill(isp) = commit_price[isp]
            + overage_price[isp] x max(0, forecast_p95_load[isp] - commit_gbps[isp])

subject to:
  reachability:  users of a prefix ride only ISPs that carry that prefix
  floor:         active_isps(prefix) >= min_service_isps(prefix)
  capacity:      load(isp) <= capacity_gbps[isp] x safe_utilization
  performance:   forecast_p95_latency(prefix, isp) <= tolerance(prefix)
  stability:     apply a plan only when its cost gain clears a set margin
Listing 18.1: One example: egress cost across ISPs.

Cost is the only quantity minimized. Reachability, the floor, capacity, and performance are hard constraints, satisfied or the plan does not exist, which is the distinction the What It May Decide Alone section turns into the chapter’s central guardrail. The two forecast terms are the mathematical component’s other half, learned from the synthetic-monitoring history. The optimizer is only as trustworthy as that forecast. That is why the Learning While Running section trains it on measured outcomes, and why the guardrails never ship its plan without a canary.

The cost is not simply traffic multiplied by a price. Transit is usually billed on the 95th percentile: the provider samples your traffic every five minutes for a month, discards the top 5% of samples, and bills the highest one left, against a rate you committed to. So the optimizer works on each ISP’s forecast monthly 95th percentile. Two consequences follow. Short bursts that stay inside the top 5% of samples cost nothing extra, while a sustained shift onto a cheap ISP can push its 95th percentile past the commit and erase the saving. A settlement-free peer behaves the other way round: it costs nothing per bit until the link fills.

Nothing about the math is exotic. It is a linear program, or a mixed-integer one once a plan must choose whole ISPs, and open-source solvers such as Google OR-Tools or PuLP solve it at this size. The forecast is machine learning too, but a different kind from the language models later in this chapter: it learns patterns from numbers, not words. It can start as a seasonal time-series model, built with a library such as Meta’s Prophet and trained on the probe history, before anything more ambitious.

Service providers solve a cousin of this problem every day, with a path computation element (PCE) that programs Segment Routing or RSVP-TE paths across their own backbone. The architecture is the same: a solver under constraints, fed by measurement, acting through a controller. What differs is the domain. A PCE steers traffic inside a network you own; this chapter steers it across ISPs you do not. And the internet-edge version has been run in production at large scale. Facebook’s Edge Fabric and Google’s Espresso, both in this chapter’s references, choose egress across thousands of peers and transit links by measured performance, and both separate the decision from the Border Gateway Protocol (BGP) mechanics the way this chapter does.

Keeping the two separate is a safety property (not a diagram convenience). The numbers come from the optimizer, which is deterministic and auditable. The agent decides when to run it and whether to trust what comes back. It does not choose the hard constraints: the optimizer reads those from intent, so an agent that forgets the jitter budget cannot drop it. Its judgment is bounded by the gates in the What It May Decide Alone section. You get the generality of an agent without staking a routing decision on an unexplained inference, because the routing math is not the agent’s to invent.

The opening story reads differently in this light. The failure was not that the Artificial Intelligence (AI) went rogue. It was an optimizer given an incomplete objective, cost with no jitter constraint, and a decision layer with no simulation gate. The fix lives in both components: encode the jitter budget as a constraint the optimizer must satisfy, and make the agent simulate before it proposes.

The same split works far from a content network. On a campus, the 800-switch firmware upgrade of Chapter 12 needs a wave plan. A scheduler, the mathematical component, packs switches into waves under the book’s rules: buildings in sequence, one alone first (Chapter 8), redundant pairs never in the same wave (Chapter 11), and every wave inside the window (Chapter 6). An agent frames the run: it reads the change calendar and the open incidents, decides which buildings to hold back, and explains the plan to the engineer who approves it. In a data center, a capacity agent reads the utilization trends, calls a forecast, and proposes which pods need new uplinks before next quarter, again for a human to approve. Either way, the arithmetic stays in a solver, and the agent does the framing and the explaining.

The mathematical half is familiar engineering. The agentic half is where most of the new questions are, and in the next section, we are going to build it.

Building the Agentic Layer#

The two-component model says what the decision layer contains. This section is about building its agentic half, and it answers four questions in order: how several agents work together, where they run, which model sits behind them and what it costs to run, and whether they learn. Each answer leans on a block or a pattern the book already has, because an agent is one more consumer of the NAP, not a new kind of platform.

How Agents Work Together#

Start with one agent. A small team often starts with one person who does a bit of everything, and you add people when the work needs different skills, different accountability, or a different perspective. Agents work the same way. One agent, with the optimizer and the NAP’s tools, can run the whole decision, and every agent you add brings more cost, more latency, and new ways to fail. Split the work only when the roles need different tools, different privileges, or a second opinion.

In the content network, the decision runs once a night, in the low-traffic window: it re-plans how each point of presence spreads its users across its ISPs for the next day. That run is a case where all three reasons apply, and three roles take part:

  • The planner frames the question, reads effective intent and the per-ISP forecast, runs the optimizer, and proposes a plan. It is the only one allowed to submit a proposal.
  • The capacity analyst reads utilization and the traffic matrix from Observability and constantly checks each ISP’s headroom at the coming peak. It can read, never write.
  • The reviewer challenges the plan against the constraints and the consumer tolerances, looking for what the objective left out. It can accept, reject, or escalate to a human, and nothing else.

Each role is narrower than one generalist agent would be, which is least privilege applied to agents. And the reviewer is the role the opening story was missing. Asked to check the cheap-ISP plan, it finds that cdn-eu has no jitter tolerance in the Source of Truth at all, and escalates the gap instead of approving a plan that cannot be checked.

Each role can also use a different model. The analyst’s work is narrow and repetitive, so a small, fast, cheap model does it well. The planner and the reviewer weigh trade-offs, so they get a larger, slower, more capable one. It is the same choice as staffing a team with junior and senior engineers: match the cost to the judgment the job needs. The Choosing a Model section covers how to make it.

What makes each of them an agent, and not just a prompt, is a definition, and definitions belong to the Orchestration layer. Like the workflow definitions of Chapter 11, they are data, kept in version control, reviewed like code, and used by the Orchestrator to start each agent. The work itself can happen in any block: the planner works in Orchestration, an agent that renders and pushes a change works in Execution, and one that investigates telemetry works in Observability. Listing 18.2 shows the reviewer’s definition.

agent:
  name: plan-reviewer
  role: challenge a proposed egress plan against intent and tolerances
  model: approved/general-reasoning@2026-05    # pinned, never "latest"
  tools:                                       # MCP surfaces it may call
    - sot.read_effective_intent
    - observability.read_isp_health
    - simulation.run_whatif
  may_write: []                                # reviews only
  outputs: [accept, reject, escalate]
  budget: {max_tool_calls: 20, max_tokens: 60000, timeout: 5m}
  invoked_by: [orchestrator]
Listing 18.2: An agent definition.

Every field answers a question someone will ask later: what the agent is for, which model and version made the decision, what it could touch, what it could produce, how much it could spend, and who could start it.

The tools list matters most. It is the agent’s scope: an agent can act only through the Model Context Protocol (MCP) surfaces it lists, so the list decides which blocks it works in and what it can touch. Adding a tool is a change of privilege, and it is reviewed like one.

The definition does not stay a file. When the Orchestrator starts the agent, it turns each field into a control that lives outside the model, where the agent cannot argue with it:

  • model becomes a route in the model gateway, which refuses any other model or version.
  • tools and may_write become the agent’s scope, checked by each MCP server on every call against the run’s workload identity from Chapter 13.
  • budget becomes counters the framework enforces; reaching one ends the run as an escalation.
  • outputs becomes the schema of the run’s result, and anything outside it is rejected.
  • invoked_by becomes the only caller the runtime accepts.

The instructions tell the agent what it should do. The definition decides what it can do.

With the roles defined, the agents still have to work together. The Agentic Orchestration section of Chapter 8 introduced an agent as one more way the Orchestrator coordinates work; here several agents coordinate with each other. There are three common shapes, and Figure 18.4 shows them with the same three agents.

Three ways agents coordinate

Figure 18.4: Three ways agents coordinate.
  • Supervisor and workers. One coordinator, the supervisor, splits the task, hands each part to a worker, and assembles the result. Anthropic’s guide to building agents, Building effective agents, calls it orchestrator-workers, and it is the orchestration of Chapter 8 with agents as steps. One place owns the plan, so it is the easiest shape to audit and to stop.
  • Peers that hand off. Each agent finishes its part and passes the work to the next, or the agents argue until they agree. This is choreography, and it has choreography’s trade-off from Chapter 8: flexible, with no single owner, and harder to trace. Two agents can also hand the same question back and forth without ever converging, spending tokens the whole time.
  • Shared state. The agents never talk to each other directly. Each reads and writes one shared record, and the next agent picks up what the last one wrote. In the NAP that record is the workflow state the Orchestration layer already keeps: the planner writes its draft plan there, the analyst annotates it, and the reviewer reads both. Only the final proposal leaves it, as a gated write to the Source of Truth.

Use the first shape by default, with the supervisor running as a workflow in the NAP’s Orchestrator: a workflow whose steps are agents, durable, audited, and governed like any other change workflow. Let an agent supervise other agents only for open-ended investigations, where the steps cannot be known in advance. Combine it with shared state, so that what the agents produce lands in the Orchestration layer’s state store and the audit trail, not in a conversation nobody keeps.

Two protocols cover the connections, and Figure 18.5 shows the difference.

MCP and A2A

Figure 18.5: MCP and A2A.
  • MCP connects an agent to its tools. The tools are the NAP’s blocks: the Source of Truth, Observability, Execution. Every agent in this chapter uses it.
  • A2A (Agent2Agent Protocol) connects one agent to another. An agent publishes a card that says what it can do, and other agents send it tasks (specification). Inside one NAP, where the Orchestrator starts every agent, you rarely need it. You need it when agents built by different teams, or bought from different vendors, have to call each other directly, such as a security team’s agent asking the network’s planner what a change will do.

Whatever the shape, cap it. Give every multi-agent run a maximum number of turns, a token budget, and a deadline, and treat hitting any of them as an escalation instead of a retry. Agents that agree too easily are a subtler risk, covered in the Approvals and Disagreement section.

With the agents defined and coordinated, where do they run?

Where Agents Run#

An agent is a NAP component, and it runs where the other NAP components run. Figure 18.6 shows the stack for a network spread across two regions.

Where agents run

Figure 18.6: Where agents run.

Read it from the bottom up:

  • Models need Graphics Processing Units (GPUs), and those are a separate resource. Running a language model takes GPUs. They can be your own, a GPU pool on the Internal Developer Platform (IDP) or dedicated hardware, or an external LLM provider’s, reached through its Application Programming Interface (API) or a private deployment; the Choosing a Model section covers the choice. Either way, agents never call a model directly. They go through a model gateway the NAP owns: one place for model credentials, version pinning, routing to the right model, redaction, logging, and token accounting.
  • Agents run on the IDP’s runtime. Like the rest of the NAP, an agent is packaged, deployed, and operated on the IDP of Chapter 11, with containers, a workload identity from Chapter 13, secrets, and logs. It needs no special platform.
  • The agentic framework hosts the agents. It sits between the runtime and the agents, and running agents on a network takes more than a framework for code assistants. It needs the agent loop, a registry of tools (the MCP surfaces), state and memory, the model gateway, identity and policy, tracing, evaluation, and human approvals, and it has to work with the Orchestrator, not beside it.
  • The Orchestrator sits above them all. It holds the agent definitions, starts each agent, and keeps the global view.

GPUs are easy to forget. When you use a hosted assistant, the provider runs the model on its GPUs and you never see them. Bring a model in-house, for data residency or for cost, and those GPUs become your capacity plan, your budget, and your on-call rotation.

A worldwide network changes the picture. With data centers and points of presence on several continents, one central agent stack is a single point of failure and a long way from the devices. This is the centralization-versus-federation decision of Chapter 12, applied to agents, and the test is the same: how much of each region’s work can be decided with only local data? For an edge optimizer, nearly all of it. So the stack runs per region, close to the devices and the data it reads, and three rules follow:

  • Decide locally. A partition between regions must not stop a region’s own decisions. Each region keeps its agents, its state, and its last approved plan.
  • Keep data in its region. Each region’s gateway enforces data residency: which models may see that region’s configurations and telemetry, and where those models run.
  • Coordinate globally in one place. Decisions that span regions (e.g., moving users between points of presence on two continents) go through the Orchestrator’s global view.

Frameworks change fast, so treat these names as a snapshot from late 2026. LangGraph, from the LangChain project, models an agent as a graph of steps with explicit state. CrewAI organizes agents as a crew with roles. The model providers ship their own agent SDKs. And a durable workflow engine, such as Temporal from the Solutions Landscape of Chapter 8, can host the agent loop as an ordinary workflow. None of them provides everything on the list above on its own, so expect to assemble the framework from parts.

The tools named here are examples for explanatory purposes, not recommendations, current at the time of writing (late 2026). Evaluate them against your team’s skills, your NAP, and how fast each project changes.

Not every agent is yours to run. A vendor’s assistant, or another platform’s agent, stays outside the NAP and comes in through the Presentation layer’s MCP server of Chapter 9, under its Role-Based Access Control (RBAC), like any other consumer. You see its tool calls but not its reasoning.

For the decision layer in this chapter, the planner, the analyst, and the reviewer are steps of a workflow the Orchestrator runs, deployed in each region. Use a framework inside that step if it helps you write the agent. Just do not let it become a second orchestrator, with its own state and its own audit trail that nobody else reads.

Every agent in that stack calls a model, and which model is the next decision.

Choosing a Model#

Models are not interchangeable. They differ in how well they reason through a multi-step problem, how reliably they call tools with valid arguments, how much they cost, how fast they answer, and where they are allowed to run. The model you pick sets the ceiling on what an agent can do, and the bill for every run.

If you do not know where to start, narrow the field first and test second. Three places narrow it. The providers’ own model cards and pricing pages state what each model is built for, its limits, and its price. For open-weights models, Hugging Face hosts the models, each with a model card covering its intended use, limitations, training data, and evaluation results. And public leaderboards rank models by blind comparisons and standard tests; treat them as a shortlist, not a verdict. Start with a mainstream hosted model on the read-only assistant described in the From Shadow to Production section. Keep every question engineers ask it, with the answer they judged right, and that log becomes your first evaluation set.

Then test on your own work. Public benchmarks measure general skill; what you need to know is how a model does on your decisions. Build an evaluation set from the automation track record: past optimization windows and escalations, each with what the engineers decided and what happened next. A few hundred cases is a useful start. Run every candidate model through it in shadow and score four things:

  • Task success: would its plan have been approved, and was it right?
  • Tool-call accuracy: did it call the right tool, with valid arguments?
  • Cost: tokens and money per decision.
  • Latency: time from the trigger to a proposal.

The same set guards every upgrade. A new model version can reason differently from the same prompt, so pin the version in the agent definition and re-run the evaluation set before you change it, the way Chapter 11 gates any NAP release.

One model rarely fits every step. A large general model is worth its cost where the work is open-ended: the planner framing the question, the reviewer looking for what the objective left out. Narrow steps (e.g., classifying an alert, extracting fields from a ticket, or summarizing a log) run well on small or specialized models that are cheaper, faster, and can run on your own hardware. Route each step to the smallest model that passes its part of the evaluation set. Small language models fine-tuned specifically for networking are still mostly research; treat them as future evaluation work, measured on the same evaluation set as every other candidate. And remember which parts are not language models at all: the forecaster and the optimizer stay mathematical.

Then decide where the model runs, because that decides where your data goes. Configurations sent outside your network leave your control, so choose as carefully as you chose where the audit log is stored. Three separate questions are easy to mix up:

  • Who runs the model. An external LLM provider runs it on its GPUs and sells you access, through a public API or a private deployment in your cloud tenancy. Or you run it on your own GPUs, and operate them.
  • What kind of model. A proprietary model is available only from its maker. An open-weights model publishes its trained weights, so anyone, you included, can run it. Open weights let you run a model yourself; they do not oblige you to, and you own any quality gap your evaluation set shows.
  • Under what contract. With a provider, the contract decides what happens to your data: how long prompts are kept, whether they are used to train future models, and in which region they are processed. Read it as the data-processing agreement it is, the same way your organization already reads the contract of any SaaS or IaaS service: data residency, retention, sub-processors, and what happens to the data when the contract ends. An LLM API is one more cloud service, and the rules you apply to the others apply to it.

The data classification of Chapter 13 (Figure 13.6) makes the choice for each step. Public and internal data, such as per-ISP health and forecasts, can go to an external LLM provider under a contract that rules out retention and training. Sensitive data, such as full configurations with secrets or customer addresses, stays on a model you run, or is redacted before it leaves.

Whatever you choose, the agents reach the model through the model gateway described in the Where Agents Run section, so changing where a model runs later does not change the agents.

Every run costs tokens, whichever model you pick. On an external LLM provider, tokens are money. On your own GPUs, they are capacity: every token one agent spends is GPU time another agent waits for. Either way, they are most of the agent’s latency, and they add up faster than a demo suggests: every turn resends the whole context window, with the instructions, the tool definitions, and everything read so far. These habits cut them, roughly from the biggest saving to the smallest:

  • Do not ask a model what a rule can answer. The layering already does most of this: the deterministic loops of Chapter 16 and Chapter 17 handle the common cases, and the agent sees only the residual. Inside a run, anything deterministic, such as the optimizer, a simulation, or a schema check, is a tool call, not reasoning.
  • Send views, not dumps. The context-specific views of Chapter 5 exist for this. The planner asks for one site’s prefix sets, ISPs, and tolerances, not the whole model for thirty points of presence.
  • Make tools return structure. A tool that returns a full running configuration costs that many tokens every time it is called. One that returns the normalized fields the agent asked for costs a fraction of it.
  • Reuse what does not change. Providers charge less for a repeated prompt prefix, and the software that serves a model on your own GPUs can cache it too. So put the stable parts first, the instructions and the tool definitions, and the changing parts last.
  • Use small models for small steps, as described above.
  • Budget every run. The budget in Listing 18.2 caps tool calls, tokens, and time, and hitting it is an escalation.

Measure tokens per decision as a service level indicator, next to the acceptance rate. A jump after a prompt change or a model upgrade is a regression, the same as a jump in latency.

A chosen model still has to get better over time, which raises the last question of this section: whether agents learn.

Learning While Running#

Agents do learn, but not the way people do. A model’s weights, what it learned in training, do not change while it runs: the same model answers the next request as it would have answered the first. What changes is what you put in front of it, at three levels:

  • Context, per run: the intent, the tolerances, and the runbooks retrieved for this decision.
  • Memory, across runs: a store of past decisions, outcomes, and human corrections, retrieved when a similar case comes up. The next time the planner considers moving cdn-eu at Frankfurt, it reads that the reviewer once escalated a missing jitter tolerance there. This is how an agent appears to learn while it runs.
  • Weights, offline: fine-tuning on curated cases, checked against the evaluation set, and released as a new pinned version, like any NAP artifact.

Memory is an input like any other, so it can be poisoned: a wrong correction, or text an attacker planted in a ticket, becomes a lesson the agent applies next time. Treat it like intent. Version it, record who or what wrote each entry, let a human review what is written, and expire entries that have not been confirmed. Engineers keep tuning too, as in Chapter 16: they read the NAP’s record of the agents’ decisions and adjust constraints, tools, and instructions.

Underneath the agents, the two components of the decision layer learn in different ways, and conflating them is a common mistake.

The mathematical models are trained. The forecaster learns from the synthetic-monitoring history; the optimizer’s cost and performance models are fit from measured outcomes and from the automation track record of Chapter 14, which records how past plans actually turned out. They are retrained on a cadence and, more importantly, they can be evaluated: hold out a period of history, ask the model to plan it, and compare against what happened.

The same comparison runs live after every decision. Record what the forecast predicted for each plan, the 95th-percentile load and the latency per ISP, and compare it with what the probes and the next bill measured. Random error is expected. Error that leans one way is bias, and a biased forecaster makes the same mistake in every plan. When the gap passes an agreed tolerance for one ISP, plans that move traffic onto that ISP return to approval until its forecast is retrained. The rest of the agent’s work carries on in its earned tier.

The agentic layer is mostly not trained; it is influenced. You shape its behavior through the context you retrieve for it: the current intent, the active tolerances, the floor, the runbooks. You also shape it through the tools you give it, through guardrails, and through examples, including the corrections a human makes when the agent escalates. Fine-tuning a specialized forecaster is often worth it; fine-tuning the general reasoning layer rarely is, when the same effect comes from better context and tighter tools.

One invisible link that runs through the book makes autonomy possible. A model is only as trustworthy as the data it learns from. The data that trains and evaluates these models is the audit trail built for governance: the automation track record of Chapter 14 and the Provenance Chain of Chapter 13. Those were introduced to answer an auditor. They turn out to be the labeled, tamper-evident record of what the automation did and what resulted, which is the corpus you need to train and validate a decision model safely. The governance you built to be compliant is the same governance that lets you be autonomous. If you skip it, you are training on unlabeled guesses.

The agents are now built, hosted, and improving. The rest of the chapter is about managing them.

Managing Agents Like a Team#

Managing agents is managing a team, at scale. Anyone who has run a team already knows the questions. How much do you trust a new hire? What may they touch? How do you know what they are doing? Who signs off? What do you do when your experts disagree with you? What do you keep on file? Agents raise every one of them, and Figure 18.7 shows that the answers are mostly controls this book has already built.

Managing agents like a team

Figure 18.7: Managing agents like a team.

The differences are speed and numbers (not accountability; humans are still accountable). Agents work faster than people and in larger numbers, so a mistake repeats before anyone notices. Copies of one agent share the same blind spots. An agent cannot be held accountable, so every control ends at a person. Every control here therefore starts from the zero-trust stance that Chapter 13 takes with any identity: trust what the agent did, not what it says it did. Its tool calls and their results are the record, and its own account of its work is a claim to check.

The scale challenge determines how to implement it. Usually, a manager handles up to eight or ten people on the team (I have worked as a manager, and I know that in some environments, going beyond that is challenging). Here, you could be managing more than forty agents, each running every optimization window in every region! A review someone has to remember, a permission someone grants in a console, or a record someone files falls behind the first time the agents outnumber the people.

You cannot handle that unless you manage it as code. Then, the NAP runs it on every agent and every run, and people review changes to that code rather than the act it performs. It is the rule Chapter 13 set for governance, applied to agents: only the guardrail logic needs a human’s review. Table 18.1 maps each practice of managing a team to the code that does it.

Team practiceManaging peopleManaging agents
OnboardingSomeone creates the account and grants accessThe agent definition (Listing 18.2) merges through review, and deploying it issues the workload identity and tool scopes. Nothing else does
Limits of authorityA manager tells a junior what they may decideRisk tiers and policy-as-code gates evaluate every proposal; the agent’s highest tier is a field in its definition
Watching the workSomeone reads the logsEvery run emits a trace and service level indicators, and alerts fire on the objectives
Performance reviewA conversation every quarterThe evaluation set runs on every release, and the track record, computed from run records, proposes promotions and demotions
ApprovalsA meetingThe risk tier routes each proposal: automatic inside the agent’s tier, a human only for escalations
RecordsSomeone files the decisionThe Provenance Chain records every proposal, tool call, and approval as it happens
OffboardingSomeone remembers to revoke accessDeleting the definition revokes the identity, the tools, and the model route; an agent with no owner in the registry is switched off
Table 18.1: Managing people, and managing agents as code.

Two things stay with people. They approve changes to the code: a new agent definition, a wider tool list, a promotion to a higher tier. And they answer the escalations the code raises. Everything else runs without anyone remembering to do it, which is the only way it keeps up with the agents.

The five sections that follow take the questions in order: onboarding, limits of authority, watching the work, approvals and disagreement, and what to keep on file. Each one names the control, and each control runs as code.

Onboarding a Junior: Identity and Privileges#

A new hire gets a badge for the rooms their job needs, and nothing more. An agent gets the same on day one, and it never gets the master key: an agent that reaches into devices directly is a security incident waiting to happen. The agent acts the way everything else in this book acts: through governed interfaces, with a scoped identity, fully audited.

The mechanism is a set of MCP tool surfaces, one per building block, each least-privilege. An MCP tool surface is a set of typed tools. The agent chooses which to invoke, and in what order, at runtime, based on the result of each call. A Representational State Transfer (REST) client follows a sequence fixed in code (the API Types section of Chapter 9 draws the REST-versus-MCP distinction). This agent runs inside the NAP, started by the Orchestrator, so it uses the per-block tool surfaces; an agent from outside the NAP would come in through the Presentation layer’s MCP server instead. Each surface is exposed the way Chapter 9 describes and access-controlled the way Chapter 13 requires:

  • The SoT: read declared and effective intent, and propose a gated write, either a dynamic-intent override like the one Chapter 17 writes or a change to declared policy. Never a direct write.
  • Synthetic monitoring and observability: read current and historical per-ISP health.
  • Simulation (Chapter 10): a mandatory what-if before any proposal, run against a realistic model of the network.
  • The change workflow: submit a proposed change through the same governed path a human uses, with the same validation and rollback safety, never around it.
  • The risk-tier and policy service (the Tiered Risk Classification section of Chapter 13): ask what tier a proposed change is, so the gate can decide auto versus escalate.
  • Audit and provenance: record every proposal, every simulation result, and every action.

The point is that the agent gets no special powers. It becomes a third author of intent, alongside the human and the healing loop, writing to the same intent, and it is the most constrained of the three. It has a workload identity, a least-privilege scope, and a full audit trail, which is the “identity is the new perimeter” principle from Chapter 13 applied to a non-human actor. Nothing here is new machinery. It is the Part 2 building blocks, exposed as tools, behind the Part 3 governance.

Those privileges are not fixed on day one, any more than a junior’s are. They grow with the agent’s track record, one risk tier at a time, and they can shrink. Figure 18.8 shows the shape. The curve is illustrative.

Earning autonomy over time

Figure 18.8: Earning autonomy over time.

The agent starts in shadow mode, deciding nothing alone, and earns the lowest risk tier once its shadow plans match what the engineers would have approved. An incident sends it back to approval for that tier until the cause is fixed and the record recovers. Each later tier is earned the same way. Two lines never move. Novel and high-blast-radius decisions always go to a human, and full trust never appears on the chart, for the same reason no engineer, however senior, approves their own change. The From Shadow to Production section turns this curve into steps.

I do not fully trust anyone, and that includes me. I know I can be biased, tired, or missing half the context, usually all three at 02:00. So I put controls on my own decisions: I sleep on the big ones, and I ask someone to argue with me. I have never granted myself unlimited autonomy. I am not about to grant it to an agent.

An LLM-based agent does add risks that a deterministic loop does not have, and the OWASP Top 10 for LLM Applications catalogs them. Two of them, sensitive information disclosure and a compromised model, are what the Choosing a Model section handles, by deciding where each model runs and pinning its version. Two others matter most for the agent’s identity and tools:

  • Prompt injection. The agent reads interface descriptions, log lines, and tickets, and any of them can carry text written to steer it. Treat everything it reads as data, never as instructions, and let no tool call depend on free text alone.
  • Tool poisoning. An MCP server is code you run with the agent’s identity. Review it, pin its version, and scope it like any other dependency.

Network engineers will add a list of their own, because a language model’s mistakes look different on a router:

  • Invented syntax. A model can produce a command or a Yet Another Next Generation (YANG) path that looks right and does not exist, a hallucination.
  • The wrong dialect. It mixes one vendor’s syntax into another’s, or uses a feature the device’s OS version does not have.
  • Plausible but wrong. The configuration is valid and does the wrong thing: a route-map clause in the wrong order, a prefix list one bit too wide.

The design answer is the one this book has given since Chapter 4: the agent proposes intent, never configuration. Templates render the configuration, schema checks reject invented fields, configuration analysis and simulation catch the plausible but wrong, and the canary catches what they miss. An agent that writes Command Line Interface (CLI) directly skips every one of those gates.

Identity limits what an agent can reach. Then, what may it decide once it gets there?

What It May Decide Alone#

The question is not what the agent can decide but what it is allowed to decide alone. The answer is a set of bounds that do not move but allow dynamism.

The first and most important is the distinction between a hard constraint and a soft objective, because the opening story was a failure to draw it. Cost is a soft objective: minimize it. The minimum-service floor and the consumer SLO tolerances are hard constraints: satisfy them, always, and never trade them away for a better objective. The design rule is clear: encode the floor and the SLOs as hard constraints in the optimizer rather than as weighted terms in the objective function. A weighted term can be outweighed, which is how a jitter budget disappears under a large enough cost saving. A hard constraint cannot. Had cdn-eu’s jitter budget been a constraint rather than an omission, the cheap-ISP plan would have been infeasible, and the optimizer would never have proposed it.

Where the constraints come from is as relevant as how they are encoded. The optimizer reads the floor and the tolerances from effective intent in the SoT, not from the agent’s request. The change workflow then checks the plan against them again before it applies anything. The agent can add a constraint to a run but never remove one. With two independent checks of the same rule, a misbehaving agent fails before hitting production.

The rest of the guardrails are the ones the book has already built, now pointed at the agent. Risk tiers (the Tiered Risk Classification section of Chapter 13) decide what the agent may apply on its own and what it must escalate. A small shift of a low-value prefix set is automatic. A change that moves a large prefix set or approaches the floor escalates. Simulation must pass before any proposal becomes a change. Blast-radius limits from Chapter 12 bound how much one decision can touch.

One guardrail is specific to a system that decides rather than reacts: it must not thrash. An optimizer that re-plans on every small measurement change will move prefixes around constantly, which is route-flap by another name and destabilizing in its own right. So the agent changes the network only when the expected gain clears a meaningful margin over the current plan, and it is rate-limited in how often it may act at all. A plan that is 2% cheaper is not worth a routing change; a plan that is 30% cheaper and inside every constraint is. Stability is a constraint too.

The agent must also know when not to decide. A forecast built on stale or missing probe data is a guess, and an optimizer fed a guess returns a confident, wrong plan. So every input carries its age, and the decision fails closed. If the probe history for an ISP is older than its freshness limit, or a vantage point has gone quiet, the agent keeps the current plan and raises an alert instead of re-planning. Holding still is always a valid decision.

Replay the opening story with these in place. The optimizer, now carrying cdn-eu’s jitter budget as a hard constraint, cannot produce the cheap-ISP plan at all. There is no plan that cuts the cost and satisfies the jitter budget at the same time. Thus, the optimizer has nothing valid to return.

Simulation adds a second layer, though its reach is limited. A simulator reliably catches structural violations, a plan that breaks the floor or strands a prefix. It cannot promise how a real ISP will jitter under next week’s peak; that is a forecasting problem more than a simulation one.

So the third layer is a staged rollout. Apply a new plan to a fraction of the affected traffic first, and watch the real health signal from Chapter 17 before committing the rest. It is the canary discipline Chapter 11 applies to NAP releases, and the wave discipline Chapter 8 applies to network changes. Constraint, simulation, and canary together are what turn “optimal by an incomplete objective” into a plan that is either rejected before it ships or caught the moment it starts to hurt.

Bounds only work if you can see the agent working inside them.

Watching the Work#

A manager of a remote team does not watch every keystroke, but can always see what was delivered, how, and why. An agent needs the same, and the record has to be built in, because an agent leaves no impression in a hallway.

Trace every run. The trace holds the agent’s run, each model call with its model, version, and tokens in and out, each tool call with its arguments and result, and the final output, all linked to the run record of the change workflow. OpenTelemetry defines semantic conventions for agent spans, still marked as in development, so these traces can land in the same tracing backend as the rest of the NAP, the distributed tracing of Chapter 12. Tools built for this, such as the open-source Langfuse and Arize Phoenix, or LangSmith from the LangChain project, show each run as a tree of model and tool calls with their tokens and cost. Most of them accept OpenTelemetry traces, so they sit beside the NAP’s tracing instead of replacing it, and the disclaimer in Where Agents Run applies to them too.

Listing 18.3 shows one such trace, the reviewer’s run from the cost window, cut to its steps.

run job-20260718-0258   agent plan-reviewer
model approved/general-reasoning@2026-05
02:58:10 invoked by orchestrator: review proposal p-4471
         (move cdn-eu onto local-c at dc-fra)
02:58:12 sot.read_effective_intent(cdn-eu)
         -> latency 40 ms, jitter: none set
02:58:14 observability.read_isp_health(dc-fra, 30d)
         -> local-c p95 jitter 18 ms at peak
02:58:21 simulation.run_whatif(p-4471)
         -> structural checks pass
02:58:25 escalate: "no jitter tolerance for cdn-eu;
         local-c jitters at peak; cannot verify the plan"
tokens 31,200 in / 1,150 out, 3 tool calls, 15 s
Listing 18.3: One agent run, as a trace.

Every line answers a question a manager would ask: what it read, what it ran, what it concluded, and what it cost. None of it depends on trusting the model’s account of its own thinking; all of it can be checked.

Keep the reasons the agent gives in its output, because the explainability commitment later in this chapter depends on them. But do not treat a model’s intermediate reasoning as the record of what happened. It is a narrative, not evidence. The tool calls are the facts: what the agent read, what it ran, and what it submitted.

Then review like a manager:

  • Every escalation and every revert, read in full.
  • A weekly sample of ordinary runs, to catch drift before it shows up in the numbers.
  • Outliers: runs with unusual token counts, many more turns than usual, or a budget hit.

Alert on behavior and not only on errors: a rising tool-call error rate, repeated budget hits, or an agent calling a tool it has never used before. A junior who suddenly opens the payroll system gets a question, and so does an agent that suddenly reads secrets.

Seeing the work raises the next question: who signs off, and what happens when the agents and the people disagree.

Approvals and Disagreement#

The agent is never an approver: the Gates and Approvals section of Chapter 13 already settled that a change requiring human authorization gets a human, because a model has no accountability standing.

Disagreement starts among the agents themselves, and you want it to. The reviewer exists to challenge the planner, so run them as a short debate: the planner proposes, the reviewer critiques the plan against the constraints and the tolerances, and the planner revises. Anthropic’s guide calls this the evaluator-optimizer pattern. Cap it at a few rounds. A plan the reviewer still rejects after the last round does not ship: it escalates to a human with both positions attached, the planner’s case and the reviewer’s objection, the brief an engineer needs to decide.

Which changes need a human’s approval is decided by risk tier, as for changes people submit. The reviewer agent is a check but not a sign-off: it can block a plan, but it cannot approve one on a human’s behalf.

The harder case is disagreement between the agents and a person. Suppose the planner, the analyst, and the reviewer all recommend moving cdn-eu off tier1-a tonight, and the on-call engineer disagrees: she knows the provider has announced maintenance on the alternative tomorrow morning. Three agents agree, one person does not. Treat it the way you would treat three experts arguing against you: their agreement is evidence, not authority. Two questions decide how much weight it carries.

  • Are they independent? Three agents on the same model, reading the same context, are one opinion asked three times. Chapter 17 trusted a quorum only because the vantage points failed independently, and the same rule applies here. Agreement counts for more than one vote only when the agents differ: in model, in data, or in a role whose job is to disagree.
  • What does the evidence say? Ask the agents for what their recommendation rests on, and record the engineer’s reason for overriding it. If she was right, the reason becomes a memory entry, and perhaps a new input: the providers’ maintenance calendar. If the agents were right, the record says so, and it enters the track record.

Either way, the human decides and owns the decision. Keep an override cheap and recorded. If overriding the agents is harder than following them, people stop overriding, which is what human-factors research calls automation bias, and the escalation path exists only on paper.

By now the network has four kinds of writer: engineers, the conformance loop of Chapter 16, the healing loop of Chapter 17, and the agents. When two of them want different things, the order is set in advance instead of argued at run time:

  1. Hard constraints beat every automated actor. The floor, the SLO tolerances, and the management path hold whoever is asking. Only a human with the authority Chapter 13 assigns can relax one, and that is a change to policy, not an override.
  2. A human’s explicit decision beats a machine’s, inside those constraints, and is recorded with its reason.
  3. An active override beats declared intent while it lasts: a healing drain, or an approved agent plan written as dynamic intent with an expiry. When two overrides collide, the one that keeps more capacity in service wins until a human decides.
  4. Declared intent is what the conformance loop restores once every override has expired.

The order is enforceable because no machine actor writes to the network directly. Each one writes or proposes a change to intent, as its tier allows, and the change workflow applies it. Conflicts meet in one place, and the field ownership of Chapter 5 decides who may write each value there.

Every approval, override, and debate leaves a record, which leads to the last question: what to keep.

Conversations or Outcomes#

Should you record every exchange between agents, like keeping every chat between two employees, or only the documents they produce? For people, an organization keeps decisions, documents, and approvals, not every hallway conversation. For agents, the trade-off is different. There is no privacy of the agent to protect, but the transcripts hold everything the agents read, configurations and customer prefixes included, so they inherit that data’s classification from Chapter 13. And they are large.

Keep three tiers:

  • Always: the outcome (the proposal, the decision, the approval), every tool call with its arguments and result, and the model and version that made each call. That extends the Provenance Chain of Chapter 13 to agents.
  • For a retention window: the full transcripts, between agents and with models, long enough to investigate an incident, such as 30 days. Then they expire, unless an incident holds them.
  • Never as the record: a transcript is how the agents got there. It is not what was decided. The shared-state shape from earlier makes the Source of Truth the record of the decision.

Remote teams work because handoffs are written and outputs are where everyone can find them. The same discipline makes a team of agents manageable.

That completes the controls. The last section puts them in order, from a first agent in shadow mode to a team of agents in production.

From Shadow to Production#

A computer can never be held accountable, therefore a computer must never make a management decision.

IBM training manual, 1979

An autonomous routing decision moves real people’s traffic. That raises the stakes past the engineering, and three commitments keep it responsible:

  • A named human is accountable, always. The agent proposes and, within its bounds, acts, but when an audit or an incident review asks who is responsible for a change, the answer is a person, never a model. Chapter 13 made this rule for approvals; it holds for autonomy in general. A model cannot be called into a review, cannot be held to account, and cannot carry the responsibility for degrading a service.

  • Every decision is reversible. A decision the agent makes must be as reversible as a healing drain: time-boxed, confirmed-commit where the platform supports it, auto-reverting if it is not confirmed or if it makes things worse. Autonomy without a fast, automatic undo is a way to make a mistake at machine speed.

  • Every action is explainable. The agent must be able to say why it proposed a plan: the objective, the constraints, the data it used, the optimizer’s result. This is not a nicety. An unexplainable action cannot be audited, and an escalation without its reasoning gives the human nothing to decide with. Explainability is a safety requirement, and a proposal that cannot be explained should not ship.

On the Confidence Ladder from Chapter 14, this is the top, and the top still has a ceiling. The automation track record earns the agent more latitude over time, more tiers it may handle alone, but the escalation path to a human is never removed, and the highest-blast-radius and most novel decisions always take it. Autonomy automates the judgments a track record has earned, inside bounds a human still owns.

Service providers will recognize the scale. The TM Forum describes autonomous networks in levels from L0, fully manual, to L5, fully autonomous across services and domains, and ETSI ZSM specifies the closed loops that implement them. The Confidence Ladder is the same idea, measured by one team’s own track record. This chapter’s design sits in the upper-middle of that scale: closed loops that act alone inside bounds, with humans for everything outside them.

Where to start is the most conservative rung there is: shadow mode, the dry-run rung of the Confidence Ladder in Chapter 14, applied to an agent. Run the whole decision layer, the optimizer and the agent, with one change from production autonomy: it proposes, and a human always decides. In every optimization window, it produces the plan it would have applied, and every plan is logged next to what the engineers actually did. You change nothing in the network, and you learn the two things no design review can tell you: whether the agent’s plans agree with your engineers’ judgment, and where they diverge and why.

Those comparisons are the first entries in the automation track record, and they are what earns the agent its first real authority. After weeks of shadow plans a human would have approved, you let it apply the lowest-risk tier on its own, inside the floor and behind the canary, and no higher. An autonomous network that has never been run in shadow is one you are trusting on faith, which is the one thing this book has argued against at every layer.

Most teams’ first agent is a read-only assistant for the engineers, not an optimizer. It answers questions such as “why is this BGP session flapping?” or “which access switches still run the old image?” by reading the Source of Truth, Observability, and perhaps a few read-only show commands through the Executor. It changes nothing. It is the right first agent for three reasons. It needs only read tools, so the worst it can do is give a wrong answer to an engineer who reads every answer. It builds its own evaluation set: every question, its answer, and whether the engineer found it right. And it teaches the team the operational side of agents, traces, token costs, and model choice, before any agent can touch the network.

Judge it like a new colleague’s first month. Are its answers right? Does it say so when it does not know? Does it cite what it read? Does it save the engineers time? Set the bar before you start, for example answers that cite their sources and are right in nine cases out of ten, and do not give it any write access until it clears that bar.

It also needs far less of the NAP. The decision layer of this chapter assumes the whole platform: a Source of Truth with effective intent, MCP surfaces, risk tiers, simulation, and the change workflow. A read-only assistant needs only the blocks it reads, behind read-only tools. If you do not have them yet, that is the order to build in: the Source of Truth and Observability of Part 2 first, then a read-only agent on top, then the gates of Part 3 before any agent writes anything.

The path from a first agent to a team of them has four steps, and Figure 18.9 shows them. One thing does not change at any step: the escalation path, the kill switch, and the fallback stay in place.

From shadow to production

Figure 18.9: From shadow to production.

Start with one agent, one decision, and shadow mode. Move a step only when the track record says so, and move one agent at a time. Then run the agents like the rest of the NAP:

  • Measure them. Proposal acceptance rate, escalation rate, revert rate, and tokens and latency per decision belong on the NAP’s dashboards, with objectives, next to the service levels of Chapter 12.
  • Keep a kill switch. One per agent and one for the whole decision layer. Turning it off falls back to the last approved plan, the graceful degradation the layering already gives you.
  • Release agents like software. The model version, the instructions, the tool list, and the memory snapshot together are one agent release. A change to any of them goes through the change workflow, with the evaluation set as a gate, and runs in shadow beside the current version before it replaces it.
  • Keep a registry. Every agent has an owner, a named person, plus its definition, its highest permitted risk tier, its latest evaluation results, and a review date. An agent without an owner is switched off.

That last rule is where managing agents like a team ends: every agent has a manager.

Summary#

Autonomous networks are complex. We have heard about them for years, and only lately have they started becoming something real. What is missing? A discipline that makes autonomy safe as well as clever.

The AI capabilities (available for years), combined with the latest developments around LLMs and agentic frameworks, brought a big revolution, but they still need constraints and a careful role architecture to provide different perspectives (e.g., mathematical optimizer versus agentic reasoner) and adjust to more sophisticated operational goals.

The chapter introduces the analogy of managing agents like managing people. I strongly believe that there are more similarities than differences, but the scale and the confidence built over centuries of human relationships make us more comfortable with people. You still have to own whatever your agents decide, as you would do with a team you manage. This means clear authority boundaries, approvals and reviews when needed, and tracking the whole process to keep improving.

This closes Part 5, and with it the book. The network now does three things it could not do when we started. It is consistent with your network design, it adjusts to protect the user experience, and it proposes optimizations within limits. Everything follows your direction. You are still accountable, but now you can sleep better knowing that the network will keep doing what you expect it to do. Enjoy.

References#

💬 Found something to improve? Send feedback for this chapter

📖 Enjoying the book? It is also available on Kindle and in paperback. Get it on Amazon →