Appearance
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.
type | What it adds |
|---|---|
AgentSkills | Skill files the agent can activate |
AgentsMdPlugin | AGENTS.md project context in the system prompt |
LLMSteeringHandler | Guidance on tool calls and model replies |
SandboxPlugin | Workspace 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 asplugins: ["${skills}"]. Unquotedplugins: [${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
typeor 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: truepython
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.
| Key | Required | Meaning |
|---|---|---|
skills | yes | A path, an https:// URL, or a list of those |
strict | true 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_key | Agent state key. Default agent_skills | |
max_resource_files | How 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.mdA 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: 2When both path and start_path are omitted, discovery starts at the YAML file’s directory.
| Key | Meaning |
|---|---|
path | One AGENTS.md file. Hierarchy keys are ignored |
start_path | Directory where the upward walk starts |
root | Upper boundary of the walk. An ancestor of start_path |
merge_hierarchy | true (default) merges ancestors from root to leaf. false keeps the nearest file |
max_files | How many files to keep. Nearest files win. null means no limit. Default 3. Used when merge_hierarchy is true and path is unset |
on_exceed | warn (default) trims extra root-side files. error raises |
state_key | Agent 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}| Key | Required | Meaning |
|---|---|---|
system_prompt | yes | Instructions for the steering model. A non-empty string |
model | A model block. Same forms as an Agent model. Omit it to use the default model | |
context_providers | What 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: LedgerProviderAn 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
| Problem | What to do |
|---|---|
| Two plugins of the same type | Merge them into one entry. Skill paths go in one skills: list |
type: GuardrailsPlugin | Set guardrails: on the Agent block |
Unknown type | Use AgentSkills, AgentsMdPlugin, LLMSteeringHandler, or SandboxPlugin |
plugins: on a Graph or Workflow | Move the list onto each Agent block |
plugins: [${skills}] parse error | Quote it, plugins: ["${skills}"], or use a block list |
strict: true and a missing skill path | Fix the path, or set strict: false to warn and skip |
Skill URL uses http:// | Use https://, or a filesystem path |
Blank system_prompt on steering | Write a non-empty prompt |
| Unknown context provider | Use type: LedgerProvider, or context_providers: [] |
on_exceed: drop | Use warn or error |