Skip to content

Plugins ​

plugins: attaches built-in plugins to an Agent block. Each entry is an inline map or a ${block} reference. The plugin runs inside the agent loop. This page is the file shape. What each plugin does at runtime is on Plugins.

typeWhat it adds
AgentSkillsSkill files the agent can activate
AgentsMdPluginAGENTS.md project context in the system prompt
LLMSteeringHandlerGuidance on tool calls and model replies
SandboxPluginWorkspace tools. The workspace itself is on Sandbox

One agent can carry one of each type. A second AgentSkills, AgentsMdPlugin, LLMSteeringHandler, or SandboxPlugin is rejected. Content checks stay on guardrails:. A Graph or Workflow block does not take plugins:. Put them on the Agent blocks the graph lists.

Paths are relative to the YAML file.


Installation ​

bash
pip install --upgrade --extra-index-url https://elsai-agents.elsai.ai/root/ "elsai-agents==0.4.4"
pip install --upgrade --extra-index-url https://elsai-agents.elsai.ai/root/ "elsai-yaml==0.4.3"

AgentSkills with strict: true needs elsai-agents 0.4.2. With strict: false, a bad skill source is skipped.


YAML rules ​

  • plugins: is a list. Write a block list, or a quoted flow list such as plugins: ["${skills}"]. Unquoted plugins: [${skills}] is a YAML parse error.
  • ${block_name} inserts a whole plugin block. An inline map is the same fields without a name.
  • An unknown type or an unknown key is rejected when the agent is built.

AgentSkills ​

AgentSkills loads SKILL.md files. Names and descriptions go into the prompt. The full instructions load when the agent activates a skill. See AgentSkills.

yaml
openai:
  type: OpenAIModel
  model_id: "{{$OPENAI_MODEL:gpt-4o-mini}}"

analyst:
  type: Agent
  name: skills_analyst
  system_prompt: |
    When the user asks for a receipt, activate the pdf-processing skill
    before you answer, then follow that skill.
  model: ${openai}
  tools: []
  plugins:
    - type: AgentSkills
      skills:
        - ./skills/pdf-processing
      strict: true
python
from elsai.config import yaml_to_agent

agent = yaml_to_agent("agent.yaml", entry="analyst")
print(agent("Write the receipt for report.pdf"))

./skills/pdf-processing is a skill directory that contains SKILL.md. A parent directory of several skill folders is also valid. An https:// URL must point at raw SKILL.md text.

The plugin does not add file or shell tools. List those on tools: when a skill needs them.

KeyRequiredMeaning
skillsyesA path, an https:// URL, or a list of those
stricttrue raises on a missing path, an invalid skill file, a failed URL, or a source that is not a skill file. false (default) warns and skips that source
state_keyAgent state key. Default agent_skills
max_resource_filesHow many resource files an activation lists. Default 20. A positive integer

An empty directory is a valid catalog, including when strict is true.


AgentsMdPlugin ​

AgentsMdPlugin reads AGENTS.md files and injects them into the system prompt. See AgentsMdPlugin.

One file:

yaml
plugins:
  - type: AgentsMdPlugin
    path: ./project/AGENTS.md

A directory walk keeps the nearest files, from the start directory up to root:

yaml
plugins:
  - type: AgentsMdPlugin
    start_path: ./chain/svc/api
    root: ./chain
    max_files: 2

When both path and start_path are omitted, discovery starts at the YAML file’s directory.

KeyMeaning
pathOne AGENTS.md file. Hierarchy keys are ignored
start_pathDirectory where the upward walk starts
rootUpper boundary of the walk. An ancestor of start_path
merge_hierarchytrue (default) merges ancestors from root to leaf. false keeps the nearest file
max_filesHow many files to keep. Nearest files win. null means no limit. Default 3. Used when merge_hierarchy is true and path is unset
on_exceedwarn (default) trims extra root-side files. error raises
state_keyAgent state key. Default agents_md

A directory with no AGENTS.md is a valid empty context.


LLMSteeringHandler ​

LLMSteeringHandler reviews tool calls and model replies and can cancel a call with guidance. See LLMSteeringHandler.

yaml
openai:
  type: OpenAIModel
  model_id: "{{$OPENAI_MODEL:gpt-4o-mini}}"

email_steering:
  type: LLMSteeringHandler
  system_prompt: |
    Guide send_email toward send_notification.
    Proceed for every other tool, including send_notification.
  model: ${openai}
  context_providers: []

analyst:
  type: Agent
  name: steered_analyst
  system_prompt: |
    When a tool call is cancelled with guidance, follow that guidance.
  model: ${openai}
  tools:
    - ./tools/send_email.py
    - ./tools/send_notification.py
  plugins:
    - ${email_steering}
KeyRequiredMeaning
system_promptyesInstructions for the steering model. A non-empty string
modelA model block. Same forms as an Agent model. Omit it to use the default model
context_providersWhat history the steering model sees

Omit context_providers to use the built-in ledger (tool inputs, outputs, and whether the call succeeded). Set context_providers: [] to turn that off. The only provider this file accepts is type: LedgerProvider, and only once:

yaml
context_providers:
  - type: LedgerProvider

An interrupt pauses the agent. YAML does not answer it. Call the same agent again with interruptResponse content. true runs the pending tool. false cancels it.

python
paused = agent("Send the weekly email")
interrupt = paused.interrupts[0]
agent([{"interruptResponse": {"interruptId": interrupt.id, "response": True}}])

SandboxPlugin ​

The plugins entry is only type: SandboxPlugin. The workspace is sandbox_mode plus execution_backend, or a shared sandbox: block. Both are on Sandbox. A plugin without one of those, or a sandbox without the plugin, is rejected.


Common mistakes ​

ProblemWhat to do
Two plugins of the same typeMerge them into one entry. Skill paths go in one skills: list
type: GuardrailsPluginSet guardrails: on the Agent block
Unknown typeUse AgentSkills, AgentsMdPlugin, LLMSteeringHandler, or SandboxPlugin
plugins: on a Graph or WorkflowMove the list onto each Agent block
plugins: [${skills}] parse errorQuote it, plugins: ["${skills}"], or use a block list
strict: true and a missing skill pathFix the path, or set strict: false to warn and skip
Skill URL uses http://Use https://, or a filesystem path
Blank system_prompt on steeringWrite a non-empty prompt
Unknown context providerUse type: LedgerProvider, or context_providers: []
on_exceed: dropUse warn or error

Copyright © 2026 elsai foundry.