v0.4.0
Changed (breaking)
- All runtime read methods on
SkillSourceandSkillsRegistryare now coroutines. I/O-bound sources (databases, remote registries, object storage) can now perform real non-blocking I/O end-to-end, instead of forcing every consumer to wrap a synchronous source withasyncio.to_threadat the call site.SkillSource.list_metadata,load_skill,iter_names,has_skill,get_metadata,refresh,clear_cache,list_files, andread_fileare nowasync def.SkillsRegistry.list_metadata,load_skill,read_reference,list_files,read_file,validate_all,refresh,clear_cache,to_prompt_xml,to_prompt_text,get_skills_prompt,iter_names,has_skill, andget_metadataare nowasync def.SkillsAgent.get_tools,get_instruction, andbuildare nowasync def.- The
with_skills,create_skills_agent, andinject_skills_prompthelpers inadk_skills_agent.helpersare nowasync def. - The callables produced by
create_use_skill_toolandcreate_read_reference_toolare nowasync def. ADK already supports async tool callables, so no agent-side change is required.
create_use_skill_toolno longer takesinclude_skills_listing. Callers that want the available-skills listing in the tool description should pass the pre-rendered XML via the newavailable_skills_xmlargument:xml = await registry.to_prompt_xml(); create_use_skill_tool(registry, available_skills_xml=xml). This avoids duplicating the async listing step inside the tool factory.SkillsRegistry.__len__andSkillsRegistry.__contains__were removed because the underlying lookups are now async (__len__and__contains__cannot be coroutines). Replacelen(registry)withlen(await registry.list_metadata())andname in registrywithawait registry.has_skill(name).SkillSource.iter_namesnow returns alist[str](rather than yielding an iterator) so it can be implemented as a single coroutine.
Added
- Module-level
_format_metadata_xml/_format_metadata_texthelpers inadk_skills_agent.registryso prompt-shape utilities can be reused without re-running the metadata gather. pytest-asyncio>=0.23dev dependency, withasyncio_mode = "auto"inpyproject.tomlso async tests do not need explicit decorators.
Migration notes
with_skills(...),create_skills_agent(...), andSkillsAgent.build(...)are now coroutines. Wherever you build agents at module top-level, switch the call site toasyncio.run(create_skills_agent(...))(orawait ...from inside another async context).- ADK's
before_agent_callbackand tool callables already supportasync def, so wiring the new async tools into an ADK agent does not require any additional adapter — return them directly from your tool list. - Custom
SkillSourceimplementations must change their method signatures fromdeftoasync deffor the runtime methods listed above. Sources whose underlying I/O is synchronous (filesystem, in-memory, sqlite3) can wrap blocking calls withasyncio.to_thread(...); sources backed by asyncio-aware drivers (asyncpg,aiomysql,httpx.AsyncClient, …) can call into them directly.
Full Changelog: v0.3.0...v0.4.0