Skip to content

Commit 831e2e6

Browse files
google-genai-botcopybara-github
authored andcommitted
ADK changes
PiperOrigin-RevId: 801284664
1 parent dff733c commit 831e2e6

File tree

11 files changed

+36
-476
lines changed

11 files changed

+36
-476
lines changed

contributing/samples/hello_world_app/__init__.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

contributing/samples/hello_world_app/agent.py

Lines changed: 0 additions & 145 deletions
This file was deleted.

contributing/samples/hello_world_app/main.py

Lines changed: 0 additions & 103 deletions
This file was deleted.

src/google/adk/apps/__init__.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/google/adk/apps/app.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/google/adk/cli/adk_web_server.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@
5050
from watchdog.observers import Observer
5151

5252
from . import agent_graph
53-
from ..agents.base_agent import BaseAgent
5453
from ..agents.live_request_queue import LiveRequest
5554
from ..agents.live_request_queue import LiveRequestQueue
5655
from ..agents.run_config import RunConfig
5756
from ..agents.run_config import StreamingMode
58-
from ..apps.app import App
5957
from ..artifacts.base_artifact_service import BaseArtifactService
6058
from ..auth.credential_service.base_credential_service import BaseCredentialService
6159
from ..errors.not_found_error import NotFoundError
@@ -307,17 +305,10 @@ async def get_runner_async(self, app_name: str) -> Runner:
307305
envs.load_dotenv_for_agent(os.path.basename(app_name), self.agents_dir)
308306
if app_name in self.runner_dict:
309307
return self.runner_dict[app_name]
310-
agent_or_app = self.agent_loader.load_agent(app_name)
311-
agentic_app = None
312-
if isinstance(agent_or_app, BaseAgent):
313-
agentic_app = App(
314-
name=app_name,
315-
root_agent=agent_or_app,
316-
)
317-
else:
318-
agentic_app = agent_or_app
308+
root_agent = self.agent_loader.load_agent(app_name)
319309
runner = Runner(
320-
app=agentic_app,
310+
app_name=app_name,
311+
agent=root_agent,
321312
artifact_service=self.artifact_service,
322313
session_service=self.session_service,
323314
memory_service=self.memory_service,
@@ -606,10 +597,9 @@ async def add_session_to_eval_set(
606597
invocations = evals.convert_session_to_eval_invocations(session)
607598

608599
# Populate the session with initial session state.
609-
agent_or_app = self.agent_loader.load_agent(app_name)
610-
if isinstance(agent_or_app, App):
611-
agent_or_app = agent_or_app.root_agent
612-
initial_session_state = create_empty_state(agent_or_app)
600+
initial_session_state = create_empty_state(
601+
self.agent_loader.load_agent(app_name)
602+
)
613603

614604
new_eval_case = EvalCase(
615605
eval_id=req.eval_id,

0 commit comments

Comments
 (0)