ImageTableTask
Generate structured grids of AI-generated images for style comparisons, product variations, and concept exploration.
Category: File
Model: Image Generation
Output: HTML/Markdown
⚙️ ExecutionConfig.json
{
"rows": ["Astronaut", "Robot"],
"columns": ["Impressionist", "Synthwave"],
"image_prompt_template": "A portrait of an {row}, {column} style",
"base_style": "cinematic lighting, 8k",
"output_directory": "portraits_grid",
"image_format": "png"
}
→
👁️ Session UI Gallery
| Impressionist | Synthwave | |
|---|---|---|
| Astronaut | ||
| Robot |
✔ 4 images generated
✔ HTML table saved to portraits_grid/image_table.html
Workspace Artifacts
Explore the generated images and HTML reports directly from the task workspace.
Execution Configuration
| Field | Type | Description |
|---|---|---|
rows * |
List<String> | Row labels for the image table (descriptive text or image file paths). |
columns * |
List<String> | Column labels for the image table (descriptive text or image file paths). |
image_prompt_template * |
String | Prompt template using {row} and {column} as placeholders. |
base_style |
String | Base style or context to apply to all generated images. |
output_directory |
String | Relative path for generated images. Default: "generated_images". |
image_format |
String | Format: 'png', 'jpg', or 'jpeg'. Default: "png". |
Type Configuration (Static)
| Field | Default | Range |
|---|---|---|
parallel_generation |
2 |
1 - 10 |
image_width |
512 |
64 - 2048 px |
image_height |
512 |
64 - 2048 px |
Task Lifecycle
- Validation: Checks for required labels and valid image format.
- Initialization: Resolves output directory and initializes
ImageProcessingAgent. - Generation: Iterates through the grid, replacing placeholders and generating images in parallel.
- Export: Saves individual images, generates a standalone
image_table.html, and a Markdown summary.
Embedded Execution (UnifiedHarness)
Use the UnifiedHarness to run this task programmatically in headless environments or CI/CD pipelines.
import com.simiacryptus.cognotik.plan.tools.file.ImageTableTask
import com.simiacryptus.cognotik.plan.tools.file.ImageTableTask.*
fun generateComparisonGrid(harness: UnifiedHarness, projectDir: File) {
// 1. Define Runtime Input
val executionConfig = ImageTableTaskExecutionConfigData(
rows = listOf("Astronaut", "Robot"),
columns = listOf("Impressionist", "Synthwave"),
image_prompt_template = "A portrait of an {row}, {column} style",
base_style = "cinematic lighting",
output_directory = "style_comparison"
)
// 2. Run Task
harness.runTask(
taskType = ImageTableTask.ImageTable,
typeConfig = ImageTableTaskTypeConfig(parallel_generation = 4),
executionConfig = executionConfig,
workspace = projectDir,
autoFix = true
)
}
Prompt Segment
The following instructions are injected into the LLM context:
ImageTable - Generate a table/grid of AI-generated images
** Specify row labels in the 'rows' array
** Specify column labels in the 'columns' array
** Provide an image_prompt_template using {row} and {column} placeholders
** Optionally specify a base_style for consistent styling
** Generates an HTML table displaying all images with labels