The five orthogonal data-flow concerns in adk-fluent — how data enters, exits, and flows through every agent turn.
Injects state values into the agent's prompt as additional context. Values appear in LLM input at runtime.
HAS RUNTIME EFFECTDefines structured input schema when the agent is used as an AgentTool. Validates incoming data from the parent agent.
HAS RUNTIME EFFECTConstrains LLM response to structured JSON matching a Pydantic schema. Forces output_schema on generate_content_config.
HAS RUNTIME EFFECTStores the agent's text response in session state[key] after execution. Downstream agents can read the stored value.
HAS RUNTIME EFFECTStatic type annotations for pipeline validation and documentation. No runtime effect — tooling and introspection only.
NO RUNTIME EFFECT| Concern | When | Direction | Runtime? | Sets on ADK | Example |
|---|---|---|---|---|---|
| Context | Before LLM call | State → Prompt | Yes | include_contents / instruction injection |
.reads("article") |
| Input | When called as AgentTool | Parent → Agent | Yes | input_schema on AgentTool |
.accepts(SummarizeInput) |
| Output | LLM generation | Agent → Caller | Yes | output_schema on generate_content_config |
.returns(SummaryOutput) |
| Storage | After execution | Response → State | Yes | output_key on LlmAgent |
.writes("summary") |
| Contract | Build time / static analysis | N/A (annotation) | No | Nothing — metadata only | .produces(SummaryContract) |
"Which method do I use?" — follow the questions to find the right data-flow method.
from adk_fluent import Agent from pydantic import BaseModel class SummarizeInput(BaseModel): article_url: str max_length: int = 500 class SummaryOutput(BaseModel): title: str summary: str key_points: list[str] class SummaryContract(BaseModel): summary: str agent = ( Agent("summarizer", "gemini-2.5-flash") .reads("article") # CONTEXT -- inject article text into prompt .accepts(SummarizeInput) # INPUT -- structured input schema for AgentTool .instruct("Summarize the article in {article}.") .returns(SummaryOutput) # OUTPUT -- structured JSON response from LLM .writes("summary") # STORAGE -- save response to state["summary"] .produces(SummaryContract) # CONTRACT -- static annotation (no runtime effect) .build() )