Skip to content

Installation

Complete installation guide for all platforms and deployment methods.

System Requirements

Requirement Minimum Recommended
Python 3.8 3.11+
RAM 4 GB 8 GB+
Disk Space 500 MB 2 GB
Ollama Any version Latest

Method 1: Direct Installation

Best for development and customization.

1. Install Python

Download from python.org and run installer.

✅ Check "Add Python to PATH"

brew install python@3.11
sudo apt update
sudo apt install python3.11 python3-pip

2. Install Ollama

  1. Download from ollama.ai/download
  2. Run the installer
  3. Ollama will start automatically
brew install ollama
ollama serve
curl -fsSL https://ollama.ai/install.sh | sh
ollama serve

3. Clone Repository

git clone https://github.com/yourusername/ai-doc-agent.git
cd ai-doc-agent

4. Install Dependencies

pip install -r config/requirements.txt

5. Configure

cp config/.env.example .env
# Edit .env with your settings

6. Pull LLM Model

ollama pull llama2:7b

7. Test Installation

python run.py --help
python run.py --directory ./examples

Method 2: Standalone Executable

No Python required on target system!

See Bundling Guide for building executables.

Download pre-built executables:

Method 3: Docker

Best for consistent cross-platform deployment.

Prerequisites

  • Docker installed
  • Docker Compose (optional)

Using Docker

cd build
docker build -t ai-doc-agent .

# Run
docker run --rm \
  -v "$(pwd):/workspace" \
  -e OLLAMA_API_URL=http://host.docker.internal:11434/api/generate \
  ai-doc-agent --directory /workspace

Using Docker Compose

cd build
docker-compose run --rm ai-doc-agent --directory /workspace

See Docker Guide for details.

Method 4: Python Package

Install as a Python package.

pip install .

# Now available globally
ai-doc-agent --help
doc-generator --help

Optional: PDF Support

For PDF generation, install wkhtmltopdf:

choco install wkhtmltopdf

Or download from wkhtmltopdf.org

brew install wkhtmltopdf
sudo apt-get install wkhtmltopdf

Verify Installation

# Check Python
python --version  # Should be 3.8+

# Check Ollama
ollama --version

# Check agent
python run.py --help

# Generate test docs
python run.py --directory ./examples --output test

Troubleshooting

Python not found

python: command not found

Windows: Reinstall Python with "Add to PATH" checked

macOS/Linux: Create symlink:

sudo ln -s /usr/bin/python3 /usr/bin/python

Ollama connection error

Cannot connect to Ollama

  1. Check if Ollama is running: ollama list
  2. Start if needed: ollama serve
  3. Check URL in .env: OLLAMA_API_URL

Permission denied

Permission denied

Linux/macOS:

chmod +x run.py
chmod +x build/build.sh

Import errors

ModuleNotFoundError

pip install --upgrade pip
pip install -r config/requirements.txt

Next Steps

✅ Installation complete!