Skip to content

Installation

This guide will help you install and set up the AI Imaging Agent on your system.

Prerequisites

Before installing, ensure you have:

  • Python 3.10–3.12 installed
  • pip (Python package manager)
  • OpenAI API key (or compatible API endpoint)
  • Internet connection for model calls

Installation Steps

1. Clone the Repository

git clone https://github.com/imaging-plaza/ai-agent.git
cd ai-agent

2. Create Virtual Environment

It's recommended to use a virtual environment to isolate dependencies:

python -m venv .venv
source .venv/bin/activate
python -m venv .venv
.venv\Scripts\activate

3. Install the Package

For regular use:

pip install --upgrade pip
pip install -e .

For development (includes test dependencies):

pip install -e ".[dev]"

Verify Installation

Verify that the installation was successful:

ai_agent --help

You should see the available commands:

usage: ai_agent [-h] {chat,sync}

AI Agent CLI

positional arguments:
  {chat,sync}  'chat' launches the chat UI; 'sync' runs one catalog refresh.

Next Steps

Now that you have installed the AI Imaging Agent, proceed to:

Troubleshooting

Python Version Issues

If you encounter issues with Python version compatibility:

# Check your Python version
python --version

# Use a specific Python version
python3.10 -m venv .venv

Installation Errors

If you encounter dependency conflicts:

# Upgrade pip first
pip install --upgrade pip setuptools wheel

# Try installing again
pip install -e .

Missing System Dependencies

Some packages may require system libraries:

sudo apt-get update
sudo apt-get install python3-dev build-essential
# Using Homebrew
brew install python@3.10

Ensure you have Microsoft C++ Build Tools installed.

Docker Installation (Alternative)

A Dockerfile is available for containerized deployment:

# Build the Docker image
docker build -t ai-agent -f tools/image/Dockerfile .

# Run the container
docker run -p 7860:7860 --env-file .env ai-agent

Note

Make sure to create a .env file with your configuration before running the Docker container.