FAQ · AI agents and compliance

Are AI agents deterministic?

No. The same input can produce a different answer or a different path. In 2026 Anthropic, OpenAI and Google each removed or stopped honoring the temperature setting on their newest models, so repeatable behavior now has to come from fixed steps, strict schemas, pinned models and testing.

Key takeaways

  • AI agents are probabilistic: same input, possibly different answer and path.
  • Anthropic API 2026-10-21 rejects temperature; Gemini ignores it; GPT-6 drops it when reasoning.
  • Repeatability comes from fixed steps, strict schemas, pinned models and code checks.
  • Run each test case 3 to 5 times; a case that passes only sometimes is a failure.

Are AI agents deterministic?

No. An AI agent can give a different answer, or take a different path, on the same input. On the newest OpenAI, Anthropic and Google models you often cannot lower the temperature either, so consistency has to be built in.

A deterministic system always produces the same output for the same input. A plain workflow in n8n, Make or Zapier is deterministic: the same form submission runs the same steps. An AI agent is probabilistic. The model samples each word, often reasons before it answers, and decides which tools to call and in what order. This page explains why that happens, what changed in 2026 with the temperature setting, and the build choices that make an agent behave the same way where it matters. It supports our AI agent development service, where these choices are part of every build.

Why does an AI agent give different answers to the same question?

Because the model picks each next word by sampling from probabilities, and an agent repeats that over many steps. Small differences early, such as a different first tool call, lead to different paths. Changing tool results and provider-side model updates add more variation.

Four sources of variation stack up in an agent:

  • Sampling. Anthropic's migration guide says a request without sampling settings samples "with their defaults, including a temperature of 1.0." At that setting the same prompt can produce different wording and different choices.
  • Several steps. An agent may call the model four or ten times per task. A different decision at step one changes everything after it.
  • Tool results. The calendar, the CRM and the web change between runs, so the agent sees different facts.
  • Provider changes. Models are fixed, retired and replaced. OpenAI's changelog for September 25, 2026 records a fix that changed image understanding in GPT-6 Sol and GPT-6 Luna, with advice to rerun evaluations.

Even settings meant to be deterministic do not guarantee it. A study of five language models "configured to be deterministic," run 10 times on eight tasks, found "accuracy variations up to 15% across naturally occurring runs" and concluded that "none of the LLMs consistently delivers repeatable accuracy across all tasks, much less identical output strings" (Atil and others, arXiv 2408.04667).

Can you set temperature to 0 to make an AI agent deterministic?

Not on most current flagship models. Anthropic's API version 2026-10-21 rejects temperature with a 400 error, Gemini 3.6 Flash and Gemini 4 Argon ignore it, and GPT-6 models drop it when reasoning is on. Temperature 0 never guaranteed identical output anyway.

What happens to temperature on the newest models

Temperature on current modelsTree: Anthropic API version 2026-10-21 returns a 400 error for temperature; OpenAI GPT-6 models drop it whenever reasoning is on; Google Gemini has ignored it since July 2026; older models still accept it but output still varies.Temperature 0 on new modelsChecked October 30, 2026Anthropic400 error in 2026-10-21OpenAI GPT-6Dropped when reasoningGoogle GeminiIgnored since Jul 2026Older modelsAccepted, output varies
Sources: Anthropic, OpenAI and Google API docs, read October 30, 2026.
ProviderWhat the docs say on October 30, 2026Effect on an agent
Anthropic (Claude)In API version 2026-10-21, a request with temperature, top_p or top_k "returns a 400 error, even at the parameter's default value." Earlier versions return the error for non-default values on Claude 4.7 and later models.Old code that set temperature fails after an SDK upgrade. Requests sample at the defaults.
OpenAI (GPT-6 family)"When reasoning effort is not none, remove temperature, top_p, and top_logprobs." GPT-6 Astra and GPT-6.1 Sol do not support none; GPT-6.1 Terra, GPT-6 Sol and GPT-6 Luna do.Temperature is only available on some models, and only with reasoning turned off.
Google (Gemini)Since July 21, 2026, temperature, top_p and top_k are deprecated. For Gemini 3.6 Flash "the API ignores these parameters and returns an error in future model generations." The Gemini 4 Argon guide says "If provided, they are ignored."Setting temperature to 0 is silently ignored, so it gives no protection.

Anthropic is direct about what is lost: on older models that accepted other values, "a request that lowered temperature for more consistent output loses that effect. No other setting replaces it." The new client SDKs released on October 21, 2026 (Python SDK 2.0.0 and TypeScript SDK 1.0.0 among them) send API version 2026-10-21 by default, so an upgrade alone can surface the 400 error.

What makes an AI agent behave the same way every time?

Build consistency into the system around the model: required steps in a fixed workflow, strict schemas on outputs and tool inputs, a pinned model version, math and rules in code, and repeated test runs. The model handles only the judgment calls.

How we make an agent repeatable

Repeatable agent designFlow: required steps run as fixed workflow steps; the model is used only for judgment such as classifying or drafting; outputs are forced into a strict schema; code checks the values; the model version is pinned; each test case is run several times.Fixed workflow stepsRequired steps always runAI only for judgmentClassify, draft, extractStrict schema on outputFormat guaranteed in most casesCode checks the valuesTotals, dates, rulesPinned model versionNo silent model swapRepeat test runsEvery run must pass
Our build method; schema and pinning details from Anthropic and OpenAI docs.
LeverWhat it fixesLimit
Fixed workflow stepsThe order of steps and which steps always runLess flexible for unusual requests; we route those to a person
Structured outputsThe shape of the answer: Anthropic says they "guarantee schema-compliant responses through constrained decoding"Fixes the format, not whether the values are right; refusals and token limits can still break the schema
Strict tool useTool names and inputs: Anthropic's strict mode guarantees "schema validation on tool names and inputs"The agent can still pick the wrong tool for the situation
Pinned model versionSilent model swaps: Anthropic says "every Claude model ID is a pinned snapshot"; OpenAI offers dated snapshots such as gpt-4o-mini-2024-07-18Pinned models still retire on the provider's schedule
Code for rules and mathTotals, dates, eligibility checksSomeone has to write the rules down
Repeated test runsShows how often the agent passes the same caseCosts tokens; rerun after every change

The last lever is how you find out whether the others worked. We run each test case several times and look at how often the agent passes every run, as set out in how we test an AI agent before launch. An agent that passes a case 90% of the time passes five runs in a row only about 59% of the time.

Should a task use an AI agent or a fixed workflow?

Use a fixed workflow wherever the same input must always give the same result, such as invoices, eligibility rules and compliance steps. Use an agent where the input varies and judgment helps, such as reading free-text messages. Most good systems combine both.

Agent or fixed workflow?

Agent or workflowDecision: if the same input must always give the same result, build a fixed workflow with rules in code; otherwise use an AI agent step inside fixed limits.Same input, same result every time?Invoices, eligibility, compliance stepsYes: workflowRules in codeNo: agent stepInside fixed limitsMost systems combine both.
Most builds use workflow steps with one or two narrow AI steps.

A useful test is to ask whether two people doing the job correctly would always do exactly the same thing. If yes, write it as a workflow. If they would reasonably differ in wording or in the order they gather information, an agent fits, inside fixed limits. A typical lead-handling build runs the intake, de-duplication, CRM write and routing as workflow steps, and uses the model for two narrow jobs: reading the message to classify intent, and drafting a reply from approved content. Our AI workflow automation service covers builds of that kind, and single agent vs multi-agent covers when one agent is enough.

What breaks when a provider removes the temperature setting?

Three things usually break: requests start failing with a 400 error, outputs become more varied than before, or tool calls stop working after a model switch. Each has a specific fix, and a test set shows which one you have.

SymptomLikely causeFix
Claude requests fail with a 400 error after an SDK updateThe new SDK sends API version 2026-10-21, which rejects temperature, top_p and top_kRemove the three parameters, or keep that request on the 2023-06-01 version while you test
Answers vary more after moving to a newer Gemini modelTemperature is now ignored, so the request samples at the defaultAdd structured output, tighter instructions and examples; move rule-based steps into the workflow
Tool calls fail on GPT-6 Sol or GPT-6 Luna in Chat CompletionsThese models support function calling in Chat Completions only with reasoning_effort set to noneUse the Responses API for reasoning with tools, as OpenAI recommends
A no-code AI step errors after the platform updates its model listThe platform still sends a setting the new model rejectsClear the temperature field in the step, or pick a model that accepts it, then rerun your test cases

If an agent of yours in n8n has started acting up after a model change, why an n8n AI Agent stops calling its tools covers the other common causes.

More questions about AI agent determinism

Are AI agents deterministic or probabilistic?

Probabilistic. The model at the center of an agent chooses each word from a set of likely options, and the agent chooses its own steps, so two runs can differ. The workflow around the agent can be deterministic: the triggers, the required steps, the checks and the records it writes. A well-built system keeps the probabilistic part small and the deterministic part large.

Is ChatGPT deterministic?

No. Ask ChatGPT the same question twice and the wording, and sometimes the substance, can differ. Through the API, OpenAI's current guidance for its GPT-6 models says to remove temperature whenever reasoning is turned on, so the old temperature 0 approach is not available there either. For business use, the fix is the same as for any agent: fixed steps, strict output formats and testing.

Is non-determinism a bug?

It is how these models work, and it is part of why they handle varied, messy input well. It becomes a problem only when a task needs the same answer every time. The design job is to decide which parts of a process may vary, such as the wording of a reply, and which must not, such as the price quoted or the record updated.

Can a non-deterministic AI agent pass an audit?

It can, if the audit trail does not depend on the model repeating itself. Log every input, every tool call and every output, pin the model version, keep the prompts under version control, and make the decisions that matter in code with rules a person can read. An auditor can then see exactly what happened in each run, even if a rerun would word things differently.

Does a pinned model version make outputs identical?

No. Pinning stops the provider from swapping the model under you, which removes one source of change. The model still samples, so the same prompt can still produce different text. Pinning also has an end date: Anthropic retires pinned snapshots on a published schedule, with at least 60 days' notice for publicly released models, so plan to retest and move.

How many times should you run a test case to check consistency?

At least three times per case, and five for agents that take actions. One run tells you the agent can get it right; repeated runs tell you how often it does. Rerun the whole set after any change to the prompt, tools or model, and treat a case that passes only sometimes as a failure until you know why.

Sources and further reading

Need an agent that gives the same result every time it matters?

Book a free strategy call. We split your process into fixed workflow steps and narrow AI steps, and agree how consistency will be tested before the build.

Get in touch

Tell us what you want to automate or build.

Tell us a little about your business and what is not working, then pick a time for a free 30-minute call. No waiting for a reply.

  • Free 30-minute strategy call, no obligation
  • Written plan with scope and price before any build
  • Six months of maintenance included on every build
Alpit Patel
Alpit PatelFounder, Autoesta · HighLevel Certified Admin
  1. Details
  2. Time
  3. Confirmed

Takes under a minute. Free, no obligation, no spam. Privacy policy

Book a Free Strategy Call