Image Generation
Use Image Generation when the agent should create or revise a visual during the conversation.
The agent can generate from a text description, follow a reference image selected from Knowledge Base or attached in the current conversation, or revise an image generated earlier in that conversation.
When Image Generation Is the Right Tool
Use it when:
- The user asks the agent to create a new image
- A new image should follow the subject, composition, or visual direction of an available reference
- The user attaches an image and asks for a variation or revision
- The user wants to revise an image generated earlier in the same conversation
- The response should include a visual draft, not only text
- A generated concept is good enough for the next step, even if a human will review it later
Do not use it when:
- The user only needs to view or download an existing source image without changing it
- You need an exact brand-approved asset to be returned unchanged
- The task needs a human designer to make precise final production artwork before anything is shared
Step 1: Add Image Generation
In Editor, open Tools, click Add Tool, and choose Image Generation.
Step 2: Choose an Image Model
Select the model the agent should use in Image Model.
Keep the first version simple. One model is enough to prove the workflow.
Reference and edit support depends on the model
A model may support text-to-image generation without supporting image references or edits equally well. Test the configured model with the reference and revision workflows you plan to use.
Step 3: Connect Reference Images When Needed
To let the agent generate from existing visuals, also add Knowledge Base and select the standalone image files it may use. A selected image must finish processing and show Ready before it can be used as a generation reference.
For a one-off reference, the user can attach an image in the current conversation instead of adding it to Knowledge Base.
The agent can also revise an image generated earlier in the same conversation. Each revision creates a new image; it does not overwrite the earlier result.
One generation can use up to four input images. The agent may choose one as the base image to revise and use the others as references. A previously generated image becomes eligible only after it appears as a completed result in the conversation history; a newly produced image cannot be fed back into the same tool run.
When the configured model is GPT Image 2, supported Chat surfaces let the user choose Edit region on a generated image, draw one rectangular selection, and describe the change. Codeer binds that selection to the base image and creates the provider-specific mask on the server; users and agents do not upload or construct masks. The selection guides the edited region, but the model may not follow its boundary with pixel-level precision.
In Instructions or When to Use, explain when the agent should retrieve a reference, what it should preserve, and what it may change. For example:
When the user asks for a campaign variation, find the matching Ready reference image in Knowledge Base, preserve its recognizable subject and layout direction, and generate a new draft using the user's requested changes. When revising an earlier generated image, preserve everything the user did not ask to change.
Step 4: Write a Narrow When to Use
Treat image generation as a deliberate behavior, not a default reply style.
Example:
Use this tool when the user asks for a new visual concept, a variation based on an available reference, or a revision to an image generated earlier in this conversation. Do not use it for factual questions or when an existing approved asset should be returned unchanged.
That works because it defines:
- The kinds of requests that should trigger the tool
- The situations where the tool should stay off
- The difference between generating a new draft and reusing a real source asset
Step 5: Test with Prompts That Clearly Need an Image
Try prompts such as:
Can you create a hero image concept for a legal consultation landing page?Show me a simple illustration of the onboarding flow in a clean flat style.Use the approved blue product reference in Knowledge Base to create a vertical campaign variation.Use the image I attached to create a square variation with a lighter background.Revise the image you just generated: keep the composition, but make the headline larger.
Then confirm:
- The tool is actually called
- The agent uses the intended reference or earlier generated image when requested
- The returned image matches the requested direction
- The agent does not generate images for normal text-only questions
What the Agent Can Control at Runtime
The tool form only asks you to choose the model and define When to Use.
During the conversation, the agent can still decide image-specific details such as:
- The text prompt sent to the model
- Optional style direction
- Optional aspect ratio when the model supports it
- Which available image should be used as a reference or revision target
- Which single image, if any, should be the base to revise and which images should remain references
- How to apply the user's immutable region selection when a supported Chat surface starts a localized
GPT Image 2edit
Because of that, your invocation rule should explain what kinds of images the agent is allowed to create, not try to hardcode every visual detail in the tool setup.
Operator Tips
- Keep the trigger narrow so the agent does not generate images unless the user clearly wants one.
- If the image should follow a brand, campaign, or product style, describe that in
Instructionsand select the relevant standalone images in the agent'sKnowledge Basetool. - Use a conversation attachment for a one-off reference; use Knowledge Base when the agent should discover or reuse the image across conversations.
- If you want different visual behaviors, add separate
Image Generationtools and give each one a distinctWhen to Use. - Treat generated images as drafts unless your workflow includes a clear human review step.
Common Mistakes
Writing a vague trigger
Use this tool when visuals are helpful is too loose. The agent needs a real decision rule.
Using generation when a real source asset already exists
If the correct logo, diagram, or campaign image should be returned unchanged, point the agent to that source instead of generating a new approximation. Use it as a generation reference only when the user actually wants a new variation.
Expecting the model choice to fix weak instructions
The model matters, but the agent still needs a clear request and good guidance about what kind of image is acceptable.