fix: Built-in agents (names starting with "__") now use in-memory session storage instead of creating .adk folders in the agents directory

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 845852695
This commit is contained in:
George Weale
2025-12-17 11:36:22 -08:00
committed by Copybara-Service
parent c6f389d4bc
commit e3bac1ab8c
2 changed files with 24 additions and 0 deletions
@@ -72,6 +72,18 @@ async def test_per_agent_session_service_respects_app_name_alias(
assert (tmp_path / folder_name / ".adk" / "session.db").exists()
@pytest.mark.asyncio
async def test_per_agent_session_service_routes_built_in_agents_to_root_dot_adk(
tmp_path: Path,
) -> None:
service = PerAgentDatabaseSessionService(agents_root=tmp_path)
await service.create_session(app_name="__helper", user_id="user")
assert not (tmp_path / "__helper").exists()
assert (tmp_path / ".adk" / "session.db").exists()
def test_create_local_database_session_service_returns_sqlite(
tmp_path: Path,
) -> None: