See also — Parent: docs/README.md, manifest.md (the root document that references everything else described here) · Sibling concepts: packaging.md (how this layout zips into
.awp.zip), agent.md (agent-folder shape), tools.md (custom tool locations) · Runtime consumers: runtime.md, observability.md (where logs, traces, and run summaries land) · Spec: spec/versions/1.0/file-structure.md
An AWP workflow is a directory, not a single file. The directory is the unit of portability: it can be zipped into a .awp.zip, published to ClawHub, mounted into a container, or executed in place by awp run .. Everything the runtime needs to start the workflow lives inside it; everything the runtime produces (memory, run history, output artifacts) is written into well-known subdirectories so it can be inspected, replayed, or excluded from packaging.
The layout follows three rules:
- Manifest at the root.
workflow.awp.yamlis the entry point. Without it, the runtime refuses to load the directory. - One folder per agent. Each agent lives in
agents/{agent_id}/with its ownagent.awp.yaml, implementation file, and optionalworkflow/subtree for prompts, schemas, preprocessors and skills. The folder name must matchidentity.id(validation rule R8). - Runtime artifacts are write-only and excluded from packaging.
workspace/(memory),runs/(per-experiment execution traces, including nested A4 sub-run trees underruns/<run_id>/iterations/NNN/delegations/<worker>/runs/<sub_run_id>/),data/state/anddata/output/are generated by the runtime and listed in the package exclusion rules.
This document defines the required and optional directory layout for an AWP workflow.
{workflow-name}/
├── workflow.awp.yaml # REQUIRED -- Workflow manifest
├── agents/ # REQUIRED -- Agent definitions
│ └── {agent_id}/ # REQUIRED -- One directory per agent
│ ├── agent.awp.yaml # REQUIRED -- Agent configuration
│ ├── agent.py # REQUIRED (Python ref impl) -- Agent class
│ └── workflow/ # OPTIONAL -- Workflow artifacts
│ ├── instructions/ # OPTIONAL -- System prompt files
│ │ └── SYSTEM_PROMPT.md # OPTIONAL -- Primary system prompt
│ ├── prompt/ # OPTIONAL -- Additional prompt fragments
│ │ └── 00_INTRO.md # OPTIONAL -- Prompt introduction
│ ├── output_schema/ # OPTIONAL -- Output JSON Schemas
│ │ └── output_schema.json # OPTIONAL -- Primary output schema
│ ├── output_schema_desc/ # OPTIONAL -- Schema descriptions
│ │ └── output_schema_desc.json # OPTIONAL -- Field descriptions
│ ├── preprocessor/ # OPTIONAL -- Data preprocessing
│ │ └── preprocessor.py # OPTIONAL -- Preprocessor class
│ └── skills/ # OPTIONAL -- Agent-specific skills
│ └── add_skills.md # OPTIONAL -- Skill references
├── mcp/ # OPTIONAL -- Custom MCP tools
│ └── custom_tools.py # OPTIONAL -- Tool definitions
├── skills/ # OPTIONAL -- Project-level skills
│ └── domain_knowledge/ # OPTIONAL -- Skill directories
│ └── SKILL.md # OPTIONAL -- Skill content
├── workspace/ # OPTIONAL -- Memory (created at runtime)
│ ├── MEMORY.md # OPTIONAL -- Long-term memory
│ └── memory/ # OPTIONAL -- Daily logs
│ └── YYYY-MM-DD.md # OPTIONAL -- Daily log files
└── data/ # OPTIONAL -- Input/output/state data
├── input/ # OPTIONAL -- Input data files
├── output/ # OPTIONAL -- Output data files
└── state/ # OPTIONAL -- Persisted state files
- Required
- Location: Root of the workflow directory.
- Description: The workflow manifest. The runtime must reject a workflow directory that does not contain this file.
- Required
- Location: Root of the workflow directory.
- Description: Contains one subdirectory per agent declared in the orchestration graph.
- Required for each agent in the graph.
- Naming: The directory name must match the
identity.idfield in the agent'sagent.awp.yaml. See R8.
- Required
- Description: The agent configuration file.
- Required for the Python reference implementation.
- Description: Python module containing the agent class. Non-Python runtimes may use an alternative file.
- Note: The
runtime.class_namefield inagent.awp.yamlspecifies which class to import.
Workflow artifacts directory. Name is configurable via runtime.strategy_folder (default: "workflow").
System prompt files. Primary file should be named SYSTEM_PROMPT.md. Loaded when prompt.system references a file path.
Additional prompt fragments. Files are loaded in alphabetical order. Convention: prefix with numbers for explicit ordering (e.g., 00_INTRO.md, 01_CONTEXT.md).
JSON Schema files for output validation:
output_schema.json-- Primary output contract schema.tool_call.json-- Schema for tool call output format (if applicable).
Human-readable descriptions for output schema fields. Used for LLM prompt construction:
output_schema_desc.json-- Field descriptions for the output schema.tool_call_desc.json-- Field descriptions for tool call format.
Data preprocessing modules:
preprocessor.py-- Preprocessor class.
Agent-specific skill files loaded only for this agent:
add_skills.md-- References to global skills.- Any
.mdor.skillfiles -- Inline skill content.
Custom MCP tool definitions. See Tools Reference. When capabilities.custom_tools.auto_discovery is true, the runtime scans this directory for @app.tool() decorated functions.
Project-level skills shared across all agents in the workflow. Loaded after foundation skills and before agent-specific skills. See Tools Reference.
Memory storage directory. Created by the runtime when memory is enabled. See Memory Reference.
MEMORY.md-- Long-term memory (Tier 1).memory/-- Daily log directory (Tier 2), containingYYYY-MM-DD.mdfiles.
Data directory for input files, output files, and persisted state:
input/-- Input data files for the workflow.output/-- Output artifacts produced by the workflow.state/-- Persisted state files (whenstate.persistence.enabledistrue).
| Convention | Applies To | Example |
|---|---|---|
| kebab-case | Workflow directory name | research-and-write/ |
| snake_case | Agent directory name | research_analyst/ |
| UPPER_CASE.md | Memory and prompt files | MEMORY.md, SYSTEM_PROMPT.md |
| snake_case.py | Python modules | agent.py, preprocessor.py |
| snake_case.json | Schema files | output_schema.json |
| snake_case.yaml | Configuration files | workflow.awp.yaml, agent.awp.yaml |
| NN_name.md | Ordered prompt fragments | 00_INTRO.md, 01_CONTEXT.md |
| YYYY-MM-DD.md | Daily log files | 2026-03-23.md |
All file paths in AWP configuration files are relative to the appropriate base directory:
prompt.system: "workflow/instructions/SYSTEM_PROMPT.md"resolves relative to the agent directory.output.contract: "workflow/output_schema/output_schema.json"resolves relative to the agent directory.state.persistence.path: "data/state"resolves relative to the workflow root.
The runtime must resolve paths consistently and report an error if a referenced file does not exist.
These files and directories should not be included in workflow packages or version control:
| Pattern | Reason |
|---|---|
workspace/ |
Runtime-generated memory data. |
runs/ |
Runtime execution data. |
__pycache__/ |
Python bytecode cache. |
.git/ |
Version control metadata. |
*.pyc |
Compiled Python files. |
.env |
Environment variables (may contain secrets). |
logs/ |
Runtime log files. |
data/state/ |
Persisted state (runtime-specific). |
data/output/ |
Output artifacts (generated at runtime). |
.DS_Store |
macOS filesystem metadata. |
node_modules/ |
Node.js dependencies. |
See Packaging Reference for details on packaging exclusions.