airflow.providers.common.ai.skills¶
Framework-agnostic Agent Skills sources for Airflow.
This module resolves skill sources – a local directory or a GitSkills
descriptor – into local SKILL.md directories, cloning Git repositories with
a token taken from an Airflow connection. The output is a list of directory
paths, the interchange format every Agent Skills implementation consumes
(pydantic-ai-skills, LangChain DeepAgents, Strands), so the same Airflow
credential handling works across frameworks.
For pydantic-ai use the AgentSkillsToolset
binding. For other frameworks, resolve the directories yourself:
from airflow.providers.common.ai.skills import GitSkills, resolve_skills
with resolve_skills(["./skills", GitSkills(repo_url="https://...", conn_id="github")]) as dirs:
# LangChain DeepAgents
agent = create_deep_agent(model=..., skills=dirs)
# ...or Strands
agent = Agent(plugins=[AgentSkills(skills=dirs)])
Resolution (connection lookup, clone) happens when resolve_skills is entered,
so run it inside the task, not at module import / DAG-parse time. The context
manager removes any cloned directories on exit.
Attributes¶
Classes¶
Agent Skills cloned from a Git repository when resolved. |
Functions¶
|
Resolve skill sources to local |
Module Contents¶
- class airflow.providers.common.ai.skills.GitSkills[source]¶
Agent Skills cloned from a Git repository when resolved.
- Parameters:
repo_url – HTTPS or SSH URL of the repository to clone.
conn_id – Airflow
gitconnection used for credentials, resolved through the Git provider’sGitHook(HTTPS token in the connection password, or an SSH key in the connection’s extra). Set this for private repositories. Plainhttp://is rejected whenconn_idis set so a credential is never sent in cleartext, and arepo_urlwith embedded credentials is rejected (useconn_idinstead). Whenconn_idisNonethe clone is unauthenticated; as with anygit clone, the worker’s own git configuration (credential helpers, SSH agent) may still apply, so run workers without ambient git credentials if you need strict isolation.path – Sub-path inside the repository that holds the skill directories (e.g.
"skills"). Defaults to the repository root.branch – Branch, tag, or ref to check out. Defaults to the repository’s default branch.
Warning
Skill bundles can contain scripts an agent may run on the worker. Because the repository is fetched at run time, anyone who can modify it can introduce code that runs in your environment, outside DAG review. Point
repo_urlat a trusted repository and pinbranchto a trusted ref.
- airflow.providers.common.ai.skills.resolve_skills(sources)[source]¶
Resolve skill sources to local
SKILL.mddirectories.Yields a list of directory paths suitable for any Agent Skills loader (pydantic-ai-skills, LangChain DeepAgents
skills=, StrandsAgentSkills(skills=...)). Cloned repositories are removed on exit, so use the returned directories inside thewithblock.