documentation, enabling you to integrate this knowledge base into your own applications and workflows. Supports MCP. developers.google.com/knowledge/api
ADK agent root_agent = Agent( model="gemini-3-flash-preview", name="sharon", instruction=f""" You are Sharon, a professional Executive Assistant. Use the following tools and agents to perform specialised tasks: - Calendar: For all scheduling and meeting management. - Research: For deep-dive web investigations and synthesis. - Todo: For tracking tasks and actionable lists. """, tools=[ AgentTool(calendar_agent), AgentTool(todo_agent) ], sub_agents=[research_agent] ) agent.py
unless it is user scoped (magic key “user:”) or app scoped (“app:”). Persistence depends on session service Long Term Memory Remembers facts about the conversation itself. Saved in a database or specialist service like Vertex AI Memory Bank
Runs once per turn via before_agent_callback. """ now = datetime.now(ZoneInfo(SHARON_TIMEZONE)) callback_context.state["current_time"] = now.strftime("%A, %Y-%m-%d %I:%M %p") callback_context.state["timezone"] = SHARON_TIMEZONE # Register the callback in the Root Agent root_agent = Agent( name="sharon", # ... before_agent_callback=[setup_agent_context] )
beginning of the turn Automatically persist memories at the end of the turn (or session) Allows ad hoc search docs.cloud.google.com/agent-builder/agent-engine/memory-bank