Workflow Template ZIP Format
This chapter specifies the exact structure of a workflow template ZIP file — the portable interchange format for Agent Studio templates. SDK builders must validate that generated ZIPs conform to this structure.
ZIP Structure
workflow_template.zip
├── workflow_template.json # REQUIRED: manifest
└── studio-data/ # REQUIRED if tools or icons exist
├── tool_templates/ # Tool code packages
│ ├── {slug}_{random}/ # One directory per tool template
│ │ ├── tool.py # REQUIRED per tool
│ │ ├── requirements.txt # REQUIRED per tool
│ │ └── [additional files...] # Optional supporting files
│ └── ...
└── dynamic_assets/ # Icon images
├── tool_template_icons/
│ └── {slug}_{random}_icon.{png|jpg|jpeg}
├── agent_template_icons/
│ └── {uuid}_icon.{png|jpg|jpeg}
└── mcp_template_icons/
└── {slug}_{random}_icon.{png|jpg|jpeg}
Path Requirements
Root Manifest
The file workflow_template.json must be at the ZIP root (not inside a subdirectory).
studio-data/ Directory
The path studio-data/ is a hard-coded constant in Agent Studio. All file paths stored in the manifest JSON are relative to the ZIP root and rooted under studio-data/. During import, the entire studio-data/ subtree is copied into the project’s root studio-data/ directory.
Tool Template Directories
Each tool template directory must be located at:
studio-data/tool_templates/{directory_name}/
The directory_name follows the convention {slugified_name}_{random_string}:
slugified_name: tool name lowercased, spaces replaced with underscoresrandom_string: 6-character alphanumeric string for uniqueness
Examples: json_reader_abc123, my_api_tool_xk9f2m
The source_folder_path field in the tool template JSON must match the actual directory path within the ZIP.
Icon Files
Icon paths in the manifest must point to files that actually exist within the ZIP:
| Template Type | Path Convention |
|---|---|
| Tool | studio-data/dynamic_assets/tool_template_icons/{slug}_{random}_icon.{ext} |
| Agent | studio-data/dynamic_assets/agent_template_icons/{uuid}_icon.{ext} |
| MCP | studio-data/dynamic_assets/mcp_template_icons/{slug}_{random}_icon.{ext} |
If a template has no icon, the corresponding path field should be an empty string "".
Import Behavior
When Agent Studio imports a ZIP, the following transformations occur:
- UUID regeneration: All IDs in the manifest are remapped to fresh UUIDs. Cross-references are updated to match.
- Directory renaming: Tool template directories are renamed with new slugs and random suffixes.
- Icon renaming: Icon files are renamed to match the new directory names or UUIDs.
- Path updates: All
source_folder_path,tool_image_path,agent_image_path, andmcp_image_pathfields are updated to reflect the new names. - File copy: The
studio-data/subtree is merged into the project’s existingstudio-data/directory. - Database insert: All templates are inserted into the SQLite database with new IDs.
- MCP validation: Background jobs start MCP servers and populate their
toolsfields.
Because of step 2-4, the specific directory names and icon filenames in your ZIP are not preserved. They only need to be valid and internally consistent at the time of import.
Generating ZIPs Programmatically
When building a ZIP outside of Agent Studio (e.g., in a CI pipeline):
- Generate UUIDv4 strings for all template IDs
- Ensure all cross-references are consistent
- Place tool code under
studio-data/tool_templates/{slug}_{random}/ - Place icons under the appropriate
studio-data/dynamic_assets/subdirectory - Write
workflow_template.jsonat the ZIP root with correct path references - Create the ZIP archive with standard deflate compression
The ZIP should not contain:
.venv/directories__pycache__/directories.requirements_hash.txtfiles- Any files outside of
workflow_template.jsonandstudio-data/