diff --git a/contributing/samples/a2a_auth/agent.py b/contributing/samples/a2a_auth/agent.py index 15312fdf..a4c65624 100644 --- a/contributing/samples/a2a_auth/agent.py +++ b/contributing/samples/a2a_auth/agent.py @@ -13,11 +13,11 @@ # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.agents.remote_a2a_agent import AGENT_CARD_WELL_KNOWN_PATH from google.adk.agents.remote_a2a_agent import RemoteA2aAgent from google.adk.tools.langchain_tool import LangchainTool -from langchain_community.tools import YouTubeSearchTool +from langchain_community.tools.youtube.search import YouTubeSearchTool # Instantiate the tool langchain_yt_tool = YouTubeSearchTool() diff --git a/contributing/samples/a2a_basic/agent.py b/contributing/samples/a2a_basic/agent.py index a075e452..49e542d1 100755 --- a/contributing/samples/a2a_basic/agent.py +++ b/contributing/samples/a2a_basic/agent.py @@ -14,7 +14,7 @@ import random -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.agents.remote_a2a_agent import AGENT_CARD_WELL_KNOWN_PATH from google.adk.agents.remote_a2a_agent import RemoteA2aAgent from google.adk.tools.example_tool import ExampleTool diff --git a/contributing/samples/a2a_human_in_loop/agent.py b/contributing/samples/a2a_human_in_loop/agent.py index 835bd804..a1f7d912 100644 --- a/contributing/samples/a2a_human_in_loop/agent.py +++ b/contributing/samples/a2a_human_in_loop/agent.py @@ -13,7 +13,7 @@ # limitations under the License. -from google.adk import Agent +from google.adk.agents.llm_agent import Agent from google.adk.agents.remote_a2a_agent import AGENT_CARD_WELL_KNOWN_PATH from google.adk.agents.remote_a2a_agent import RemoteA2aAgent from google.genai import types diff --git a/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py b/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py index 913fa44c..9a71fb18 100644 --- a/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py +++ b/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py @@ -15,8 +15,8 @@ from typing import Any from google.adk import Agent -from google.adk.tools import ToolContext from google.adk.tools.long_running_tool import LongRunningFunctionTool +from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/adk_answering_agent/agent.py b/contributing/samples/adk_answering_agent/agent.py index 11979249..8b250f29 100644 --- a/contributing/samples/adk_answering_agent/agent.py +++ b/contributing/samples/adk_answering_agent/agent.py @@ -21,8 +21,8 @@ from adk_answering_agent.settings import REPO from adk_answering_agent.settings import VERTEXAI_DATASTORE_ID from adk_answering_agent.utils import error_response from adk_answering_agent.utils import run_graphql_query -from google.adk.agents import Agent -from google.adk.tools import VertexAiSearchTool +from google.adk.agents.llm_agent import Agent +from google.adk.tools.vertex_ai_search_tool import VertexAiSearchTool import requests if IS_INTERACTIVE: diff --git a/contributing/samples/adk_pr_agent/main.py b/contributing/samples/adk_pr_agent/main.py index 6b3bebb5..ecf332c2 100644 --- a/contributing/samples/adk_pr_agent/main.py +++ b/contributing/samples/adk_pr_agent/main.py @@ -20,7 +20,7 @@ import time import agent from google.adk.agents.run_config import RunConfig from google.adk.runners import InMemoryRunner -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types diff --git a/contributing/samples/adk_triaging_agent/agent.py b/contributing/samples/adk_triaging_agent/agent.py index 866a8737..5315d5ad 100644 --- a/contributing/samples/adk_triaging_agent/agent.py +++ b/contributing/samples/adk_triaging_agent/agent.py @@ -23,7 +23,7 @@ from adk_triaging_agent.utils import error_response from adk_triaging_agent.utils import get_request from adk_triaging_agent.utils import patch_request from adk_triaging_agent.utils import post_request -from google.adk import Agent +from google.adk.agents.llm_agent import Agent import requests LABEL_TO_OWNER = { diff --git a/contributing/samples/bigquery/agent.py b/contributing/samples/bigquery/agent.py index b78f7968..2b5fd087 100644 --- a/contributing/samples/bigquery/agent.py +++ b/contributing/samples/bigquery/agent.py @@ -14,10 +14,10 @@ import os -from google.adk.agents import llm_agent -from google.adk.auth import AuthCredentialTypes -from google.adk.tools.bigquery import BigQueryCredentialsConfig -from google.adk.tools.bigquery import BigQueryToolset +from google.adk.agents.llm_agent import LlmAgent +from google.adk.auth.auth_credential import AuthCredentialTypes +from google.adk.tools.bigquery.bigquery_credentials import BigQueryCredentialsConfig +from google.adk.tools.bigquery.bigquery_toolset import BigQueryToolset from google.adk.tools.bigquery.config import BigQueryToolConfig from google.adk.tools.bigquery.config import WriteMode import google.auth diff --git a/contributing/samples/callbacks/agent.py b/contributing/samples/callbacks/agent.py index 4f10f7c6..adbf15a6 100755 --- a/contributing/samples/callbacks/agent.py +++ b/contributing/samples/callbacks/agent.py @@ -15,8 +15,8 @@ import random from google.adk import Agent -from google.adk.planners import BuiltInPlanner -from google.adk.planners import PlanReActPlanner +from google.adk.planners.built_in_planner import BuiltInPlanner +from google.adk.planners.plan_re_act_planner import PlanReActPlanner from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/callbacks/main.py b/contributing/samples/callbacks/main.py index 5cf6b52e..7cbf15e4 100755 --- a/contributing/samples/callbacks/main.py +++ b/contributing/samples/callbacks/main.py @@ -19,10 +19,10 @@ import warnings import agent from dotenv import load_dotenv from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/fields_planner/agent.py b/contributing/samples/fields_planner/agent.py index 8ff504a5..a4061658 100755 --- a/contributing/samples/fields_planner/agent.py +++ b/contributing/samples/fields_planner/agent.py @@ -14,9 +14,9 @@ import random -from google.adk import Agent -from google.adk.planners import BuiltInPlanner -from google.adk.planners import PlanReActPlanner +from google.adk.agents.llm_agent import Agent +from google.adk.planners.built_in_planner import BuiltInPlanner +from google.adk.planners.plan_re_act_planner import PlanReActPlanner from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/fields_planner/main.py b/contributing/samples/fields_planner/main.py index 18f67f5c..01a5e4aa 100755 --- a/contributing/samples/fields_planner/main.py +++ b/contributing/samples/fields_planner/main.py @@ -19,10 +19,9 @@ import warnings import agent from dotenv import load_dotenv from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/generate_image/agent.py b/contributing/samples/generate_image/agent.py index 1d0fa6b1..28b36a23 100644 --- a/contributing/samples/generate_image/agent.py +++ b/contributing/samples/generate_image/agent.py @@ -13,8 +13,8 @@ # limitations under the License. from google.adk import Agent -from google.adk.tools import load_artifacts -from google.adk.tools import ToolContext +from google.adk.tools.load_artifacts_tool import load_artifacts +from google.adk.tools.tool_context import ToolContext from google.genai import Client from google.genai import types diff --git a/contributing/samples/google_api/agent.py b/contributing/samples/google_api/agent.py index 1cdbab9c..bb06e36f 100644 --- a/contributing/samples/google_api/agent.py +++ b/contributing/samples/google_api/agent.py @@ -15,8 +15,8 @@ import os from dotenv import load_dotenv -from google.adk import Agent -from google.adk.tools.google_api_tool import BigQueryToolset +from google.adk.agents.llm_agent import Agent +from google.adk.tools.google_api_tool.google_api_toolsets import BigQueryToolset # Load environment variables from .env file load_dotenv() diff --git a/contributing/samples/google_search_agent/agent.py b/contributing/samples/google_search_agent/agent.py index cbf69e7b..2f647812 100644 --- a/contributing/samples/google_search_agent/agent.py +++ b/contributing/samples/google_search_agent/agent.py @@ -13,7 +13,7 @@ # limitations under the License. from google.adk import Agent -from google.adk.tools import google_search +from google.adk.tools.google_search_tool import google_search root_agent = Agent( model='gemini-2.0-flash-001', diff --git a/contributing/samples/hello_world/main.py b/contributing/samples/hello_world/main.py index e24d9e22..b9e30355 100755 --- a/contributing/samples/hello_world/main.py +++ b/contributing/samples/hello_world/main.py @@ -20,7 +20,7 @@ from dotenv import load_dotenv from google.adk.agents.run_config import RunConfig from google.adk.cli.utils import logs from google.adk.runners import InMemoryRunner -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/hello_world_anthropic/main.py b/contributing/samples/hello_world_anthropic/main.py index 923ec22a..8886267e 100644 --- a/contributing/samples/hello_world_anthropic/main.py +++ b/contributing/samples/hello_world_anthropic/main.py @@ -19,10 +19,10 @@ import time import agent from dotenv import load_dotenv from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/hello_world_litellm/agent.py b/contributing/samples/hello_world_litellm/agent.py index 19a77440..3a418940 100644 --- a/contributing/samples/hello_world_litellm/agent.py +++ b/contributing/samples/hello_world_litellm/agent.py @@ -15,7 +15,7 @@ import random -from google.adk import Agent +from google.adk.agents.llm_agent import Agent from google.adk.models.lite_llm import LiteLlm diff --git a/contributing/samples/hello_world_litellm/main.py b/contributing/samples/hello_world_litellm/main.py index e95353b5..4492c615 100644 --- a/contributing/samples/hello_world_litellm/main.py +++ b/contributing/samples/hello_world_litellm/main.py @@ -18,11 +18,11 @@ import time import agent from dotenv import load_dotenv -from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.runners import Runner +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py b/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py index 123ba136..4bec7d05 100644 --- a/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py +++ b/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py @@ -19,10 +19,10 @@ import time import agent from dotenv import load_dotenv from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/hello_world_ma/agent.py b/contributing/samples/hello_world_ma/agent.py index a6bf78a9..f9d09765 100755 --- a/contributing/samples/hello_world_ma/agent.py +++ b/contributing/samples/hello_world_ma/agent.py @@ -14,7 +14,7 @@ import random -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.examples.example import Example from google.adk.tools.example_tool import ExampleTool from google.genai import types diff --git a/contributing/samples/hello_world_ollama/agent.py b/contributing/samples/hello_world_ollama/agent.py index 22cfc4f4..7301aa53 100755 --- a/contributing/samples/hello_world_ollama/agent.py +++ b/contributing/samples/hello_world_ollama/agent.py @@ -14,7 +14,7 @@ import random -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.models.lite_llm import LiteLlm diff --git a/contributing/samples/hello_world_ollama/main.py b/contributing/samples/hello_world_ollama/main.py index 9a679f4f..28fdbbbc 100755 --- a/contributing/samples/hello_world_ollama/main.py +++ b/contributing/samples/hello_world_ollama/main.py @@ -19,10 +19,10 @@ import warnings import agent from dotenv import load_dotenv from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/history_management/agent.py b/contributing/samples/history_management/agent.py index 1f5ad0d0..9621b61c 100755 --- a/contributing/samples/history_management/agent.py +++ b/contributing/samples/history_management/agent.py @@ -14,9 +14,9 @@ import random -from google.adk import Agent from google.adk.agents.callback_context import CallbackContext -from google.adk.models import LlmRequest +from google.adk.agents.llm_agent import Agent +from google.adk.models.llm_request import LlmRequest from google.adk.tools.tool_context import ToolContext diff --git a/contributing/samples/history_management/main.py b/contributing/samples/history_management/main.py index 5cf6b52e..7cbf15e4 100755 --- a/contributing/samples/history_management/main.py +++ b/contributing/samples/history_management/main.py @@ -19,10 +19,10 @@ import warnings import agent from dotenv import load_dotenv from google.adk import Runner -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/human_in_loop/agent.py b/contributing/samples/human_in_loop/agent.py index acf7e456..79563319 100644 --- a/contributing/samples/human_in_loop/agent.py +++ b/contributing/samples/human_in_loop/agent.py @@ -15,8 +15,8 @@ from typing import Any from google.adk import Agent -from google.adk.tools import ToolContext from google.adk.tools.long_running_tool import LongRunningFunctionTool +from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/human_in_loop/main.py b/contributing/samples/human_in_loop/main.py index f3f542fa..2e664b73 100644 --- a/contributing/samples/human_in_loop/main.py +++ b/contributing/samples/human_in_loop/main.py @@ -19,11 +19,11 @@ from typing import Union import agent from dotenv import load_dotenv -from google.adk.agents import Agent -from google.adk.events import Event +from google.adk.agents.llm_agent import Agent +from google.adk.events.event import Event from google.adk.runners import Runner -from google.adk.sessions import InMemorySessionService -from google.adk.tools import LongRunningFunctionTool +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.tools.long_running_tool import LongRunningFunctionTool from google.genai import types from opentelemetry import trace from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter diff --git a/contributing/samples/integration_connector_euc_agent/agent.py b/contributing/samples/integration_connector_euc_agent/agent.py index b21a9650..a66e812f 100644 --- a/contributing/samples/integration_connector_euc_agent/agent.py +++ b/contributing/samples/integration_connector_euc_agent/agent.py @@ -16,9 +16,9 @@ import os from dotenv import load_dotenv from google.adk import Agent -from google.adk.auth import AuthCredential -from google.adk.auth import AuthCredentialTypes -from google.adk.auth import OAuth2Auth +from google.adk.auth.auth_credential import AuthCredential +from google.adk.auth.auth_credential import AuthCredentialTypes +from google.adk.auth.auth_credential import OAuth2Auth from google.adk.tools.application_integration_tool.application_integration_toolset import ApplicationIntegrationToolset from google.adk.tools.openapi_tool.auth.auth_helpers import dict_to_auth_scheme from google.genai import types diff --git a/contributing/samples/jira_agent/agent.py b/contributing/samples/jira_agent/agent.py index 12dc2663..9f2b866c 100644 --- a/contributing/samples/jira_agent/agent.py +++ b/contributing/samples/jira_agent/agent.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from .tools import jira_tool @@ -24,28 +24,28 @@ root_agent = Agent( To start with, greet the user First, you will be given a description of what you can do. You the jira agent, who can help the user by fetching the jira issues based on the user query inputs - - If an User wants to display all issues, then output only Key, Description, Summary, Status fields in a **clear table format** with key information. Example given below. Separate each line. + + If an User wants to display all issues, then output only Key, Description, Summary, Status fields in a **clear table format** with key information. Example given below. Separate each line. Example: {"key": "PROJ-123", "description": "This is a description", "summary": "This is a summary", "status": "In Progress"} - + If an User wants to fetch on one specific key then use the LIST operation to fetch all Jira issues. Then filter locally to display only filtered result as per User given key input. - **User query:** "give me the details of SMP-2" - Output only Key, Description, Summary, Status fields in a **clear table format** with key information. - **Output:** {"key": "PROJ-123", "description": "This is a description", "summary": "This is a summary", "status": "In Progress"} - + Example scenarios: - **User query:** "Can you show me all Jira issues with status `Done`?" - **Output:** {"key": "PROJ-123", "description": "This is a description", "summary": "This is a summary", "status": "In Progress"} - + - **User query:** "can you give details of SMP-2?" - **Output:** {"key": "PROJ-123", "description": "This is a description", "summary": "This is a summary", "status": "In Progress"} - + - **User query:** "Show issues with summary containing 'World'" - **Output:** {"key": "PROJ-123", "description": "This is a description", "summary": "World", "status": "In Progress"} - + - **User query:** "Show issues with description containing 'This is example task 3'" - **Output:** {"key": "PROJ-123", "description": "This is example task 3", "summary": "World", "status": "In Progress"} - + **Important Notes:** - I currently support only **GET** and **LIST** operations. """, diff --git a/contributing/samples/langchain_structured_tool_agent/agent.py b/contributing/samples/langchain_structured_tool_agent/agent.py index b7119594..5c4c5b9a 100644 --- a/contributing/samples/langchain_structured_tool_agent/agent.py +++ b/contributing/samples/langchain_structured_tool_agent/agent.py @@ -15,7 +15,7 @@ """ This agent aims to test the Langchain tool with Langchain's StructuredTool """ -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.tools.langchain_tool import LangchainTool from langchain.tools import tool from langchain_core.tools.structured import StructuredTool diff --git a/contributing/samples/langchain_youtube_search_agent/agent.py b/contributing/samples/langchain_youtube_search_agent/agent.py index 70d7b1e9..005fe387 100644 --- a/contributing/samples/langchain_youtube_search_agent/agent.py +++ b/contributing/samples/langchain_youtube_search_agent/agent.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import LlmAgent +from google.adk.agents.llm_agent import LlmAgent from google.adk.tools.langchain_tool import LangchainTool -from langchain_community.tools import YouTubeSearchTool +from langchain_community.tools.youtube.search import YouTubeSearchTool # Instantiate the tool langchain_yt_tool = YouTubeSearchTool() diff --git a/contributing/samples/live_bidi_streaming_multi_agent/agent.py b/contributing/samples/live_bidi_streaming_multi_agent/agent.py index 09b08e32..ac50eb7a 100644 --- a/contributing/samples/live_bidi_streaming_multi_agent/agent.py +++ b/contributing/samples/live_bidi_streaming_multi_agent/agent.py @@ -14,7 +14,7 @@ import random -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.examples.example import Example from google.adk.tools.example_tool import ExampleTool from google.genai import types diff --git a/contributing/samples/live_tool_callbacks_agent/agent.py b/contributing/samples/live_tool_callbacks_agent/agent.py index 531dbc9b..3f540b97 100644 --- a/contributing/samples/live_tool_callbacks_agent/agent.py +++ b/contributing/samples/live_tool_callbacks_agent/agent.py @@ -19,7 +19,7 @@ from typing import Any from typing import Dict from typing import Optional -from google.adk import Agent +from google.adk.agents.llm_agent import Agent from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/memory/main.py b/contributing/samples/memory/main.py index be9627d8..5242d30a 100755 --- a/contributing/samples/memory/main.py +++ b/contributing/samples/memory/main.py @@ -21,7 +21,7 @@ import agent from dotenv import load_dotenv from google.adk.cli.utils import logs from google.adk.runners import InMemoryRunner -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/non_llm_sequential/agent.py b/contributing/samples/non_llm_sequential/agent.py index 80cef7a2..8e59116b 100755 --- a/contributing/samples/non_llm_sequential/agent.py +++ b/contributing/samples/non_llm_sequential/agent.py @@ -13,8 +13,8 @@ # limitations under the License. -from google.adk.agents import Agent -from google.adk.agents import SequentialAgent +from google.adk.agents.llm_agent import Agent +from google.adk.agents.sequential_agent import SequentialAgent sub_agent_1 = Agent( name='sub_agent_1', diff --git a/contributing/samples/oauth_calendar_agent/agent.py b/contributing/samples/oauth_calendar_agent/agent.py index 3f966b78..718f5c66 100644 --- a/contributing/samples/oauth_calendar_agent/agent.py +++ b/contributing/samples/oauth_calendar_agent/agent.py @@ -19,15 +19,15 @@ from dotenv import load_dotenv from fastapi.openapi.models import OAuth2 from fastapi.openapi.models import OAuthFlowAuthorizationCode from fastapi.openapi.models import OAuthFlows -from google.adk import Agent from google.adk.agents.callback_context import CallbackContext -from google.adk.auth import AuthConfig -from google.adk.auth import AuthCredential -from google.adk.auth import AuthCredentialTypes -from google.adk.auth import OAuth2Auth -from google.adk.tools import ToolContext +from google.adk.agents.llm_agent import Agent +from google.adk.auth.auth_credential import AuthCredential +from google.adk.auth.auth_credential import AuthCredentialTypes +from google.adk.auth.auth_credential import OAuth2Auth +from google.adk.auth.auth_tool import AuthConfig from google.adk.tools.authenticated_function_tool import AuthenticatedFunctionTool from google.adk.tools.google_api_tool import CalendarToolset +from google.adk.tools.tool_context import ToolContext from google.oauth2.credentials import Credentials from googleapiclient.discovery import build diff --git a/contributing/samples/quickstart/agent.py b/contributing/samples/quickstart/agent.py index b251069a..f32c1e54 100644 --- a/contributing/samples/quickstart/agent.py +++ b/contributing/samples/quickstart/agent.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent def get_weather(city: str) -> dict: diff --git a/contributing/samples/rag_agent/agent.py b/contributing/samples/rag_agent/agent.py index 3c6dca8d..ca3a7e32 100644 --- a/contributing/samples/rag_agent/agent.py +++ b/contributing/samples/rag_agent/agent.py @@ -15,7 +15,7 @@ import os from dotenv import load_dotenv -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.tools.retrieval.vertex_ai_rag_retrieval import VertexAiRagRetrieval from vertexai.preview import rag diff --git a/contributing/samples/telemetry/agent.py b/contributing/samples/telemetry/agent.py index 62497300..a9db434b 100755 --- a/contributing/samples/telemetry/agent.py +++ b/contributing/samples/telemetry/agent.py @@ -15,8 +15,8 @@ import random from google.adk import Agent -from google.adk.planners import BuiltInPlanner -from google.adk.planners import PlanReActPlanner +from google.adk.planners.built_in_planner import BuiltInPlanner +from google.adk.planners.plan_re_act_planner import PlanReActPlanner from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/telemetry/main.py b/contributing/samples/telemetry/main.py index de08c82d..3998c2a7 100755 --- a/contributing/samples/telemetry/main.py +++ b/contributing/samples/telemetry/main.py @@ -20,7 +20,7 @@ import agent from dotenv import load_dotenv from google.adk.agents.run_config import RunConfig from google.adk.runners import InMemoryRunner -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types from opentelemetry import trace from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter diff --git a/contributing/samples/token_usage/agent.py b/contributing/samples/token_usage/agent.py index 65990cee..a73f9e76 100755 --- a/contributing/samples/token_usage/agent.py +++ b/contributing/samples/token_usage/agent.py @@ -19,8 +19,8 @@ from google.adk.agents.llm_agent import LlmAgent from google.adk.agents.sequential_agent import SequentialAgent from google.adk.models.anthropic_llm import Claude from google.adk.models.lite_llm import LiteLlm -from google.adk.planners import BuiltInPlanner -from google.adk.planners import PlanReActPlanner +from google.adk.planners.built_in_planner import BuiltInPlanner +from google.adk.planners.plan_re_act_planner import PlanReActPlanner from google.adk.tools.tool_context import ToolContext from google.genai import types diff --git a/contributing/samples/token_usage/main.py b/contributing/samples/token_usage/main.py index d85669af..28454989 100755 --- a/contributing/samples/token_usage/main.py +++ b/contributing/samples/token_usage/main.py @@ -20,10 +20,10 @@ import agent from dotenv import load_dotenv from google.adk import Runner from google.adk.agents.run_config import RunConfig -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.cli.utils import logs -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/contributing/samples/toolbox_agent/agent.py b/contributing/samples/toolbox_agent/agent.py index e7b04b1a..cfbb8a9c 100644 --- a/contributing/samples/toolbox_agent/agent.py +++ b/contributing/samples/toolbox_agent/agent.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.tools.toolbox_toolset import ToolboxToolset root_agent = Agent( diff --git a/contributing/samples/workflow_agent_seq/main.py b/contributing/samples/workflow_agent_seq/main.py index 1adfb192..9ea689a1 100644 --- a/contributing/samples/workflow_agent_seq/main.py +++ b/contributing/samples/workflow_agent_seq/main.py @@ -20,7 +20,7 @@ import agent from dotenv import load_dotenv from google.adk.cli.utils import logs from google.adk.runners import InMemoryRunner -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types load_dotenv(override=True) diff --git a/src/google/adk/agents/base_agent.py b/src/google/adk/agents/base_agent.py index d23cef3c..981e84df 100644 --- a/src/google/adk/agents/base_agent.py +++ b/src/google/adk/agents/base_agent.py @@ -568,7 +568,7 @@ class SubAgentConfig(BaseModel): ``` # my_library/custom_agents.py - from google.adk.agents import LlmAgent + from google.adk.agents.llm_agent import LlmAgent my_custom_agent = LlmAgent( name="my_custom_agent", diff --git a/src/google/adk/cli/cli_create.py b/src/google/adk/cli/cli_create.py index 43524ade..2d304989 100644 --- a/src/google/adk/cli/cli_create.py +++ b/src/google/adk/cli/cli_create.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + import os import subprocess from typing import Optional @@ -24,7 +26,7 @@ from . import agent """ _AGENT_PY_TEMPLATE = """\ -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent root_agent = Agent( model='{model_name}', diff --git a/src/google/adk/tools/application_integration_tool/integration_connector_tool.py b/src/google/adk/tools/application_integration_tool/integration_connector_tool.py index 14b50521..0f1a6895 100644 --- a/src/google/adk/tools/application_integration_tool/integration_connector_tool.py +++ b/src/google/adk/tools/application_integration_tool/integration_connector_tool.py @@ -23,10 +23,10 @@ from typing import Union from google.genai.types import FunctionDeclaration from typing_extensions import override -from .. import BaseTool from ...auth.auth_credential import AuthCredential from ...auth.auth_schemes import AuthScheme from .._gemini_schema_util import _to_gemini_schema +from ..base_tool import BaseTool from ..openapi_tool.openapi_spec_parser.rest_api_tool import RestApiTool from ..openapi_tool.openapi_spec_parser.tool_auth_handler import ToolAuthHandler from ..tool_context import ToolContext diff --git a/src/google/adk/tools/google_api_tool/google_api_tool.py b/src/google/adk/tools/google_api_tool/google_api_tool.py index 5b2d51a2..d2bac568 100644 --- a/src/google/adk/tools/google_api_tool/google_api_tool.py +++ b/src/google/adk/tools/google_api_tool/google_api_tool.py @@ -21,11 +21,11 @@ from typing import Optional from google.genai.types import FunctionDeclaration from typing_extensions import override -from .. import BaseTool -from ...auth import AuthCredential -from ...auth import AuthCredentialTypes -from ...auth import OAuth2Auth +from ...auth.auth_credential import AuthCredential +from ...auth.auth_credential import AuthCredentialTypes +from ...auth.auth_credential import OAuth2Auth from ...auth.auth_credential import ServiceAccount +from ..base_tool import BaseTool from ..openapi_tool import RestApiTool from ..openapi_tool.auth.auth_helpers import service_account_scheme_credential from ..tool_context import ToolContext diff --git a/src/google/adk/tools/google_api_tool/google_api_toolset.py b/src/google/adk/tools/google_api_tool/google_api_toolset.py index 47b3838e..c2c6a130 100644 --- a/src/google/adk/tools/google_api_tool/google_api_toolset.py +++ b/src/google/adk/tools/google_api_tool/google_api_toolset.py @@ -21,8 +21,8 @@ from typing import Union from typing_extensions import override from ...agents.readonly_context import ReadonlyContext -from ...auth import OpenIdConnectWithConfig from ...auth.auth_credential import ServiceAccount +from ...auth.auth_schemes import OpenIdConnectWithConfig from ...tools.base_toolset import BaseToolset from ...tools.base_toolset import ToolPredicate from ..openapi_tool import OpenAPIToolset diff --git a/src/google/adk/utils/instructions_utils.py b/src/google/adk/utils/instructions_utils.py index 1b455429..05d7dd0c 100644 --- a/src/google/adk/utils/instructions_utils.py +++ b/src/google/adk/utils/instructions_utils.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + import re from ..agents.readonly_context import ReadonlyContext @@ -34,12 +36,12 @@ async def inject_session_state( e.g. ``` ... - from google.adk.utils import instructions_utils + from google.adk.utils.instructions_utils import inject_session_state async def build_instruction( readonly_context: ReadonlyContext, ) -> str: - return await instructions_utils.inject_session_state( + return await inject_session_state( 'You can inject a state variable like {var_name} or an artifact ' '{artifact.file_name} into the instruction template.', readonly_context, diff --git a/tests/integration/fixture/callback_agent/agent.py b/tests/integration/fixture/callback_agent/agent.py index f57c3aaf..e5efab59 100644 --- a/tests/integration/fixture/callback_agent/agent.py +++ b/tests/integration/fixture/callback_agent/agent.py @@ -14,11 +14,11 @@ from typing import Optional -from google.adk import Agent from google.adk.agents.callback_context import CallbackContext from google.adk.agents.invocation_context import InvocationContext -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse +from google.adk.agents.llm_agent import Agent +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.genai import types diff --git a/tests/integration/fixture/context_update_test/agent.py b/tests/integration/fixture/context_update_test/agent.py index e1148242..6c432222 100644 --- a/tests/integration/fixture/context_update_test/agent.py +++ b/tests/integration/fixture/context_update_test/agent.py @@ -16,7 +16,7 @@ from typing import List from typing import Union from google.adk import Agent -from google.adk.tools import ToolContext +from google.adk.tools.tool_context import ToolContext from pydantic import BaseModel diff --git a/tests/integration/fixture/context_variable_agent/agent.py b/tests/integration/fixture/context_variable_agent/agent.py index a18b61cd..cef56ccb 100644 --- a/tests/integration/fixture/context_variable_agent/agent.py +++ b/tests/integration/fixture/context_variable_agent/agent.py @@ -17,8 +17,8 @@ from typing import Union from google.adk import Agent from google.adk.agents.invocation_context import InvocationContext -from google.adk.planners import PlanReActPlanner -from google.adk.tools import ToolContext +from google.adk.planners.plan_re_act_planner import PlanReActPlanner +from google.adk.tools.tool_context import ToolContext def update_fc( diff --git a/tests/integration/models/test_google_llm.py b/tests/integration/models/test_google_llm.py index daa0b516..5574eb30 100644 --- a/tests/integration/models/test_google_llm.py +++ b/tests/integration/models/test_google_llm.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse from google.adk.models.google_llm import Gemini +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.genai import types from google.genai.types import Content from google.genai.types import Part diff --git a/tests/integration/models/test_litellm_no_function.py b/tests/integration/models/test_litellm_no_function.py index 05072b89..013bf26f 100644 --- a/tests/integration/models/test_litellm_no_function.py +++ b/tests/integration/models/test_litellm_no_function.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse from google.adk.models.lite_llm import LiteLlm +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.genai import types from google.genai.types import Content from google.genai.types import Part diff --git a/tests/integration/models/test_litellm_with_function.py b/tests/integration/models/test_litellm_with_function.py index e0d2bc99..e4ac787e 100644 --- a/tests/integration/models/test_litellm_with_function.py +++ b/tests/integration/models/test_litellm_with_function.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.models import LlmRequest from google.adk.models.lite_llm import LiteLlm +from google.adk.models.llm_request import LlmRequest from google.genai import types from google.genai.types import Content from google.genai.types import Part diff --git a/tests/integration/test_evalute_agent_in_fixture.py b/tests/integration/test_evalute_agent_in_fixture.py index 4fdeed9c..344ba099 100644 --- a/tests/integration/test_evalute_agent_in_fixture.py +++ b/tests/integration/test_evalute_agent_in_fixture.py @@ -16,7 +16,7 @@ import os -from google.adk.evaluation import AgentEvaluator +from google.adk.evaluation.agent_evaluator import AgentEvaluator import pytest diff --git a/tests/integration/test_multi_agent.py b/tests/integration/test_multi_agent.py index 3d161a99..4e147040 100644 --- a/tests/integration/test_multi_agent.py +++ b/tests/integration/test_multi_agent.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.evaluation import AgentEvaluator +from google.adk.evaluation.agent_evaluator import AgentEvaluator import pytest diff --git a/tests/integration/test_multi_turn.py b/tests/integration/test_multi_turn.py index 5e300a71..33057100 100644 --- a/tests/integration/test_multi_turn.py +++ b/tests/integration/test_multi_turn.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.evaluation import AgentEvaluator +from google.adk.evaluation.agent_evaluator import AgentEvaluator import pytest diff --git a/tests/integration/test_single_agent.py b/tests/integration/test_single_agent.py index 008b7e8a..183005ed 100644 --- a/tests/integration/test_single_agent.py +++ b/tests/integration/test_single_agent.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.evaluation import AgentEvaluator +from google.adk.evaluation.agent_evaluator import AgentEvaluator import pytest diff --git a/tests/integration/test_sub_agent.py b/tests/integration/test_sub_agent.py index cbfb90b6..4318d29c 100644 --- a/tests/integration/test_sub_agent.py +++ b/tests/integration/test_sub_agent.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.evaluation import AgentEvaluator +from google.adk.evaluation.agent_evaluator import AgentEvaluator import pytest diff --git a/tests/integration/test_system_instruction.py b/tests/integration/test_system_instruction.py index 8ce1b095..5e234b24 100644 --- a/tests/integration/test_system_instruction.py +++ b/tests/integration/test_system_instruction.py @@ -17,8 +17,8 @@ import pytest # Skip until fixed. pytest.skip(allow_module_level=True) -from google.adk.agents import InvocationContext -from google.adk.sessions import Session +from google.adk.agents.invocation_context import InvocationContext +from google.adk.sessions.session import Session from google.genai import types from .fixture import context_variable_agent diff --git a/tests/integration/test_with_test_file.py b/tests/integration/test_with_test_file.py index d19428f2..76492dd5 100644 --- a/tests/integration/test_with_test_file.py +++ b/tests/integration/test_with_test_file.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.evaluation import AgentEvaluator +from google.adk.evaluation.agent_evaluator import AgentEvaluator import pytest diff --git a/tests/integration/utils/test_runner.py b/tests/integration/utils/test_runner.py index 9ac7c320..94c8d926 100644 --- a/tests/integration/utils/test_runner.py +++ b/tests/integration/utils/test_runner.py @@ -17,12 +17,12 @@ from typing import Optional from google.adk import Agent from google.adk import Runner -from google.adk.artifacts import BaseArtifactService -from google.adk.artifacts import InMemoryArtifactService -from google.adk.events import Event -from google.adk.sessions import BaseSessionService -from google.adk.sessions import InMemorySessionService -from google.adk.sessions import Session +from google.adk.artifacts.base_artifact_service import BaseArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService +from google.adk.events.event import Event +from google.adk.sessions.base_session_service import BaseSessionService +from google.adk.sessions.in_memory_session_service import InMemorySessionService +from google.adk.sessions.session import Session from google.genai import types diff --git a/tests/unittests/agents/test_base_agent.py b/tests/unittests/agents/test_base_agent.py index 4f8bd770..e0ea5940 100644 --- a/tests/unittests/agents/test_base_agent.py +++ b/tests/unittests/agents/test_base_agent.py @@ -25,7 +25,7 @@ from unittest import mock from google.adk.agents.base_agent import BaseAgent from google.adk.agents.callback_context import CallbackContext from google.adk.agents.invocation_context import InvocationContext -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.plugins.base_plugin import BasePlugin from google.adk.plugins.plugin_manager import PluginManager from google.adk.sessions.in_memory_session_service import InMemorySessionService diff --git a/tests/unittests/agents/test_langgraph_agent.py b/tests/unittests/agents/test_langgraph_agent.py index 4e5d3481..d0155cbe 100644 --- a/tests/unittests/agents/test_langgraph_agent.py +++ b/tests/unittests/agents/test_langgraph_agent.py @@ -16,7 +16,7 @@ from unittest.mock import MagicMock from google.adk.agents.invocation_context import InvocationContext from google.adk.agents.langgraph_agent import LangGraphAgent -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.plugins.plugin_manager import PluginManager from google.genai import types from langchain_core.messages import AIMessage diff --git a/tests/unittests/agents/test_llm_agent_callbacks.py b/tests/unittests/agents/test_llm_agent_callbacks.py index 21ef8a94..638fda03 100644 --- a/tests/unittests/agents/test_llm_agent_callbacks.py +++ b/tests/unittests/agents/test_llm_agent_callbacks.py @@ -17,8 +17,8 @@ from typing import Optional from google.adk.agents.callback_context import CallbackContext from google.adk.agents.llm_agent import Agent -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.genai import types from pydantic import BaseModel import pytest diff --git a/tests/unittests/agents/test_loop_agent.py b/tests/unittests/agents/test_loop_agent.py index 30e1caa5..a69a9ddf 100644 --- a/tests/unittests/agents/test_loop_agent.py +++ b/tests/unittests/agents/test_loop_agent.py @@ -19,8 +19,8 @@ from typing import AsyncGenerator from google.adk.agents.base_agent import BaseAgent from google.adk.agents.invocation_context import InvocationContext from google.adk.agents.loop_agent import LoopAgent -from google.adk.events import Event -from google.adk.events import EventActions +from google.adk.events.event import Event +from google.adk.events.event_actions import EventActions from google.adk.sessions.in_memory_session_service import InMemorySessionService from google.genai import types import pytest diff --git a/tests/unittests/agents/test_model_callback_chain.py b/tests/unittests/agents/test_model_callback_chain.py index e0bf0378..90618fb2 100644 --- a/tests/unittests/agents/test_model_callback_chain.py +++ b/tests/unittests/agents/test_model_callback_chain.py @@ -21,8 +21,8 @@ from unittest import mock from google.adk.agents.callback_context import CallbackContext from google.adk.agents.llm_agent import Agent -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.genai import types from pydantic import BaseModel import pytest diff --git a/tests/unittests/agents/test_parallel_agent.py b/tests/unittests/agents/test_parallel_agent.py index ccfdae30..3b03b897 100644 --- a/tests/unittests/agents/test_parallel_agent.py +++ b/tests/unittests/agents/test_parallel_agent.py @@ -21,7 +21,7 @@ from google.adk.agents.base_agent import BaseAgent from google.adk.agents.invocation_context import InvocationContext from google.adk.agents.parallel_agent import ParallelAgent from google.adk.agents.sequential_agent import SequentialAgent -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.sessions.in_memory_session_service import InMemorySessionService from google.genai import types import pytest diff --git a/tests/unittests/agents/test_sequential_agent.py b/tests/unittests/agents/test_sequential_agent.py index 929f7140..d73c3192 100644 --- a/tests/unittests/agents/test_sequential_agent.py +++ b/tests/unittests/agents/test_sequential_agent.py @@ -19,7 +19,7 @@ from typing import AsyncGenerator from google.adk.agents.base_agent import BaseAgent from google.adk.agents.invocation_context import InvocationContext from google.adk.agents.sequential_agent import SequentialAgent -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.sessions.in_memory_session_service import InMemorySessionService from google.genai import types import pytest diff --git a/tests/unittests/artifacts/test_artifact_service.py b/tests/unittests/artifacts/test_artifact_service.py index 5ad92a41..626b867d 100644 --- a/tests/unittests/artifacts/test_artifact_service.py +++ b/tests/unittests/artifacts/test_artifact_service.py @@ -19,8 +19,8 @@ from typing import Optional from typing import Union from unittest import mock -from google.adk.artifacts import GcsArtifactService -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.gcs_artifact_service import GcsArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.genai import types import pytest diff --git a/tests/unittests/cli/test_fast_api.py b/tests/unittests/cli/test_fast_api.py index 0c64cd0a..70d53034 100755 --- a/tests/unittests/cli/test_fast_api.py +++ b/tests/unittests/cli/test_fast_api.py @@ -33,7 +33,7 @@ from google.adk.evaluation.eval_case import Invocation from google.adk.evaluation.eval_result import EvalSetResult from google.adk.evaluation.eval_set import EvalSet from google.adk.evaluation.in_memory_eval_sets_manager import InMemoryEvalSetsManager -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.runners import Runner from google.adk.sessions.base_session_service import ListSessionsResponse from google.genai import types diff --git a/tests/unittests/flows/llm_flows/test_agent_transfer.py b/tests/unittests/flows/llm_flows/test_agent_transfer.py index f660903d..4cb48c84 100644 --- a/tests/unittests/flows/llm_flows/test_agent_transfer.py +++ b/tests/unittests/flows/llm_flows/test_agent_transfer.py @@ -15,7 +15,7 @@ from google.adk.agents.llm_agent import Agent from google.adk.agents.loop_agent import LoopAgent from google.adk.agents.sequential_agent import SequentialAgent -from google.adk.tools import exit_loop +from google.adk.tools.exit_loop_tool import exit_loop from google.genai.types import Part from ... import testing_utils diff --git a/tests/unittests/flows/llm_flows/test_async_tool_callbacks.py b/tests/unittests/flows/llm_flows/test_async_tool_callbacks.py index 35f3a811..c3f35118 100644 --- a/tests/unittests/flows/llm_flows/test_async_tool_callbacks.py +++ b/tests/unittests/flows/llm_flows/test_async_tool_callbacks.py @@ -20,8 +20,8 @@ from typing import List from typing import Optional from unittest import mock -from google.adk.agents import Agent from google.adk.agents.callback_context import CallbackContext +from google.adk.agents.llm_agent import Agent from google.adk.events.event import Event from google.adk.flows.llm_flows.functions import handle_function_calls_async from google.adk.tools.function_tool import FunctionTool diff --git a/tests/unittests/flows/llm_flows/test_base_llm_flow.py b/tests/unittests/flows/llm_flows/test_base_llm_flow.py index 82333c45..8ae88536 100644 --- a/tests/unittests/flows/llm_flows/test_base_llm_flow.py +++ b/tests/unittests/flows/llm_flows/test_base_llm_flow.py @@ -16,7 +16,7 @@ from unittest.mock import AsyncMock -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.flows.llm_flows.base_llm_flow import BaseLlmFlow from google.adk.models.llm_request import LlmRequest from google.adk.models.llm_response import LlmResponse diff --git a/tests/unittests/flows/llm_flows/test_base_llm_flow_partial_handling.py b/tests/unittests/flows/llm_flows/test_base_llm_flow_partial_handling.py index c5043ac0..4cdd6cc5 100644 --- a/tests/unittests/flows/llm_flows/test_base_llm_flow_partial_handling.py +++ b/tests/unittests/flows/llm_flows/test_base_llm_flow_partial_handling.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.flows.llm_flows.base_llm_flow import BaseLlmFlow from google.adk.models.llm_response import LlmResponse from google.genai import types diff --git a/tests/unittests/flows/llm_flows/test_base_llm_flow_realtime.py b/tests/unittests/flows/llm_flows/test_base_llm_flow_realtime.py index f3eefb18..d6033450 100644 --- a/tests/unittests/flows/llm_flows/test_base_llm_flow_realtime.py +++ b/tests/unittests/flows/llm_flows/test_base_llm_flow_realtime.py @@ -14,9 +14,9 @@ from unittest import mock -from google.adk.agents import Agent from google.adk.agents.live_request_queue import LiveRequest from google.adk.agents.live_request_queue import LiveRequestQueue +from google.adk.agents.llm_agent import Agent from google.adk.agents.run_config import RunConfig from google.adk.flows.llm_flows.base_llm_flow import BaseLlmFlow from google.adk.models.llm_request import LlmRequest diff --git a/tests/unittests/flows/llm_flows/test_contents.py b/tests/unittests/flows/llm_flows/test_contents.py index 995b3868..fae62d35 100644 --- a/tests/unittests/flows/llm_flows/test_contents.py +++ b/tests/unittests/flows/llm_flows/test_contents.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.events.event import Event from google.adk.flows.llm_flows import contents from google.adk.flows.llm_flows.contents import _convert_foreign_event @@ -20,7 +20,7 @@ from google.adk.flows.llm_flows.contents import _get_contents from google.adk.flows.llm_flows.contents import _merge_function_response_events from google.adk.flows.llm_flows.contents import _rearrange_events_for_async_function_responses_in_history from google.adk.flows.llm_flows.contents import _rearrange_events_for_latest_function_response -from google.adk.models import LlmRequest +from google.adk.models.llm_request import LlmRequest from google.genai import types import pytest diff --git a/tests/unittests/flows/llm_flows/test_functions_long_running.py b/tests/unittests/flows/llm_flows/test_functions_long_running.py index e173c871..bf2482bf 100644 --- a/tests/unittests/flows/llm_flows/test_functions_long_running.py +++ b/tests/unittests/flows/llm_flows/test_functions_long_running.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent -from google.adk.tools import ToolContext +from google.adk.agents.llm_agent import Agent from google.adk.tools.long_running_tool import LongRunningFunctionTool +from google.adk.tools.tool_context import ToolContext from google.genai.types import Part from ... import testing_utils diff --git a/tests/unittests/flows/llm_flows/test_functions_parallel.py b/tests/unittests/flows/llm_flows/test_functions_parallel.py index 626dfcf6..85bba89f 100644 --- a/tests/unittests/flows/llm_flows/test_functions_parallel.py +++ b/tests/unittests/flows/llm_flows/test_functions_parallel.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.events.event_actions import EventActions -from google.adk.tools import ToolContext +from google.adk.tools.tool_context import ToolContext from google.genai import types import pytest diff --git a/tests/unittests/flows/llm_flows/test_functions_request_euc.py b/tests/unittests/flows/llm_flows/test_functions_request_euc.py index 03b66a55..03312062 100644 --- a/tests/unittests/flows/llm_flows/test_functions_request_euc.py +++ b/tests/unittests/flows/llm_flows/test_functions_request_euc.py @@ -18,14 +18,14 @@ from typing import Optional from fastapi.openapi.models import OAuth2 from fastapi.openapi.models import OAuthFlowAuthorizationCode from fastapi.openapi.models import OAuthFlows -from google.adk.agents import Agent -from google.adk.auth import AuthConfig -from google.adk.auth import AuthCredential -from google.adk.auth import AuthCredentialTypes -from google.adk.auth import OAuth2Auth +from google.adk.agents.llm_agent import Agent +from google.adk.auth.auth_credential import AuthCredential +from google.adk.auth.auth_credential import AuthCredentialTypes +from google.adk.auth.auth_credential import OAuth2Auth +from google.adk.auth.auth_tool import AuthConfig +from google.adk.auth.auth_tool import AuthToolArguments from google.adk.flows.llm_flows import functions -from google.adk.tools import AuthToolArguments -from google.adk.tools import ToolContext +from google.adk.tools.tool_context import ToolContext from google.genai import types from ... import testing_utils diff --git a/tests/unittests/flows/llm_flows/test_functions_sequential.py b/tests/unittests/flows/llm_flows/test_functions_sequential.py index 0a21b8dd..a88d90f3 100644 --- a/tests/unittests/flows/llm_flows/test_functions_sequential.py +++ b/tests/unittests/flows/llm_flows/test_functions_sequential.py @@ -14,7 +14,7 @@ from typing import Any -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.genai import types from ... import testing_utils diff --git a/tests/unittests/flows/llm_flows/test_functions_simple.py b/tests/unittests/flows/llm_flows/test_functions_simple.py index 720af516..745337d5 100644 --- a/tests/unittests/flows/llm_flows/test_functions_simple.py +++ b/tests/unittests/flows/llm_flows/test_functions_simple.py @@ -16,12 +16,12 @@ from typing import Any from typing import AsyncGenerator from typing import Callable -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.events.event import Event from google.adk.flows.llm_flows.functions import find_matching_function_call from google.adk.sessions.session import Session -from google.adk.tools import ToolContext from google.adk.tools.function_tool import FunctionTool +from google.adk.tools.tool_context import ToolContext from google.genai import types import pytest diff --git a/tests/unittests/flows/llm_flows/test_identity.py b/tests/unittests/flows/llm_flows/test_identity.py index 336da64a..cb0239b7 100644 --- a/tests/unittests/flows/llm_flows/test_identity.py +++ b/tests/unittests/flows/llm_flows/test_identity.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.flows.llm_flows import identity -from google.adk.models import LlmRequest +from google.adk.models.llm_request import LlmRequest from google.genai import types import pytest diff --git a/tests/unittests/flows/llm_flows/test_instructions.py b/tests/unittests/flows/llm_flows/test_instructions.py index 8ef31483..cf5be5dc 100644 --- a/tests/unittests/flows/llm_flows/test_instructions.py +++ b/tests/unittests/flows/llm_flows/test_instructions.py @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.agents.readonly_context import ReadonlyContext from google.adk.flows.llm_flows import instructions -from google.adk.models import LlmRequest -from google.adk.sessions import Session +from google.adk.models.llm_request import LlmRequest +from google.adk.sessions.session import Session from google.genai import types import pytest diff --git a/tests/unittests/flows/llm_flows/test_live_tool_callbacks.py b/tests/unittests/flows/llm_flows/test_live_tool_callbacks.py index 89954ff8..cbecaa15 100644 --- a/tests/unittests/flows/llm_flows/test_live_tool_callbacks.py +++ b/tests/unittests/flows/llm_flows/test_live_tool_callbacks.py @@ -20,7 +20,7 @@ from typing import List from typing import Optional from unittest import mock -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.events.event import Event from google.adk.flows.llm_flows.functions import handle_function_calls_live from google.adk.tools.function_tool import FunctionTool diff --git a/tests/unittests/flows/llm_flows/test_model_callbacks.py b/tests/unittests/flows/llm_flows/test_model_callbacks.py index 154ee807..d0cde4db 100644 --- a/tests/unittests/flows/llm_flows/test_model_callbacks.py +++ b/tests/unittests/flows/llm_flows/test_model_callbacks.py @@ -15,10 +15,10 @@ from typing import Any from typing import Optional -from google.adk.agents import Agent from google.adk.agents.callback_context import CallbackContext -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse +from google.adk.agents.llm_agent import Agent +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.genai import types from pydantic import BaseModel import pytest diff --git a/tests/unittests/flows/llm_flows/test_other_configs.py b/tests/unittests/flows/llm_flows/test_other_configs.py index 1f3d8163..130850e2 100644 --- a/tests/unittests/flows/llm_flows/test_other_configs.py +++ b/tests/unittests/flows/llm_flows/test_other_configs.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent -from google.adk.tools import ToolContext +from google.adk.agents.llm_agent import Agent +from google.adk.tools.tool_context import ToolContext from google.genai.types import Part from pydantic import BaseModel diff --git a/tests/unittests/flows/llm_flows/test_plugin_model_callbacks.py b/tests/unittests/flows/llm_flows/test_plugin_model_callbacks.py index b9b2dec3..c62abfd5 100644 --- a/tests/unittests/flows/llm_flows/test_plugin_model_callbacks.py +++ b/tests/unittests/flows/llm_flows/test_plugin_model_callbacks.py @@ -14,10 +14,10 @@ from typing import Optional -from google.adk.agents import Agent from google.adk.agents.callback_context import CallbackContext -from google.adk.models import LlmRequest -from google.adk.models import LlmResponse +from google.adk.agents.llm_agent import Agent +from google.adk.models.llm_request import LlmRequest +from google.adk.models.llm_response import LlmResponse from google.adk.plugins.base_plugin import BasePlugin from google.genai import types import pytest diff --git a/tests/unittests/flows/llm_flows/test_plugin_tool_callbacks.py b/tests/unittests/flows/llm_flows/test_plugin_tool_callbacks.py index a79e562a..97aca48d 100644 --- a/tests/unittests/flows/llm_flows/test_plugin_tool_callbacks.py +++ b/tests/unittests/flows/llm_flows/test_plugin_tool_callbacks.py @@ -16,7 +16,7 @@ from typing import Any from typing import Dict from typing import Optional -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.events.event import Event from google.adk.flows.llm_flows.functions import handle_function_calls_async from google.adk.plugins.base_plugin import BasePlugin diff --git a/tests/unittests/flows/llm_flows/test_tool_callbacks.py b/tests/unittests/flows/llm_flows/test_tool_callbacks.py index 1f26b18e..59845b61 100644 --- a/tests/unittests/flows/llm_flows/test_tool_callbacks.py +++ b/tests/unittests/flows/llm_flows/test_tool_callbacks.py @@ -14,9 +14,9 @@ from typing import Any -from google.adk.agents import Agent -from google.adk.tools import BaseTool -from google.adk.tools import ToolContext +from google.adk.agents.llm_agent import Agent +from google.adk.tools.base_tool import BaseTool +from google.adk.tools.tool_context import ToolContext from google.genai import types from google.genai.types import Part from pydantic import BaseModel diff --git a/tests/unittests/flows/llm_flows/test_tool_telemetry.py b/tests/unittests/flows/llm_flows/test_tool_telemetry.py index b599566a..c8a156b4 100644 --- a/tests/unittests/flows/llm_flows/test_tool_telemetry.py +++ b/tests/unittests/flows/llm_flows/test_tool_telemetry.py @@ -18,7 +18,7 @@ from typing import Optional from unittest import mock from google.adk import telemetry -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.events.event import Event from google.adk.flows.llm_flows.functions import handle_function_calls_async from google.adk.tools.function_tool import FunctionTool diff --git a/tests/unittests/memory/test_in_memory_memory_service.py b/tests/unittests/memory/test_in_memory_memory_service.py index b18d2774..4a495d7f 100644 --- a/tests/unittests/memory/test_in_memory_memory_service.py +++ b/tests/unittests/memory/test_in_memory_memory_service.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.memory.in_memory_memory_service import InMemoryMemoryService -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types import pytest diff --git a/tests/unittests/memory/test_vertex_ai_memory_bank_service.py b/tests/unittests/memory/test_vertex_ai_memory_bank_service.py index 2fbf3291..4d745978 100644 --- a/tests/unittests/memory/test_vertex_ai_memory_bank_service.py +++ b/tests/unittests/memory/test_vertex_ai_memory_bank_service.py @@ -16,9 +16,9 @@ import re from typing import Any from unittest import mock -from google.adk.events import Event +from google.adk.events.event import Event from google.adk.memory.vertex_ai_memory_bank_service import VertexAiMemoryBankService -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.genai import types import pytest diff --git a/tests/unittests/sessions/test_session_service.py b/tests/unittests/sessions/test_session_service.py index 67f0351a..a0e33b5e 100644 --- a/tests/unittests/sessions/test_session_service.py +++ b/tests/unittests/sessions/test_session_service.py @@ -16,11 +16,11 @@ from datetime import datetime from datetime import timezone import enum -from google.adk.events import Event -from google.adk.events import EventActions -from google.adk.sessions import DatabaseSessionService -from google.adk.sessions import InMemorySessionService +from google.adk.events.event import Event +from google.adk.events.event_actions import EventActions from google.adk.sessions.base_session_service import GetSessionConfig +from google.adk.sessions.database_session_service import DatabaseSessionService +from google.adk.sessions.in_memory_session_service import InMemorySessionService from google.genai import types import pytest diff --git a/tests/unittests/sessions/test_vertex_ai_session_service.py b/tests/unittests/sessions/test_vertex_ai_session_service.py index 37b8fdc0..9601c93f 100644 --- a/tests/unittests/sessions/test_vertex_ai_session_service.py +++ b/tests/unittests/sessions/test_vertex_ai_session_service.py @@ -21,10 +21,10 @@ from typing import Tuple from unittest import mock from dateutil.parser import isoparse -from google.adk.events import Event -from google.adk.events import EventActions -from google.adk.sessions import Session -from google.adk.sessions import VertexAiSessionService +from google.adk.events.event import Event +from google.adk.events.event_actions import EventActions +from google.adk.sessions.session import Session +from google.adk.sessions.vertex_ai_session_service import VertexAiSessionService from google.genai import types import pytest diff --git a/tests/unittests/streaming/test_streaming.py b/tests/unittests/streaming/test_streaming.py index 8e455033..dd0e6d5c 100644 --- a/tests/unittests/streaming/test_streaming.py +++ b/tests/unittests/streaming/test_streaming.py @@ -15,9 +15,9 @@ import asyncio from typing import AsyncGenerator -from google.adk.agents import Agent -from google.adk.agents import LiveRequestQueue -from google.adk.models import LlmResponse +from google.adk.agents.live_request_queue import LiveRequestQueue +from google.adk.agents.llm_agent import Agent +from google.adk.models.llm_response import LlmResponse from google.genai import types import pytest diff --git a/tests/unittests/test_telemetry.py b/tests/unittests/test_telemetry.py index debdc802..cf115d5f 100644 --- a/tests/unittests/test_telemetry.py +++ b/tests/unittests/test_telemetry.py @@ -22,7 +22,7 @@ from google.adk.agents.invocation_context import InvocationContext from google.adk.agents.llm_agent import LlmAgent from google.adk.models.llm_request import LlmRequest from google.adk.models.llm_response import LlmResponse -from google.adk.sessions import InMemorySessionService +from google.adk.sessions.in_memory_session_service import InMemorySessionService from google.adk.telemetry import trace_call_llm from google.adk.telemetry import trace_merged_tool_calls from google.adk.telemetry import trace_tool_call diff --git a/tests/unittests/testing_utils.py b/tests/unittests/testing_utils.py index 810a6c44..4a0a5b70 100644 --- a/tests/unittests/testing_utils.py +++ b/tests/unittests/testing_utils.py @@ -23,7 +23,7 @@ from google.adk.agents.live_request_queue import LiveRequestQueue from google.adk.agents.llm_agent import Agent from google.adk.agents.llm_agent import LlmAgent from google.adk.agents.run_config import RunConfig -from google.adk.artifacts import InMemoryArtifactService +from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.events.event import Event from google.adk.memory.in_memory_memory_service import InMemoryMemoryService from google.adk.models.base_llm import BaseLlm diff --git a/tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py b/tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py index eb1c8b18..54279351 100644 --- a/tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py +++ b/tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py @@ -18,15 +18,15 @@ from unittest import mock from fastapi.openapi.models import Operation from google.adk.agents.readonly_context import ReadonlyContext -from google.adk.auth import AuthCredentialTypes -from google.adk.auth import OAuth2Auth from google.adk.auth.auth_credential import AuthCredential +from google.adk.auth.auth_credential import AuthCredentialTypes +from google.adk.auth.auth_credential import OAuth2Auth from google.adk.tools.application_integration_tool.application_integration_toolset import ApplicationIntegrationToolset from google.adk.tools.application_integration_tool.integration_connector_tool import IntegrationConnectorTool from google.adk.tools.openapi_tool.auth.auth_helpers import dict_to_auth_scheme -from google.adk.tools.openapi_tool.openapi_spec_parser import ParsedOperation from google.adk.tools.openapi_tool.openapi_spec_parser import rest_api_tool from google.adk.tools.openapi_tool.openapi_spec_parser.openapi_spec_parser import OperationEndpoint +from google.adk.tools.openapi_tool.openapi_spec_parser.openapi_spec_parser import ParsedOperation import pytest diff --git a/tests/unittests/tools/application_integration_tool/test_integration_connector_tool.py b/tests/unittests/tools/application_integration_tool/test_integration_connector_tool.py index c9b542e5..f70af060 100644 --- a/tests/unittests/tools/application_integration_tool/test_integration_connector_tool.py +++ b/tests/unittests/tools/application_integration_tool/test_integration_connector_tool.py @@ -14,8 +14,8 @@ from unittest import mock -from google.adk.auth import AuthCredential -from google.adk.auth import AuthCredentialTypes +from google.adk.auth.auth_credential import AuthCredential +from google.adk.auth.auth_credential import AuthCredentialTypes from google.adk.auth.auth_credential import HttpAuth from google.adk.auth.auth_credential import HttpCredentials from google.adk.tools.application_integration_tool.integration_connector_tool import IntegrationConnectorTool diff --git a/tests/unittests/tools/bigquery/test_bigquery_credentials_manager.py b/tests/unittests/tools/bigquery/test_bigquery_credentials_manager.py index 47d95590..73ffa3bd 100644 --- a/tests/unittests/tools/bigquery/test_bigquery_credentials_manager.py +++ b/tests/unittests/tools/bigquery/test_bigquery_credentials_manager.py @@ -17,11 +17,11 @@ import json from unittest.mock import Mock from unittest.mock import patch -from google.adk.auth import AuthConfig -from google.adk.tools import ToolContext +from google.adk.auth.auth_tool import AuthConfig from google.adk.tools.bigquery.bigquery_credentials import BIGQUERY_TOKEN_CACHE_KEY from google.adk.tools.bigquery.bigquery_credentials import BigQueryCredentialsConfig from google.adk.tools.bigquery.bigquery_credentials import BigQueryCredentialsManager +from google.adk.tools.tool_context import ToolContext from google.auth.credentials import Credentials as AuthCredentials from google.auth.exceptions import RefreshError # Mock the Google OAuth and API dependencies diff --git a/tests/unittests/tools/bigquery/test_bigquery_query_tool.py b/tests/unittests/tools/bigquery/test_bigquery_query_tool.py index 18173399..f0e673da 100644 --- a/tests/unittests/tools/bigquery/test_bigquery_query_tool.py +++ b/tests/unittests/tools/bigquery/test_bigquery_query_tool.py @@ -23,7 +23,7 @@ from unittest import mock import dateutil import dateutil.relativedelta -from google.adk.tools import BaseTool +from google.adk.tools.base_tool import BaseTool from google.adk.tools.bigquery import BigQueryCredentialsConfig from google.adk.tools.bigquery import BigQueryToolset from google.adk.tools.bigquery.config import BigQueryToolConfig diff --git a/tests/unittests/tools/bigquery/test_bigquery_tool.py b/tests/unittests/tools/bigquery/test_bigquery_tool.py index b4ea75b1..6a715f9d 100644 --- a/tests/unittests/tools/bigquery/test_bigquery_tool.py +++ b/tests/unittests/tools/bigquery/test_bigquery_tool.py @@ -16,10 +16,10 @@ from unittest.mock import Mock from unittest.mock import patch -from google.adk.tools import ToolContext from google.adk.tools.bigquery.bigquery_credentials import BigQueryCredentialsConfig from google.adk.tools.bigquery.bigquery_credentials import BigQueryCredentialsManager from google.adk.tools.bigquery.bigquery_tool import BigQueryTool +from google.adk.tools.tool_context import ToolContext # Mock the Google OAuth and API dependencies from google.oauth2.credentials import Credentials import pytest diff --git a/tests/unittests/tools/google_api_tool/test_google_api_toolset.py b/tests/unittests/tools/google_api_tool/test_google_api_toolset.py index 4f5ca1f2..a343327c 100644 --- a/tests/unittests/tools/google_api_tool/test_google_api_toolset.py +++ b/tests/unittests/tools/google_api_tool/test_google_api_toolset.py @@ -15,16 +15,16 @@ from typing import Optional from unittest import mock from google.adk.agents.readonly_context import ReadonlyContext -from google.adk.auth import OpenIdConnectWithConfig from google.adk.auth.auth_credential import ServiceAccount from google.adk.auth.auth_credential import ServiceAccountCredential -from google.adk.tools import BaseTool +from google.adk.auth.auth_schemes import OpenIdConnectWithConfig +from google.adk.tools.base_tool import BaseTool from google.adk.tools.base_toolset import ToolPredicate from google.adk.tools.google_api_tool.google_api_tool import GoogleApiTool from google.adk.tools.google_api_tool.google_api_toolset import GoogleApiToolset from google.adk.tools.google_api_tool.googleapi_to_openapi_converter import GoogleApiToOpenApiConverter -from google.adk.tools.openapi_tool import OpenAPIToolset -from google.adk.tools.openapi_tool import RestApiTool +from google.adk.tools.openapi_tool.openapi_spec_parser.openapi_toolset import OpenAPIToolset +from google.adk.tools.openapi_tool.openapi_spec_parser.rest_api_tool import RestApiTool import pytest TEST_API_NAME = "calendar" diff --git a/tests/unittests/tools/retrieval/test_vertex_ai_rag_retrieval.py b/tests/unittests/tools/retrieval/test_vertex_ai_rag_retrieval.py index b55cfe13..132e6b7b 100644 --- a/tests/unittests/tools/retrieval/test_vertex_ai_rag_retrieval.py +++ b/tests/unittests/tools/retrieval/test_vertex_ai_rag_retrieval.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent +from google.adk.agents.llm_agent import Agent from google.adk.tools.function_tool import FunctionTool from google.adk.tools.retrieval.vertex_ai_rag_retrieval import VertexAiRagRetrieval from google.genai import types diff --git a/tests/unittests/tools/test_agent_tool.py b/tests/unittests/tools/test_agent_tool.py index 8e2035ee..d181f72f 100644 --- a/tests/unittests/tools/test_agent_tool.py +++ b/tests/unittests/tools/test_agent_tool.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.adk.agents import Agent -from google.adk.agents import SequentialAgent from google.adk.agents.callback_context import CallbackContext +from google.adk.agents.llm_agent import Agent +from google.adk.agents.sequential_agent import SequentialAgent from google.adk.tools.agent_tool import AgentTool from google.adk.utils.variant_utils import GoogleLLMVariant from google.genai import types diff --git a/tests/unittests/tools/test_build_function_declaration.py b/tests/unittests/tools/test_build_function_declaration.py index e0e29ee4..444fbd99 100644 --- a/tests/unittests/tools/test_build_function_declaration.py +++ b/tests/unittests/tools/test_build_function_declaration.py @@ -16,7 +16,7 @@ from typing import Dict from typing import List from google.adk.tools import _automatic_function_calling_util -from google.adk.tools.agent_tool import ToolContext +from google.adk.tools.tool_context import ToolContext from google.adk.utils.variant_utils import GoogleLLMVariant from google.genai import types # TODO: crewai requires python 3.10 as minimum diff --git a/tests/unittests/utils/test_instructions_utils.py b/tests/unittests/utils/test_instructions_utils.py index 35e5195d..532d6fca 100644 --- a/tests/unittests/utils/test_instructions_utils.py +++ b/tests/unittests/utils/test_instructions_utils.py @@ -1,7 +1,7 @@ -from google.adk.agents import Agent from google.adk.agents.invocation_context import InvocationContext +from google.adk.agents.llm_agent import Agent from google.adk.agents.readonly_context import ReadonlyContext -from google.adk.sessions import Session +from google.adk.sessions.session import Session from google.adk.utils import instructions_utils import pytest