aget_skills(Load toolbox skills as a deepagents-ready file mapping.
This is an opinionated convenience built on top of
:meth:aget_resources. It fetches the toolbox skills (MCP resources
with skill:// URIs) and returns a mapping of virtual file paths to
deepagents FileData objects, laid out under base_path in the
directory structure that create_deep_agent expects::
{f"{base_path}{skill_name}/SKILL.md": <FileData>, ...}
How the files reach the agent depends on the backend:
backend as None and pass the
returned mapping as the files payload on invoke. State writes
go through the LangGraph runtime, so the backend cannot be seeded
standalone.backend. The skills are written into it via
aupload_files and the same mapping is also returned.Seeding a StateBackend (default)::
from deepagents import create_deep_agent
from deepagents.backends import StateBackend
from langchain_azure_ai.tools import AzureAIProjectToolbox
toolbox = AzureAIProjectToolbox(toolbox_name="my-tools")
skill_files = await toolbox.aget_skills()
agent = create_deep_agent(
model="azure_ai:gpt-5.2",
backend=StateBackend(),
skills=[base_path],
)
await agent.ainvoke(
{"messages": [...], "files": skill_files}
)
Seeding any other backend (e.g. FilesystemBackend)::
from deepagents.backends import FilesystemBackend
backend = FilesystemBackend(root_dir="./my-project")
toolbox = AzureAIProjectToolbox(toolbox_name="my-tools")
await toolbox.aget_skills(backend=backend)
agent = create_deep_agent(
model="azure_ai:gpt-5.2",
backend=backend,
skills=["/skills/"],
)
Virtual directory under which skill files are placed.
Must start and end with "/". Defaults to "/skills/".
Pass the same value (or a list containing it) as the skills
argument to create_deep_agent.
Optional deepagents backend to write the skills into via
aupload_files. Intended for backends with standalone storage
(FilesystemBackend, StoreBackend, sandbox backends).
When None (default), files are only returned, for use with
StateBackend seeding via invoke(files=...).