Skip to main content

Skill

The Skill class provides read-only access to the skill registry — listing, retrieving, and inspecting the operational playbooks that guide agent behavior.

Listing skills

import agentflow as af

# All discovered skills
skills = await af.Skill.list()
for skill in skills:
    print(f"{skill.name}: {skill.description[:80]}...")

# Skills for a specific agent
agent_skills = await af.Skill.list_for_agent(agent.id)

Retrieving a skill

# Get a skill with its full playbook body
skill = await af.Skill.get("meetings-agent-playbook")

print(skill.name)         # "meetings-agent-playbook"
print(skill.description)  # "Use this skill for customer meeting support..."
print(skill.agents)       # ["MeetingsAgent"]
print(skill.body[:200])   # First 200 chars of the playbook

Loading content

# Get the main playbook content
content = await skill.get_content()

# Get a support file within the skill
shapes = await skill.get_content(file_path="references/warehouse-response-shapes.md")

Properties

PropertyTypeDescription
namestrUnique skill identifier
descriptionstrWhen to activate this skill
agentslist[str]Agent names this skill applies to
body`strNone`Full playbook markdown (populated when fetched via get)
infoSkillInfoFull metadata dataclass