Microsoft Magentic-UI containerized. AI-powered web automation with OpenAI/Azure/Ollama support.
1.8K
A containerized version of Microsoft's Magentic-UI - a research prototype of a human-centered interface powered by a multi-agent system for web automation, code generation, and file analysis.
# Run with OpenAI
docker run -d \
-p 8081:8081 \
-e OPENAI_API_KEY=your_openai_api_key_here \
davides1993/magentic-ui:latest
# Access the UI at http://localhost:8081
version: '3.8'
services:
magentic-ui:
image: davides1993/magentic-ui:latest
ports:
- "8081:8081"
environment:
- OPENAI_API_KEY=your_openai_api_key_here
- PORT=8081
volumes:
- ./workspace:/app/workspace
- /var/run/docker.sock:/var/run/docker.sock # For agent containers
restart: unless-stopped
Magentic-UI is a revolutionary web application that provides a transparent and controllable interface for AI-powered automation. It combines the power of multiple AI agents to:
magentic (UID 1000)| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY | OpenAI API key for GPT models | sk-... |
| Variable | Description | Example |
|---|---|---|
AZURE_OPENAI_ENDPOINT | Azure OpenAI endpoint URL | https://your-resource.openai.azure.com/ |
AZURE_OPENAI_API_KEY | Azure OpenAI API key | abc123... |
AZURE_OPENAI_DEPLOYMENT | Model deployment name | gpt-4o-mini |
AZURE_OPENAI_API_VERSION | API version | 2024-10-21 |
| Variable | Description | Example |
|---|---|---|
OLLAMA_BASE_URL | Ollama server URL | http://ollama-service:11434 |
| Variable | Description | Default |
|---|---|---|
PORT | Application port | 8081 |
PYTHONUNBUFFERED | Python output buffering | 1 |
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Magentic-UI Container ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Web Interface (8081) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Multi-Agent System ā ā
ā ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā ā
ā ā ā Orchestrator ā WebSurfer ā etc. ā ā ā
ā ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Agent Docker Containers ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
āā /app/workspace (mounted volume)
āā /var/run/docker.sock (Docker socket)
āā Port 8081 (Web UI)
docker run -d \
-p 8081:8081 \
-v $(pwd)/workspace:/app/workspace \ # Persistent workspace
-v /var/run/docker.sock:/var/run/docker.sock \ # Docker access
-e OPENAI_API_KEY=your_key \
davides1993/magentic-ui:latest
| Mount Point | Purpose | Required |
|---|---|---|
/app/workspace | File storage and persistence | Recommended |
/var/run/docker.sock | Docker-in-Docker for agents | Optional* |
/tmp | Temporary files | Auto-managed |
* Required for full agent functionality that needs containerization
# Create config.yaml
cat > config.yaml << EOF
model_config: &client
provider: autogen_ext.models.openai.OpenAIChatCompletionClient
config:
model: gpt-4o
api_key: ${OPENAI_API_KEY}
max_retries: 10
orchestrator_client: *client
coder_client: *client
web_surfer_client: *client
file_surfer_client: *client
action_guard_client: *client
EOF
# Mount configuration
docker run -d \
-p 8081:8081 \
-v $(pwd)/config.yaml:/app/config.yaml \
-v $(pwd)/workspace:/app/workspace \
davides1993/magentic-ui:latest
# config.yaml for Azure
model_config: &client
provider: AzureOpenAIChatCompletionClient
config:
model: gpt-4o
azure_endpoint: "https://your-resource.openai.azure.com/"
azure_deployment: "gpt-4o-deployment"
api_version: "2024-10-21"
azure_ad_token_provider:
provider: autogen_ext.auth.azure.AzureTokenProvider
config:
provider_kind: DefaultAzureCredential
scopes:
- https://cognitiveservices.azure.com/.default
# Check container health
curl http://localhost:8081/
# Docker health status
docker ps --format "table {{.Names}}\t{{.Status}}"
# Follow application logs
docker logs -f <container_name>
# Debug mode with shell access
docker run -it --entrypoint /bin/bash davides1993/magentic-ui:latest
# Check processes inside container
docker exec <container_name> ps aux
apiVersion: apps/v1
kind: Deployment
metadata:
name: magentic-ui
spec:
replicas: 1
selector:
matchLabels:
app: magentic-ui
template:
metadata:
labels:
app: magentic-ui
spec:
containers:
- name: magentic-ui
image: davides1993/magentic-ui:latest
ports:
- containerPort: 8081
env:
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: openai-secret
key: api-key
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "4Gi"
cpu: "2000m"
volumeMounts:
- name: workspace
mountPath: /app/workspace
- name: docker-sock
mountPath: /var/run/docker.sock
volumes:
- name: workspace
emptyDir:
sizeLimit: 10Gi
- name: docker-sock
hostPath:
path: /var/run/docker.sock
version: '3.8'
services:
magentic-ui:
image: davides1993/magentic-ui:latest
ports:
- "8081:8081"
environment:
- OPENAI_API_KEY_FILE=/run/secrets/openai_key
secrets:
- openai_key
volumes:
- magentic_workspace:/app/workspace
- /var/run/docker.sock:/var/run/docker.sock
deploy:
replicas: 1
resources:
limits:
memory: 4G
cpus: '2'
reservations:
memory: 1G
cpus: '0.5'
secrets:
openai_key:
external: true
volumes:
magentic_workspace:
# Scan image for vulnerabilities
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v $HOME/Library/Caches:/root/.cache/ \
aquasec/trivy image davides1993/magentic-ui:latest
| Tag | Description | Use Case |
|---|---|---|
latest | Latest stable release | Production |
YYYYMMDD-HHMMSS | Timestamped builds | Version pinning |
Container won't start
# Check logs
docker logs <container_name>
# Verify environment variables
docker run --rm davides1993/magentic-ui:latest env | grep -E "(OPENAI|AZURE|OLLAMA)"
Can't access UI
# Check if port is bound
docker ps --format "table {{.Names}}\t{{.Ports}}"
# Test connectivity
curl -I http://localhost:8081
Agent containers fail
# Verify Docker socket mount
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
davides1993/magentic-ui:latest docker ps
# Check Docker daemon
docker info
# Increase memory limits
docker run -d --memory=4g --cpus=2 \
-p 8081:8081 \
-e OPENAI_API_KEY=your_key \
davides1993/magentic-ui:latest
# Use SSD for workspace volume
docker run -d \
-p 8081:8081 \
-v /fast-ssd/magentic-workspace:/app/workspace \
davides1993/magentic-ui:latest
This Docker image is maintained independently. For issues with the underlying Magentic-UI application, please refer to the official Microsoft repositoryā .
For Docker image-specific issues, please create an issue with:
This Docker image packages Microsoft's Magentic-UI, which is licensed under the MIT License. See the original repositoryā for full license terms.
Maintained by: davides1993ā
Last Updated: December 2024
Image Size: ~1.2GB
Python Version: 3.12
Content type
Image
Digest
sha256:83fcdcd96ā¦
Size
406.4 MB
Last updated
over 1 year ago
docker pull davides1993/magentic-ui