Practical technical guides / Recent development: ADK Java 1.15.0 (18 November 2026)

Make ADK Single-Turn History an Explicit Workflow Input Contract

In ADK Java 1.15.0 a SINGLE_TURN agent node with includeContents unset sees no history. Pin each node's history setting and test it at startup.

By Sandeep Belgavi · Published 2026-11-21

In ADK Java 1.15.0 a SINGLE_TURN agent node with includeContents unset sees no history. Pin each node's history setting and test it at startup.

A new mode with a deliberate default

Google's Agent Development Kit for Java released version 1.15.0 on 18 November 2026 (UTC). Much of the release is about workflows: FunctionNode with typed ports, ClassifierNode for routing, edge checks by assignability, approvals for FunctionNode runs, and a group of changes to how an LlmAgent behaves as a workflow node in SINGLE_TURN mode. One of those changes, commit 8e56693 dated 16 November, is titled "run a SINGLE_TURN LlmAgent node without history by default".

Concretely: an LlmAgent built with .mode(AgentMode.SINGLE_TURN) and used as a workflow node sends the model no session history unless includeContents was set on its builder. 1.15.0 is the first release that has the mode at all: AgentMode.java is not present at the v1.14.0 tag. So no released version changed under anyone's feet. On the development branch, single-turn nodes briefly ran with history before this commit, and anyone who built from it will see a difference. For everyone else, the risk is different and more common: taking an existing agent, which keeps its history, and turning it into a single-turn workflow node, which by default does not. This guide reads the code, restates the rule as something you can test, and argues for pinning the history setting of every node explicitly, so that neither a conversion nor a future default change alters what your agents see.

What the code says

The commit changes three files. In LlmAgent.java it adds a field, includeContentsExplicit, set to whether the builder's includeContents was non-null. The getter includeContents() still returns DEFAULT when unset, so code that reads the setting cannot tell an explicit DEFAULT from an unset one, except through the new includeContentsExplicit() method, which the javadoc says is only for use by ADK.

In Contents.java, the request processor that builds the model request now calls a helper:

private static LlmAgent.IncludeContents includeContents(LlmAgent agent, InvocationContext context) {
    boolean singleTurnNode =
        context.agentMode(agent).filter(AgentMode.SINGLE_TURN::equals).isPresent();
    return singleTurnNode && !agent.includeContentsExplicit()
        ? LlmAgent.IncludeContents.NONE
        : agent.includeContents();
}

The tests added to LlmAgentAsNodeTest pin four cases. A single-turn node after another single-turn node sees only its own input. A single-turn node with includeContents(DEFAULT) set explicitly keeps the history. An agent without a mode after a single-turn node keeps the history. A sub-agent reached by transfer from a single-turn node keeps the history.

Note what the rule depends on: whether the setting was written in the builder, not what value it has. Two agents that both report includeContents() == DEFAULT can behave differently.

History with the setting on is also narrower than a whole conversation. A companion commit in the same release, f14e184, keeps a single-turn node's history to its own node path: events are filtered by branch and by the node path, ancestors are kept only when history is on, and another release item hides other nodes' inputs from an agent node. The upstream test for an explicit DEFAULT checks that the original user message is still there, not that every earlier event is.

Why the default makes sense, and where it bites

For a node that classifies, extracts or transforms its input, history is mostly noise. It costs tokens, it can leak details from earlier turns into an unrelated task, and it makes the node's output depend on more than its input, which defeats the point of a typed workflow edge. Defaulting to no history makes single-turn nodes behave like functions, which is what most workflow authors intend.

The risk is the agent that is converted into a node and quietly depended on history. Consider a help-desk workflow at the fictional Belgavi's Book Store. Jenya writes that order 4417 arrived damaged and gives her account number. A classify node routes the case to refunds. A draft_reply agent, which used to run without a mode and see the conversation, becomes a single-turn node and receives the node input "Draft a reply confirming a refund of 499 rupees for order 4417." With history, the drafter can greet Jenya by name and refer to the damage. Without it, the request contains one sentence, and the reply is generic. Nothing fails. The output just gets worse, and an evaluation that checks only the refund amount will not notice.

Make the history setting an input contract

The companion example is a standalone Java model of the rule, without ADK, so the decision can be tested and shown in isolation. It adds one idea on top of the rule: an expectation per node, checked at startup.

record Expectation(String node, IncludeContents expected) {}

static List<String> checkContract(List<Agent> nodes, List<Expectation> pins, boolean newRule) {
    List<String> problems = new ArrayList<>();
    for (Expectation e : pins) {
        Agent a = find(nodes, e.node());
        IncludeContents got = effective(a, a.mode().isPresent(), newRule);
        if (got != e.expected())
            problems.add(e.node() + ": expected " + e.expected() + " but runs with " + got);
    }
    return problems;
}

With classify pinned to NONE and draft_reply pinned to DEFAULT, and the drafter's includeContents left unset, the measured results are:

  • Under the rule on the development branch before 8e56693, which is also what an agent without a mode gets, the drafter's request has 3 contents: two history turns and the node input. The contract flags classify: expected NONE but runs with DEFAULT.
  • Under the 1.15.0 rule, the drafter's request has 1 content, the node input. The contract flags draft_reply: expected DEFAULT but runs with NONE (setting left unset).
  • With .includeContents(IncludeContents.DEFAULT) written in the drafter's builder, the contract passes under the new rule and the request has 3 contents again.

The model treats history as a flat list. Real ADK also applies the branch and node-path filtering described above, so treat the content counts as an illustration of the switch, not of what ADK sends. In a real application, the same check is simpler. Write includeContents explicitly on every LlmAgent that runs as a workflow node, and have a startup test build the workflow and assert the setting of each node against a table kept next to the workflow definition. The example's eight checks mirror the four upstream test cases plus the contract checks.

Context isolation is not authorization

It is tempting to read IncludeContents.NONE as a security boundary: the node cannot see the earlier conversation, so it cannot misuse it. That reading is wrong in two ways.

First, history is only one channel. A node with no history can still call any tool it was given, read session state that its instructions inject, and receive whatever its node input contains. In the example, an issue_refund agent without a mode keeps both its history and its refund.issue tool, and nothing about history settings would change the tool list. Restrict tools by giving each agent only the tools its task needs, and gate side-effecting tools behind deterministic checks or approvals. The 1.15.0 release adds an approval step for FunctionNode runs, which is the right kind of mechanism for that.

Second, the upstream tests show that history returns along some paths. A sub-agent reached by transfer from a single-turn node keeps the history. If you relied on NONE to keep personal details away from a particular agent, a transfer path can bring them back. Treat history settings as a quality and cost control, and keep sensitive data out of agents by not putting it in their inputs.

Adoption steps for 1.15.0

  1. List every LlmAgent that runs, or will run, as a workflow node with SINGLE_TURN mode, whether it previously ran without a mode, and whether its builder sets includeContents.
  2. For each node with the setting unset, decide whether it needs history. Most classifiers and extractors do not. Most drafters and summarisers of a conversation do.
  3. Write the decision into the builder for every node, including the ones that want NONE, so the code no longer depends on any default.
  4. Add the startup contract check, and run your evaluation set before and after converting each agent into a node, with the history settings logged per node.
  5. Review transfer paths from single-turn nodes, since sub-agents reached that way keep history.

Failure modes to test

  • A drafter whose quality depends on earlier turns. Assert, with an evaluation that checks for details from history, that it still has them after it becomes a single-turn node.
  • A classifier that was accidentally reading history. Assert that its accuracy holds with NONE, because earlier results may have depended on leaked context.
  • A workflow built in two places, once in production code and once in tests. Assert that both builders set the same history values, or the test proves nothing.
  • A transfer from a single-turn node to a sub-agent. Assert what that sub-agent sees.

When you do not need any of this

If your agents do not run as workflow nodes, or none uses SINGLE_TURN mode, the rule does not apply to them. The commit's tests show that an agent without a mode keeps its history. If every single-turn node already sets includeContents, you are already pinned, and a later default change would not affect you.

Verification checklist

  • Every workflow-node LlmAgent sets includeContents explicitly.
  • A startup test asserts each node's history setting against a table.
  • Evaluation results before and after each conversion are compared per node, not only end to end.
  • Tool lists and approvals, not history settings, are what restrict side effects.

Run the example yourself

The standalone model of the 1.15.0 rule and the startup contract check, with eight checks. It does not use ADK. Companion code on GitHub; its README lists the prerequisites, exact commands, expected output and limits.

Primary references and authorship

Sources read 21 November 2026. Original explanation, measurements and synthetic examples by Sandeep Belgavi. Views are my own and do not represent any employer, past or present.

Related on this site: