import os from google.adk.agents.llm_agent import LlmAgent from google.adk.agents.sequential_agent import SequentialAgent MODEL_ID = os.getenv("GENAI_MODEL", "gemini-2.5-flash") intake_agent = LlmAgent( name="intake", description="Receives the user's message and produces a cleaned version.", model=MODEL_ID, instruction=( "You are the first step in a pipeline. Read the user's message and " "briefly restate it clearly without changing meaning. Return only the restated text." ), ) transform_agent = LlmAgent( name="transform", description="Transforms the intake text into a concise bullet list summary.", model=MODEL_ID, instruction=( "Convert the previous step's text into 3-6 concise bullet points. " "No preamble, output only bullet points prefixed with '- '." ), ) email_agent = LlmAgent( name="email_generator", description="Generates a professional email draft from the bullet points.", model=MODEL_ID, instruction=( "You are an assistant that writes concise, friendly emails. Given bullet points, " "compose a short email with: subject line, greeting, 1-2 paragraphs, and sign-off. " "Return in plain text with 'Subject:' on the first line." ), ) root_agent = SequentialAgent( name="root_pipeline", description="Runs intake -> transform -> email_generator sequentially.", sub_agents=[intake_agent, transform_agent, email_agent], )