from crewai_tools import SerperDevTool, ScrapeWebsiteToolagent = Agent( role="Web Researcher", goal="Find information about a topic", backstory="Skilled at finding information online", tools=[SerperDevTool(), ScrapeWebsiteTool()], # Can search and scrape # No skills needed — general research doesn't need special guidelines)
agent = Agent( role="Customer Support Agent", goal="Respond to customer inquiries professionally", backstory="Experienced support representative", skills=["./skills/support-playbook"], # Response templates and escalation rules apps=["gmail", "zendesk"], # Can send emails and update tickets)
from crewai import Crewcrew = Crew( agents=[researcher, writer, reviewer], tasks=[research_task, write_task, review_task], skills=["./skills"], # All agents get these skills)
---name: my-skilldescription: Short description of what this skill does and when to use it.license: Apache-2.0 # optionalcompatibility: crewai>=0.1.0 # optionalmetadata: # optional author: your-name version: "1.0"allowed-tools: web-search file-read # optional, experimental---Instructions for the agent go here. This markdown body is injectedinto the agent's prompt when the skill is activated.
from pathlib import Pathfrom crewai.skills import discover_skills, activate_skill# Discover all skills in a directoryskills = discover_skills(Path("./skills"))# Activate them (loads full SKILL.md body)activated = [activate_skill(s) for s in skills]# Pass to an agentagent = Agent( role="Researcher", goal="Find relevant information", backstory="An expert researcher.", skills=activated,)