What changes when the provider runs the loop
An agent loop is a small program: call the model, read the tool calls it returns, run the tools, append results, repeat until a stop condition. In your own loop, every one of those steps is a line of your code, so every limit is something you wrote. In a managed agent, Mistral's runtime executes that program for you.
Mistral's Studio release of 5 November 2026 adds managed agents that carry out multi-step tasks, with skills for team procedures, sandboxes for running code, subagents for delegating parts of a task, and hooks for custom logic at key points in execution. Studio "manages the runtime behind all that work" while developers set "boundaries on the tools, data and actions it can access"1. That is a real trade: you stop owning the loop's plumbing, and you also stop owning its guarantees.
One caveat on scope. The pages I read label Connectors and Workflows as public preview23, but none states a preview label for managed agents, and none documents step caps, spend ceilings, retries or failover for them. Where a control below is marked "not stated", that is why. The rest of this article is about who owns each control and what to demand before you move a workload.
Who owns each control, side by side
| Control | Your own loop | Mistral managed agent |
|---|---|---|
| Step limit | Your code: a counter and a break | Not stated; hooks exist for custom logic1 |
| Spend cap | Your code, plus gateway budgets checked before each call | Not stated; inference is provided by Mistral1 |
| Traces | Whatever you emit and store | OpenTelemetry traces of model calls, tool use and approvals, which Mistral says remain yours1 |
| Retries | Your code and your gateway | Runtime-owned; Workflows document SDK retry policies and durable resume3 |
| Failover | Gateway routes across your connections | Not stated for agents |
The pattern: where Mistral documents a control, it documents it as a feature of its platform, not as a contract you can set to a number. Traces and approvals are described concretely. Hard limits are not.
Step limits and spend caps
In your own loop the step limit is the first thing you write, and it is a guarantee: the process cannot take step 13 if the counter says 12. A spend cap is stronger when it is enforced outside the loop, because a loop bug cannot disable a check it does not run. The same reasoning is in bounding AI agent loops.
import time
from openai import OpenAI
client = OpenAI(base_url="https://api.infro.io/v1", api_key=INFRO_KEY)
MAX_STEPS = 12
DEADLINE_S = 90
started = time.monotonic()
messages = [{"role": "user", "content": task}]
for step in range(MAX_STEPS):
if time.monotonic() - started > DEADLINE_S:
raise TimeoutError("run deadline")
resp = client.chat.completions.create(
model="agent-loop-route", # a named route over your own connections
messages=messages,
tools=TOOLS,
max_tokens=2000, # reserve less, fit more concurrent runs
)
msg = resp.choices[0].message
messages.append(msg)
if not msg.tool_calls:
break
messages.extend(run_tools(msg.tool_calls))
else:
raise RuntimeError("step limit reached")With a managed agent you have to find the equivalent. Mistral says hooks let you add custom logic at key points in execution1, which suggests a place to count steps, but whether a hook can halt a run, and whether a run has a platform-side ceiling, is not on the pages I read. Ask for the exact setting and test that a run really stops.
On money: INFRO's blocking budgets admit a request only if its worst-case estimated cost fits the room left, and they refuse it before the provider is called4. That works because the request passes through the gateway. A run that executes on Mistral's runtime with Mistral inference never presents a request to it.
Traces: what you get and what you lose
Mistral's trace story is good on paper. Its launch post says OpenTelemetry traces show each step of a run, including model calls, tool use and approvals, and that the traces and evaluations remain the customer's1. Workflows add a recorded execution history, with native OpenTelemetry support down to specific traces3. The Studio product page lists observability of every request, response and decision across multi-step pipelines5.
What you give up is the unified record. A gateway log is per request: the model, the connection that served it, timings, usage and estimated provider cost6. It is request metadata, and prompt and completion logging is off by default. If your loop runs through a gateway, one run is a series of rows you can group by an id you attach. If the loop runs on Mistral, those rows do not exist, and your cross-provider view of agent spend has a hole shaped like Mistral.
The practical fix is to treat the OpenTelemetry export as the source of truth for managed runs and to attach one correlation id to every run, managed or not, so the two record sets can be joined in your own store. Whether Studio traces carry a trace context you can set from outside is a question for Mistral. For the self-run side, see tracing an AI agent run across many model calls.
Retries and failover
Retries and failover look alike but fail differently. A retry repeats the same call; failover moves it somewhere else. In your own loop you choose both. Through a gateway, connection failover tries the same model on another of your connections, and model fallbacks try an ordered list of other models, both only before the first token7. Mid-run, that boundary matters: a step that has already streamed tokens or fired a tool is not safely replayable, which is the subject of failover mid-agent-run.
Mistral documents durable execution for Workflows: state is tracked at every step, a failed process resumes where it left off, and the SDK handles retry policies, timeouts and rate limiting through decorators3. That is strong retry and resume, and it is Mistral's. It is also resilience inside one provider. I found no statement that a managed agent fails over to another provider's model, and a managed run is unlikely to do so on its own account. If your requirement is "the agent keeps working when this provider has a bad hour", a hosted loop does not satisfy it by default.
State is the other cost. Mistral's Agents API keeps conversations stateful, with conversation entries you can continue or branch8. History held by the provider is convenient and makes switching harder; the trade is covered in provider-held threads or your own history.
What a BYOK control plane can and cannot see
A BYOK control plane works on the traffic you send through it: your applications call it, it uses your own provider connections, and your providers bill you directly9. That defines the limit.
- It cannot see model calls made by a runtime that talks to the provider itself. It cannot apply a budget, a route or a failover rule to them, and it cannot estimate their cost from its own request log.
- It cannot see Mistral-side spend through its provider cost reconciliation, which compares against the cost APIs of OpenAI and Anthropic only. Mistral inference billed to your Mistral account shows up in Mistral's billing.
- It can still see whatever your own code sends through it: the entry call that starts a run, any model calls you make in your own workers, and anything else on your side.
- It can still govern tools, if you route them. Mistral's connectors register an MCP server by URL, with
server,visibilityand OAuth settings2, and MCP is an open standard for connecting AI applications to tools10. INFRO's MCP gateway registers your MCP servers, pins approved tool definitions, applies guardrails and logs each call on the same trace as model calls, and executes no tool itself. Pointing a Mistral connector at such an endpoint is plausible but I have not verified that Mistral's connector auth works against it; test it before you rely on it.
Mistral's own tool controls are worth using in parallel: tool_configuration can exclude tools such as a delete action, and requires_confirmation pauses execution and hands control back to your application before a tool runs2. These are per-tool approvals, not per-run ceilings.
How to choose, and what to ask Mistral first
Adopt the managed agent when the work is long-running, needs human approval mid-run, must stay inside your perimeter (Studio can run in your cloud, VPC or on-premises1), and the cost of one bad run is bounded by the task itself. Keep your own loop when you need a hard per-run ceiling you can prove, failover across providers, or one record of agent cost next to your other models.
Before you commit, get these answers in writing:
- What is the maximum number of steps and the maximum run time, and where do I set them?
- Can a spend ceiling be set per run, per agent or per workspace, and does it stop a run or only alert?
- What happens to a run, and to its billing, when a model call fails mid-run?
- Can model calls from a managed run use my own endpoint or provider account, or only Mistral inference?
- Can I set a trace id from outside, and can I export traces to my own collector?
Run a failure drill on the managed side the way you would on your own: force a looping tool, a timeout and a rejected credential, and check that the run stops where the documentation says. Until the answers are in hand, keep any workload that handles money or customer data on the loop you can bound.
