> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Same Run Image Analysis

> Legacy DalleTools example that generates and analyzes an image in one agent run.

This legacy example generates an image with DALL-E and analyzes it in the same run.

<Warning>
  DALL-E models are deprecated. This `DalleTools` example is retained as a legacy reference and no longer runs against the current OpenAI API. Use `OpenAITools` with GPT Image 2 in [Image Generation Agent](/models/providers/native/openai/responses/usage/image-generation-agent).
</Warning>

## Code

```python agent_same_run_image_analysis.py theme={null}
from agno.agent import Agent
from agno.tools.dalle import DalleTools

# Create an Agent with the DALL-E tool
agent = Agent(tools=[DalleTools()], name="DALL-E Image Generator", markdown=True)

response = agent.run(
    "Generate an image of a dog and tell what color the dog is.",
    debug_mode=True,
)

if response.images:
    print("Agent Response", response.content)
    print(response.images[0].url)
```

## Current Alternative

The source above uses removed DALL-E models and is preserved for reference. Follow [Image Generation Agent](/models/providers/native/openai/responses/usage/image-generation-agent) for the current `OpenAITools` and GPT Image 2 pattern before rebuilding the same-run analysis flow.
