Format
Every agent is a directory containing anAGENT.md file with YAML frontmatter and a markdown body:
Required Fields
| Field | Description |
|---|---|
name | Agent slug (unique identifier) |
description | One-line summary |
Optional Fields
| Field | Description |
|---|---|
metadata.version | Semver version string |
metadata.strawpot.bin | Compiled agent binary, keyed by OS |
metadata.strawpot.tools | System tool requirements with OS-specific install commands |
metadata.strawpot.params | Custom parameters for the agent binary |
metadata.strawpot.env | Required environment variables |
Wrapper Binary
The agent binary is a compiled executable placed in the agent directory, keyed by OS:<agent-directory>/<binary-name> for the current OS.
Wrapper Protocol
Every wrapper must implement two subcommands:setup and build.
setup
Interactive one-time setup (auth, configuration). Runs with stdin/stdout attached to the terminal.
build
Translate StrawPot protocol args into the agent’s native CLI command. Returns JSON to stdout.
Protocol Arguments
| Argument | Description |
|---|---|
--agent-id | Unique ID for this agent instance |
--working-dir | Project working directory |
--agent-workspace-dir | Agent-specific workspace (for prompt files, staged skills/roles) |
--role-prompt | Assembled role prompt text |
--memory-prompt | Memory context from memory providers |
--task | Task description (non-interactive mode) |
--skills-dir | Directory containing staged skill subdirectories |
--roles-dir | Directory containing staged role subdirectories (may appear multiple times) |
--config | JSON string with merged parameter values |
JSON Output
Thebuild command must print a JSON object to stdout:
| Field | Required | Description |
|---|---|---|
cmd | Yes | Command array to execute |
cwd | No | Working directory (defaults to --working-dir) |
Popen and manages the process lifecycle (PID tracking, wait, kill).
Parameters
Agents can declare custom parameters for the agent binary. These are CLI-specific settings (e.g. model, flags) that the wrapper uses when building the native command. Users override defaults via[agents.<name>] in their config:
AGENT.md are merged with user config — user values take precedence. The merged result is passed to build as the --config JSON string. The wrapper reads these values to construct the appropriate CLI flags.
System Tools
Agents can declare system tool requirements. During startup, StrawPot checks if each tool is available on PATH and shows install instructions if missing.macos, linux, windows. Only the current OS command is shown.
Environment Variables
Agents can declare required environment variables. At session start, missing required variables are prompted interactively.Agent Discovery
Agents are resolved in this order:- Project-local —
.strawpot/agents/<name>/AGENT.md - Global —
~/.strawpot/agents/<name>/AGENT.md - Built-in — Ships with StrawPot (e.g.
claude_code)
Example: Minimal Wrapper in Python
A minimal wrapper that translates StrawPot protocol args to a hypotheticalmy-ai CLI:
AGENT.md:
Skills vs Roles vs Agents
| Skills | Roles | Agents | |
|---|---|---|---|
| Purpose | Reusable instructions | Agent behavior definition | CLI wrapper for an AI tool |
| File | SKILL.md | ROLE.md | AGENT.md |
| Can depend on | Other skills | Skills and roles | System tools |
| Default agent | No | Yes | N/A (is the agent) |
| Env vars | Yes | No | Yes |
| Params | No | No | Yes |
| Namespace | Separate | Separate | Separate |