A folder of instructions

Write the file

SKILL.md is a short note with a name and a description. The agent is pointed at that folder.

The result prints the skill name, then the description. The instructions stay in the file until the next page loads them.

Example

from pathlib import Path
from praisonai import Agent

folder = Path("/tmp/ferry-skill")
folder.mkdir(exist_ok=True)
(folder / "SKILL.md").write_text(
    "---\nname: ferry\ndescription: Use when asked the ferry price.\n---\n\n"
    "The ferry costs four pounds. Reply with that price only.\n"
)
agent = Agent(instructions="Follow the skill.", skills=[str(folder)])
skill = agent.skill_manager.get_skill("ferry")
print(skill.properties.name)
print(skill.properties.description)

Try it Yourself

Example explained

  • SKILL.md — The file. The top lists the name and when to use it.
  • skills — The folder to load.

Reference: documentation