> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-de/ki-plattformen-and-agenten/open-interpreter.md).

# Open Interpreter

**Open Interpreter** ermöglicht Sprachmodellen, Code auszuführen, im Web zu browsen und Dateien auf Ihrem Rechner über eine natürliche Sprach-Chat-Oberfläche zu bearbeiten. Mit über 57.000 GitHub-Sternen ist es die führende Open-Source-Alternative zu ChatGPTs Code Interpreter — jedoch ohne Sandbox-Beschränkungen.

{% hint style="success" %}
Alle Beispiele können auf GPU-Servern ausgeführt werden, die über [CLORE.AI Marketplace](https://clore.ai/marketplace).
{% endhint %}

***

## Was ist Open Interpreter?

Open Interpreter bringt die Kraft eines KI-Coding-Assistenten direkt in Ihr Terminal. Anstatt zwischen ChatGPT und Ihrer Shell zu kopieren und einzufügen, chatten Sie natürlich und das Modell führt Code in Echtzeit aus:

* **Führen Sie Python, JS, Shell, R, AppleScript aus** — direkt auf Ihrem Server
* **Im Web browsen** — Seiten abrufen, Formulare ausfüllen, Daten extrahieren
* **Dateien bearbeiten** — jede Datei auf der Festplatte erstellen, ändern und verwalten
* **Persistenter Zustand** — Variablen, Imports und Ergebnisse über Nachrichten hinweg erhalten sich
* **Mehrere LLM-Backends** — OpenAI, Anthropic, lokale Modelle über Ollama/LlamaCpp

{% hint style="info" %}
Open Interpreter ist für Entwickler und Forscher konzipiert, die eine konversationelle Schnittstelle zu ihrer gesamten Rechenumgebung wünschen. Auf einem Clore.ai GPU-Server erhalten Sie eine leistungsfähige Maschine mit vollem Internetzugang und ohne Ausführungsbegrenzungen.
{% endhint %}

***

## Serveranforderungen

| Komponente     | Minimum                    | Empfohlen                       |
| -------------- | -------------------------- | ------------------------------- |
| GPU            | Jede (CPU-Modus verfügbar) | RTX 3090 / A100 für lokale LLMs |
| VRAM           | —                          | 24 GB+ für lokale 13B-Modelle   |
| RAM            | 8 GB                       | 16 GB+                          |
| CPU            | 4 Kerne                    | 8+ Kerne                        |
| Speicher       | 20 GB                      | 50 GB+                          |
| Betriebssystem | Ubuntu 20.04+              | Ubuntu 22.04                    |
| Python         | 3.10+                      | 3.11                            |
| Netzwerk       | Erforderlich               | Highspeed für Web-Browsing      |

***

## Ports

| Port | Dienst                  | Hinweise                          |
| ---- | ----------------------- | --------------------------------- |
| 22   | SSH                     | Terminalzugang, Tunnel für Web-UI |
| 8000 | Open Interpreter Server | REST-API & optionale Web-UI       |

***

## Schnellstart mit Docker

Open Interpreter hat kein offizielles Docker-Image, daher bauen wir ein sauberes. Dieser Ansatz bietet Ihnen eine reproduzierbare, isolierte Umgebung auf jedem Clore.ai-Server.

### Dockerfile

```dockerfile
FROM python:3.11-slim

# Systemabhängigkeiten
RUN apt-get update && apt-get install -y \
    git \
    curl \
    wget \
    build-essential \
    nodejs \
    npm \
    chromium \
    chromium-driver \
    && rm -rf /var/lib/apt/lists/*

# Installiere Open Interpreter mit allen Extras
RUN pip install --no-cache-dir \
    open-interpreter \
    'open-interpreter[local]' \
    playwright \
    jupyter

# Installiere Playwright-Browser
RUN playwright install chromium

WORKDIR /workspace

# Serverport freigeben
EXPOSE 8000

# Standard: interaktives Terminal
CMD ["interpreter"]
```

### Build & Run

```bash
# Baue das Image
docker build -t open-interpreter:latest .

# Starte den interaktiven Modus (Terminal-Chat)
docker run -it --rm \
  -e OPENAI_API_KEY=sk-... \
  -v $(pwd)/workspace:/workspace \
  open-interpreter:latest

# Als REST-API-Server ausführen
docker run -d \
  --name open-interpreter \
  -p 8000:8000 \
  -e OPENAI_API_KEY=sk-... \
  -v $(pwd)/workspace:/workspace \
  open-interpreter:latest \
  interpreter --server --port 8000 --host 0.0.0.0
```

***

## Installation auf Clore.ai (Bare Metal)

Wenn Sie es vorziehen, direkt auf einem Clore.ai-Server ohne Docker zu arbeiten:

### Schritt 1 — Einen Server mieten

1. Gehe zu [Clore.ai Marketplace](https://clore.ai/marketplace)
2. Filtern nach **RAM ≥ 16 GB**, **GPU** (optional, aber nützlich für lokale Modelle)
3. Wählen Sie einen Server mit **PyTorch** oder **Ubuntu** Basis-Image
4. Offen **SSH-Port 22** und optional **8000** in Ihrer Bestellung

### Schritt 2 — Verbindung per SSH

```bash
ssh root@<server-ip> -p <ssh-port>
```

### Schritt 3 — Abhängigkeiten installieren

```bash
# System aktualisieren
apt-get update && apt-get upgrade -y

# Python 3.11 installieren
apt-get install -y python3.11 python3.11-venv python3.11-pip nodejs npm curl

# Virtuelle Umgebung erstellen
python3.11 -m venv /opt/open-interpreter
source /opt/open-interpreter/bin/activate
```

### Schritt 4 — Open Interpreter installieren

```bash
# Basisinstallation
pip install open-interpreter

# Mit Unterstützung für lokale LLMs (Ollama, LlamaCpp)
pip install 'open-interpreter[local]'

# Mit Browser-/Web-Unterstützung
pip install playwright
playwright install chromium
```

### Schritt 5 — API-Schlüssel konfigurieren

```bash
# Umgebungsvariable setzen (in ~/.bashrc hinzufügen für Persistenz)
export OPENAI_API_KEY=sk-your-key-here
export ANTHROPIC_API_KEY=sk-ant-your-key-here

# Oder verwenden Sie eine .env-Datei
cat > /workspace/.env << 'EOF'
OPENAI_API_KEY=sk-your-key-here
ANTHROPIC_API_KEY=sk-ant-your-key-here
EOF
```

### Schritt 6 — Erster Start

```bash
# Umgebung aktivieren
source /opt/open-interpreter/bin/activate

# Interaktiven Chat starten
interpreter

# Oder mit spezifischem Modell
interpreter --model gpt-4o
interpreter --model claude-3-5-sonnet-20241022
```

***

## Verwendung lokaler LLMs (kein API-Schlüssel erforderlich)

Eines der Killer-Features von Open Interpreter auf Clore.ai GPU-Servern ist das vollständige Ausführen lokaler Modelle:

### Option A: Ollama-Backend

```bash
# Installiere Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# Ziehe ein code-fähiges Modell
ollama pull codellama:13b
ollama pull deepseek-coder:6.7b
ollama pull mistral:7b

# Starte Open Interpreter mit Ollama
interpreter --model ollama/codellama:13b
```

### Option B: LlamaCpp-Backend

```bash
# Installiere llama-cpp-python mit CUDA-Unterstützung
pip install 'llama-cpp-python[server]' --extra-index-url https://jllllll.github.io/llama-cpp-python-cuBLAS-wheels/AVX2/cu121

# Lade ein GGUF-Modell herunter
wget https://huggingface.co/TheBloke/CodeLlama-13B-GGUF/resolve/main/codellama-13b.Q4_K_M.gguf

# Mit dem lokalen Modell ausführen
interpreter --local --model /path/to/codellama-13b.Q4_K_M.gguf
```

***

## Als Server ausführen (REST-API)

Open Interpreter 0.2+ enthält einen eingebauten HTTP-Server für programmatischen Zugriff:

```bash
# Starte den Server
interpreter --server --port 8000 --host 0.0.0.0

# In einem anderen Terminal oder Client Anfragen senden:
curl -X POST http://<server-ip>:8000/run \
  -H "Content-Type: application/json" \
  -d '{"language": "python", "code": "import os; print(os.listdir(\".\"))"}'

# Chat-Endpunkt
curl -X POST http://<server-ip>:8000/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "List all Python files in /workspace and count lines of code"}'
```

### SSH-Tunnel für lokalen Zugriff

Wenn Port 8000 nicht öffentlich freigegeben ist, verwenden Sie SSH-Tunneling:

```bash
# Auf Ihrem lokalen Rechner
ssh -L 8000:localhost:8000 root@<server-ip> -p <ssh-port> -N
# Dann öffnen Sie http://localhost:8000
```

***

## Praktische Beispiele

### Beispiel 1: Datenanalyse-Pipeline

```
Benutzer: Lade den MNIST-Datensatz herunter, trainiere ein einfaches CNN und zeichne Genauigkeitskurven. Speichere das Diagramm als mnist_results.png

Open Interpreter: Klar! Ich mache das Schritt für Schritt...
[führt Python-Code in Echtzeit aus]
```

```python
# Open Interpreter erzeugt und führt aus:
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np

(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
# ... trainiert das Modell, plottet Ergebnisse, speichert PNG
```

### Beispiel 2: Web-Scraping

```
Benutzer: Scrape die Top-10 der heute trendenden GitHub-Repositories und speichere sie in einer CSV mit Name, Sternen und Beschreibung.
```

### Beispiel 3: Dateiverwaltung

```
Benutzer: Finde alle .log-Dateien in /var/log, die älter als 7 Tage sind, und komprimiere sie in ein Tarball unter /backup/logs-$(date).tar.gz
```

### Beispiel 4: Systemüberwachungs-Skript

```
Benutzer: Schreibe mir ein Python-Skript, das die GPU-Speichernutzung alle 5 Sekunden überwacht und alarmiert, wenn sie 90 % überschreitet. Führe es im Hintergrund aus.
```

***

## Konfigurationsdatei

Erstellen `~/.interpreter/config.yaml` um Standardwerte zu setzen:

```yaml
model: gpt-4o
temperature: 0
system_message: |
  Sie sind ein hilfreicher KI-Assistent, der auf einem Clore.ai GPU-Server läuft.
  Bevorzugen Sie stets effizienten, produktionsreifen Code.
  Speichern Sie wichtige Ausgaben in /workspace/.
safe_mode: false
auto_run: true
verbose: false
```

***

## Ausführung mit systemd (persistenter Dienst)

```ini
# /etc/systemd/system/open-interpreter.service
[Unit]
Description=Open Interpreter Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/workspace
Environment=OPENAI_API_KEY=sk-your-key
ExecStart=/opt/open-interpreter/bin/interpreter --server --port 8000 --host 0.0.0.0
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
```

```bash
systemctl daemon-reload
systemctl enable open-interpreter
systemctl start open-interpreter
systemctl status open-interpreter
```

***

## Fehlerbehebung

### `interpreter` Befehl nicht gefunden

```bash
# Stellen Sie sicher, dass das venv aktiviert ist
source /opt/open-interpreter/bin/activate

# Oder global installieren
pip install open-interpreter

# Überprüfen Sie PATH
which interpreter
echo $PATH
```

### Codeausführung ist blockiert / Sicherheitsmodus

```bash
# Deaktivieren Sie den Safe Mode (mit Vorsicht auf vertrauenswürdigen Servern verwenden)
interpreter --safe_mode false

# Oder in config.yaml:
# safe_mode: false
# auto_run: true
```

### Playwright / Browser-Fehler

```bash
# Installiere Systemabhängigkeiten für Chromium
apt-get install -y \
    libnss3 libatk1.0-0 libatk-bridge2.0-0 \
    libcups2 libxcomposite1 libxdamage1 \
    libxrandr2 libgbm1 libxkbcommon0

playwright install chromium
playwright install-deps
```

### Speichermangel bei lokalen LLMs

```bash
# Verwenden Sie ein kleineres quantisiertes Modell
ollama pull codellama:7b  # statt 13b

# Oder reduzieren Sie das Kontextfenster
interpreter --model ollama/codellama:7b --context_window 4096
```

### Verbindung auf Port 8000 verweigert

```bash
# Prüfen, ob der Server läuft
ss -tlnp | grep 8000

# Prüfen Sie die Firewall
ufw allow 8000/tcp

# Dienst neu starten
systemctl restart open-interpreter
```

### API-Rate-Limits

```bash
# Wechseln Sie zu Anthropic Claude für höhere Limits
export ANTHROPIC_API_KEY=sk-ant-...
interpreter --model claude-3-5-sonnet-20241022

# Oder verwenden Sie ein lokales Modell, um API-Limits vollständig zu umgehen
interpreter --model ollama/codellama:13b
```

***

## Sicherheitsüberlegungen

{% hint style="warning" %}
Open Interpreter führt Code direkt auf Ihrem Server aus. Immer:

* In einem Docker-Container oder einer VM für den Produktionseinsatz ausführen
* Port 8000 niemals öffentlich ohne Authentifizierung freigeben
* Verwenden Sie SSH-Tunneling für entfernten Zugriff
* Überprüfen Sie den Code, bevor Sie ihn für `auto_run: true` nicht vertrauenswürdige Eingaben aktivieren
  {% endhint %}

***

## Clore.ai GPU-Empfehlungen

Open Interpreter selbst ist leichtgewichtig — der GPU-Bedarf wird von dem jeweiligen **lokalen Modell** bestimmt, das Sie als Backend ausführen.

| GPU       | VRAM  | Clore.ai-Preis | Empfehlung für lokale Modelle                                          |
| --------- | ----- | -------------- | ---------------------------------------------------------------------- |
| RTX 3090  | 24 GB | \~$0.12/Stunde | CodeLlama 13B Q8, Llama 3 8B, Mistral 7B — solide Code-Qualität        |
| RTX 4090  | 24 GB | \~$0.70/Stunde | CodeLlama 34B Q4, DeepSeek Coder 33B Q4 — nahezu GPT-4-Coding-Qualität |
| A100 40GB | 40 GB | \~$1.20/Stunde | Llama 3 70B Q4 — produktionsreifer autonomer Coding-Agent              |
| Nur CPU   | —     | \~$0.02/Stunde | Jedes Modell über OpenAI/Anthropic-API — keine lokale GPU erforderlich |

{% hint style="info" %}
**Wenn Sie die OpenAI/Anthropic-API verwenden:** Sie benötigen nur eine CPU-Instanz (\~$0.02/Stunde) — die GPU ist irrelevant, da die Inferenz in der Cloud läuft. Wählen Sie GPU-Instanzen nur, wenn Sie **lokale Modelle** ausführen, um pro-Token-API-Kosten zu vermeiden.

**Beste lokale Modellkonfiguration:** RTX 3090 + Ollama läuft mit `codellama:13b` gibt Ihnen einen vollständig autonomen, datenschutzwahrenden Coding-Agenten ohne API-Kosten für etwa \~$0.12/Stunde.
{% endhint %}

***

## Nützliche Links

* **GitHub**: <https://github.com/OpenInterpreter/open-interpreter> ⭐ 57K+
* **Dokumentation**: <https://docs.openinterpreter.com>
* **Discord**: <https://discord.gg/Hvz9Axh84z>
* **Clore.ai Marketplace**: <https://clore.ai/marketplace>
* **Ollama-Modelle**: <https://ollama.ai/library>
* **HuggingFace GGUF-Modelle**: <https://huggingface.co/TheBloke>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-de/ki-plattformen-and-agenten/open-interpreter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
