From Stateless Calls to Agentic Workflows: The AI Evolution Starts Here
Developers are witnessing a paradigm shift. Traditional request‑response LLM calls are giving way to stateful, multi‑turn agentic workflows. This transition unlocks richer reasoning, long‑running research tasks, and a seamless blend of raw models with purpose‑built agents.
Why the Interactions API Matters for Modern AI Projects
The newly released Google Interactions API provides a single gateway that can power both pure Gemini models (gemini-3-pro-preview) and the built‑in Gemini Deep Research Agent. It’s engineered for the agentic era, offering:
- Unified access: One endpoint, two worlds – a standard LLM or a specialized agent.
- Simplified state handling: Offload conversation history with
previous_interaction_id. - Background execution: Long‑running tasks return an interaction ID instantly, enabling asynchronous polling.
- Explicit thought modeling: Separate “thoughts” from final output for clearer reasoning chains.
Pattern 1: Supercharging ADK Agents with the Interactions API
Developers already using the Agent Development Kit (ADK) can replace the legacy generateContent call with the Interactions API. The result is a lighter‑weight agent that lets the server manage context while the ADK focuses on routing and tool orchestration.
use_interactions_api=True in your Gemini model definition to unlock background tasks and thought streams without any code rewrite.
**Real‑world example** – A financial‑research startup built an ADK‑based analyst bot. By switching to the Interactions API, the bot could run a 30‑second deep‑dive on market trends without hitting client‑side timeouts, returning a concise report once the background job completed.
from google.adk.agents.llm_agent import Agent
from google.adk.models.google_llm import Gemini
from google.adk.tools.google_search_tool import GoogleSearchTool
root_agent = Agent(
model=Gemini(
model="gemini-2.5-flash",
use_interactions_api=True,
),
name="research_assistant",
tools=[
GoogleSearchTool(bypass_multi_tools_limit=True),
get_current_weather,
],
)
Pattern 2: The Transparent Bridge – A2A Meets Interactions API
The Agent2Agent (A2A) protocol has become the lingua franca for multi‑agent ecosystems. With the InteractionsApiTransport, an Interactions API endpoint masquerades as a regular A2A remote agent. No SDK changes, no refactoring – just plug‑and‑play.
SendMessage calls to Interactions API create operations, translating task statuses on the fly.
**Case study** – A health‑tech platform uses several A2A agents for triage, symptom checking, and appointment scheduling. By adding the Deep Research agent via the transport, the platform now offers on‑demand medical literature reviews without adding a new microservice.
from interactions_api_transport import InteractionsApiTransport
from a2a.client import ClientFactory, ClientConfig
client_config = ClientConfig()
client_factory = ClientFactory(client_config)
InteractionsApiTransport.setup(client_factory)
card = InteractionsApiTransport.make_card(
url="https://generativelanguage.googleapis.com",
agent="deep-research-pro-preview-12-2025"
)
client = client_factory.create(card)
async for event in client.send_message(new_text_message("Summarize recent AI safety papers")):
print(event)
Future Trends Shaping the Agentic AI Landscape
As more organizations adopt the Interactions API, several trends are emerging:
- Hybrid agents – Combining raw LLM generation with specialist agents (e.g., legal analysis, scientific discovery) on a single endpoint.
- Composable toolchains – Developers will chain external tools (search, databases, IoT) inside the
thoughtsloop, creating truly autonomous assistants. - Server‑side state stewardship – Offloading conversation memory to the cloud reduces client complexity and opens the door to cross‑session continuity.
- Event‑driven orchestration – With streaming support, agents can emit real‑time progress updates, enabling UI experiences that feel “alive.”
These patterns align with the broader vision of an agentic mesh—a network of cooperating AI entities that share context, delegate tasks, and scale horizontally.
FAQ
- What is the Interactions API?
- A unified Google endpoint that serves both standard Gemini models and built‑in agents like Deep Research, optimized for multi‑turn, stateful interactions.
<dt>Do I need to rewrite my existing ADK agents?</dt>
<dd>No. Simply enable <code>use_interactions_api=True</code> in your model configuration, and the ADK will route inference through the new API.</dd>
<dt>Can the Interactions API handle long‑running tasks?</dt>
<dd>Yes. Set <code>background=True</code> to receive an interaction ID instantly and poll for results later.</dd>
<dt>Is the A2A transport compatible with existing clients?</dt>
<dd>Absolutely. It translates A2A calls under the hood, so your code stays unchanged while you gain access to the new agents.</dd>
<dt>Are there limits on the number of thoughts per interaction?</dt>
<dd>Current quotas mirror Gemini model limits. For high‑volume applications, request a quota increase via the Google Cloud console.</dd>
Ready to Dive In?
Explore the full ADK sample repository, experiment with the InteractionsApiTransport, and start building your own agentic workflows today.
Have questions or success stories? Drop a comment below, subscribe to our newsletter for the latest AI development tips, and stay ahead of the curve.
