Leave it out

One with, one without

An agent that is not given the folder does not have the skill.

The first line is ferry. The second line is No skill.

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"
)
with_skill = Agent(instructions="Follow the skill.", skills=[str(folder)])
print(with_skill.skill_manager.get_skill("ferry").properties.name)
plain = Agent(instructions="You are a helper.")
print("No skill" if plain.skill_manager is None else "Loaded")

Try it Yourself

Example explained

  • with_skill — The folder is passed in skills.
  • plain — No folder, so there is no skill.

Plain agent on price

Without skills=, the agent should not know the ferry price from SKILL.md.

Example

from praisonai import Agent

plain = Agent(instructions="Answer from general knowledge only.")
print(plain.start("What is the ferry price in the skill file?"))

Try it Yourself

Example explained

  • from praisonai import Agent — Imports Agent needed for plain agent on price.
  • Agent(…) — Instantiates the Agent configured for plain agent on price.
  • .start(…) — Executes the configured run for plain agent on price and returns the result.

Reference: documentation