def extract_ticker_agent(): output_key = "ticker" print(f"Calling Gemini for {output_key}") return Agent( model=WORKER_MODEL, name=f"{output_key}_agent", generate_content_config=create_model_settings(), description="Finds ticker", instruction=f""" From the user query, extract the stock market symbol that the user wants a report on. User: Please write a report on Microsoft AI: MSFT User: Analyze WW AI: WW User: Nvidia AI: NVDA """, output_key=output_key, # result will be in state[output_key] )