Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Don't leak secrets into the image
.env
.env.*
!.env.example

# Local build artifacts
__pycache__
*.pyc
*.pyo

# Git
.git
.gitignore

# IDE
.vscode
.idea
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Memory (may contain sensitive data)
memory/

# Host-only scripts (not needed inside container)
run.sh
run.py
65 changes: 65 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# MeTTaClaw Configuration
# This file is auto-copied to .env on first run.
# The .env file is gitignored — your secrets are safe.
#
# Just fill in the API key for ONE provider below.
# The system auto-detects which provider to use.

# ===================================================================
# OPENAI (GPT-4, GPT-4o, o1, o3)
# Get a key: https://platform.openai.com/api-keys
# ===================================================================
OPENAI_API_KEY="sk-..."

# ===================================================================
# ANTHROPIC (Claude)
# Get a key: https://console.anthropic.com/settings/keys
# ===================================================================
# ANTHROPIC_API_KEY="sk-ant-..."

# ===================================================================
# OLLAMA (Local, FREE — install from https://ollama.ai)
# Then run: ollama pull llama3
# ===================================================================
# OLLAMA_API_BASE="http://localhost:11434"
# OLLAMA_MODEL="llama3"

# ===================================================================
# OPENROUTER (100+ models, one API)
# Get a key: https://openrouter.ai/settings/keys
# ===================================================================
# OPENROUTER_API_KEY=""

# ===================================================================
# GROQ (Fast inference)
# Get a key: https://console.groq.com/keys
# ===================================================================
# GROQ_API_KEY=""

# ===================================================================
# OTHER PROVIDERS (uncomment and fill in as needed)
# ===================================================================

# Ollama custom model
# OLLAMA_MODEL="mistral"

# Together AI
# TOGETHER_API_KEY=""

# Google Vertex AI
# GOOGLE_API_KEY=""
# GOOGLE_APPLICATION_CREDENTIALS="/path/to/credentials.json"

# AWS Bedrock
# AWS_ACCESS_KEY_ID=""
# AWS_SECRET_ACCESS_KEY=""
# AWS_REGION_NAME="us-east-1"

# Azure OpenAI
# AZURE_API_KEY=""
# AZURE_API_BASE="https://your-resource.openai.azure.com"
# AZURE_API_VERSION="2024-02-15-preview"

# Custom OpenAI-compatible endpoint
# CUSTOM_API_KEY=""
# CUSTOM_API_BASE="https://your-server.com/v1"
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual environments
venv/
env/
ENV/
.venv

# Environment files (API keys)
.env
.env.local
.env.*.local

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Logs
*.log

# MeTTaClaw specific
memory/*.metta
*.metta.bak
memory/history.metta
43 changes: 43 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# MeTTaClaw Dockerfile
# ========================================================================

FROM archlinux:latest

ENV TERM=xterm-256color
ENV PETTA_PATH=/opt/PeTTa
ENV PATH="/opt/PeTTa:${PATH}"

# ========================================================================
# Install system dependencies
# ========================================================================
RUN pacman-key --init && \
pacman -Sy --noconfirm \
base-devel git curl ca-certificates python python-pip \
libffi openssl cargo rust cmake wget \
gmp libedit readline libarchive pcre libyaml swi-prolog \
|| true

RUN pip3 install --break-system-packages janus-swi janus litellm || true

# ========================================================================
# Clone PeTTa (the execution engine)
# ========================================================================
RUN git clone --depth 1 --branch main \
https://github.com/trueagi-io/PeTTa /opt/PeTTa

# ========================================================================
# Clone MeTTaClaw (the agent code)
# ========================================================================
RUN git clone --depth 1 --branch main \
https://github.com/autonull/mettaclaw /opt/PeTTa/repos/mettaclaw

# ========================================================================
# Setup container runner
# ========================================================================
WORKDIR /opt/PeTTa
COPY container_run.sh /opt/PeTTa/container_run.sh
COPY agent_run.py /opt/PeTTa/agent_run.py
RUN chmod +x /opt/PeTTa/container_run.sh

ENTRYPOINT []
CMD ["/opt/PeTTa/container_run.sh"]
Loading