* docs: complete node editor node reference glossary (#107) - generated by new nodes.tools glossary subcommand, 47 categorized pages covering all 403 nodes, docstring gap fixes, help-agent docs-index entries * docs: fix Jinja2 Format discoverability - document dynamic-input template variables, move node to string page, link key inference from dynamic-input notes, strip links from index summaries * help agent: keep node reference out of the chat prompt - collapse glossary entries to one pointer line (~19k chars saved), agent retrieves node info via search_docs/read_doc tool calls * help agent: replace in-prompt docs index with find_docs lookup tool - prompt carries a 13-line section overview (~1.5k chars vs ~66k), pages located via keyword-scored find_docs at runtime * changelog: help agent prompt slimming + find_docs lookup * docs: sort node reference index and nav alphabetically by page title * review: move module constants into top-of-file constant blocks (glossary MAX_DEFAULT_LENGTH; docs SECTION_DESCRIPTIONS, _FIND_STOPWORDS, FIND_DOCS_LIMIT) * review: word-boundary find_docs scoring with plural/-ing folds, find_docs+section_overview unit tests, jinja2 template field description override * docs: help agent overview no longer claims an in-prompt index of all documentation pages * docs: full node docstring audit pass - 335 classes audited by 5 agents, ~89 accuracy fixes (nonexistent/misnamed sockets, wrong behavior claims), ~94 expansions, 5 factually-wrong PropertyField descriptions corrected, glossary regenerated
9.5 KiB
Visualizer Agent Generation Nodes
Run visual generation: build generation requests, select the backend, generate images and analyze them. Prompts come from the prompt nodes.
7 nodes.
| Node | Registry path |
|---|---|
| Analyze Images | agents/visual/AnalyzeImages |
| Backend Status | agents/visual/BackendStatus |
| Generate Image | agents/visual/GenerateImage |
| Visual Generation Request | agents/visual/GenerationRequest |
| Select Backend | agents/visual/SelectBackend |
| Unpack Visual Generation Request | agents/visual/UnpackGenerationRequest |
| Unpack Visual Generation Response | agents/visual/UnpackGenerationResponse |
Analyze Images
agents/visual/AnalyzeImages
Analyzes images in batches using asyncio.Semaphore to limit concurrent requests.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
graph state (required) |
asset_ids |
list |
list of asset IDs to analyze (required) |
missing_only |
bool |
(optional) only analyze assets without existing analysis (optional, default True) |
prompt |
str |
(optional) analysis prompt to use (optional, default "Describe this image in detail.") |
save |
bool |
(optional) whether to save analysis to asset meta (optional, default True) |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
graph state (passed through) |
asset_ids |
list |
original list of asset IDs (passed through) |
missing_only |
bool |
missing_only flag (passed through) |
prompt |
str |
analysis prompt used (passed through) |
save |
bool |
save flag (passed through) |
analyzed_ids |
list |
list of successfully analyzed asset IDs |
skipped_ids |
list |
list of skipped asset IDs (missing assets or already analyzed) |
failed_ids |
list |
list of asset IDs that failed to analyze |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
missing_only |
bool |
True |
Only analyze assets that don't have an existing analysis |
prompt |
text |
"Describe this image in detail. (3 paragraphs max.)" |
The prompt to use for image analysis |
save |
bool |
True |
Whether to save the analysis to asset meta |
Backend Status
agents/visual/BackendStatus
Reports the capabilities of the visual agent's currently configured backends.
Outputs
| Output | Type | Description |
|---|---|---|
can_generate_images |
bool |
Whether an image generation backend is available |
can_edit_images |
bool |
Whether an image editing backend is available |
max_references |
int |
Maximum number of reference images the image-edit backend supports (0 if none is available) |
Generate Image
agents/visual/GenerateImage
Generates an image by submitting a generation request to the visual agent, which routes it to the appropriate backend. The request's callback (if any) is invoked with the response, and depending on the request's asset attachment context the resulting image may be saved to the scene's assets.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
The graph state |
generation_request |
visual/generation_request |
The generation request to execute |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
The state input, passed through |
generation_request |
visual/generation_request |
The generation request, passed through |
generation_response |
visual/generation_response |
The generation response containing the image |
Visual Generation Request
agents/visual/GenerationRequest
Creates a generation request for image generation.
Inputs
| Input | Type | Description |
|---|---|---|
prompt |
visual/prompt |
visual prompt object (required) |
vis_type |
str |
type of visual to generate (optional) |
gen_type |
str |
type of generation (TEXT_TO_IMAGE, etc.) (optional) |
format |
str |
image format/aspect ratio (optional) |
instructions |
str |
additional instructions for generation (optional) |
character_name |
str |
name of character for character-specific generation (optional) |
reference_assets |
list |
list of reference asset IDs (optional) |
callback |
function |
callback function to run after generation (optional) |
extra_config |
dict |
additional configuration dict (optional) |
asset_attachment_context |
asset_attachment_context |
controls automatic asset attachment behavior (optional) |
Outputs
| Output | Type | Description |
|---|---|---|
generation_request |
visual/generation_request |
the created generation request object |
prompt |
visual/prompt |
the visual prompt (passed through) |
vis_type |
str |
visual type (passed through) |
format |
str |
format type (passed through) |
character_name |
str |
character name (passed through) |
reference_assets |
list |
reference assets list (passed through) |
gen_type |
str |
generation type (passed through) |
extra_config |
dict |
extra config dict (passed through) |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
vis_type |
str |
"UNSPECIFIED" |
The type of visual to generate. Choices: UNSPECIFIED, CHARACTER_CARD, CHARACTER_PORTRAIT, SCENE_CARD, SCENE_BACKGROUND, SCENE_ILLUSTRATION, OBJECT_ILLUSTRATION. |
gen_type |
str |
"TEXT_TO_IMAGE" |
The type of generation to perform. Choices: TEXT_TO_IMAGE, IMAGE_EDIT, UPLOAD. |
format |
str |
"LANDSCAPE" |
The format of the visual to generate. Choices: LANDSCAPE, PORTRAIT, SQUARE. |
character_name |
str |
"" |
The name of the character to generate |
instructions |
text |
"" |
The instructions for the generation request |
extra_config |
dict |
{} |
The extra configuration for the generation request |
Select Backend
agents/visual/SelectBackend
Determines which visual backend and generation type to use for a request. Selects the image-edit backend (gen_type IMAGE_EDIT) when reference assets are provided and image editing is available, or when image generation is unavailable but editing is; otherwise selects the image generation backend (gen_type TEXT_TO_IMAGE). Also resolves the prompt type the selected backend expects and the image format implied by the visual type.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
Graph state |
vis_type |
str |
(optional) The type of visual to generate |
reference_assets |
list |
(optional) List of reference asset IDs; when set, steers selection toward the image-edit backend |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
Graph state (passed through) |
backend_name |
str |
Name of the selected backend (empty if none is available) |
gen_type |
str |
The selected generation type (TEXT_TO_IMAGE or IMAGE_EDIT) |
vis_type |
str |
The visual type (passed through) |
prompt_type |
str |
Prompt type the selected backend expects (falls back to the agent's fallback prompt type when no backend is available) |
format |
str |
Image format derived from the visual type (e.g. PORTRAIT) |
reference_assets |
list |
The reference assets list (passed through) |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
vis_type |
str |
"UNSPECIFIED" |
The type of visual to generate. Choices: UNSPECIFIED, CHARACTER_CARD, CHARACTER_PORTRAIT, SCENE_CARD, SCENE_BACKGROUND, SCENE_ILLUSTRATION, OBJECT_ILLUSTRATION. |
Unpack Visual Generation Request
agents/visual/UnpackGenerationRequest
Unpacks a visual generation request into its individual fields.
Inputs
| Input | Type | Description |
|---|---|---|
generation_request |
visual/generation_request |
The generation request to unpack |
Outputs
| Output | Type | Description |
|---|---|---|
generation_request |
visual/generation_request |
The generation request, passed through |
prompt |
str |
The positive prompt string |
vis_type |
str |
The visual type |
format |
str |
The image format |
character_name |
str |
The character name |
reference_assets |
list |
The list of reference asset IDs |
gen_type |
str |
The generation type |
extra_config |
dict |
The extra configuration dict |
asset_attachment_context |
asset_attachment_context |
The asset attachment context |
Unpack Visual Generation Response
agents/visual/UnpackGenerationResponse
Unpacks a visual generation response into its individual fields.
Inputs
| Input | Type | Description |
|---|---|---|
generation_response |
visual/generation_response |
The generation response to unpack |
Outputs
| Output | Type | Description |
|---|---|---|
generation_response |
visual/generation_response |
The generation response, passed through |
base64 |
str |
The generated image as base64 encoded data |
image_data |
str |
The generated image as a data URI |
id |
str |
The generation's ID |
backend_name |
str |
The name of the backend that generated the image |
request |
visual/generation_request |
The generation request that produced this response |