localgpt 0.1.0

A Local focused AI assistant with persistent memory and continuous operation capabilities (or reshaped OpenClaw in Rust)
Documentation
# LocalGPT Configuration
# Copy to ~/.localgpt/config.toml

[agent]
# Default model to use for chat
#
# Format: "provider/model-id" (OpenClaw-compatible)
#
# Anthropic API (recommended, requires ANTHROPIC_API_KEY):
#   - "anthropic/claude-opus-4-5" (recommended)
#   - "anthropic/claude-sonnet-4-5"
#
# Short aliases (auto-resolved to latest 4.5 models):
#   - "opus"   → anthropic/claude-opus-4-5
#   - "sonnet" → anthropic/claude-sonnet-4-5
#   - "gpt"    → openai/gpt-4o
#
# OpenAI API (requires OPENAI_API_KEY):
#   - "openai/gpt-4o", "openai/gpt-4o-mini", "openai/gpt-4-turbo"
#
# Claude CLI (local, no API key needed):
#   - "claude-cli/opus", "claude-cli/sonnet", "claude-cli/haiku"
#
# Ollama (local):
#   - "ollama/llama3", "ollama/mistral", etc.
#
default_model = "claude-cli/opus"

# Context window size (in tokens)
context_window = 128000

# Reserve tokens for response
reserve_tokens = 8000

# Anthropic configuration (REQUIRED for default model)
# Get your API key at: https://console.anthropic.com/
[providers.anthropic]
api_key = "${ANTHROPIC_API_KEY}"  # Set: export ANTHROPIC_API_KEY="sk-ant-..."
base_url = "https://api.anthropic.com"

# OpenAI configuration (optional)
# [providers.openai]
# api_key = "${OPENAI_API_KEY}"
# base_url = "https://api.openai.com/v1"

# Ollama configuration (for local models)
# [providers.ollama]
# endpoint = "http://localhost:11434"
# model = "llama3"

# Claude CLI configuration (uses local claude CLI command)
# Requires claude CLI to be installed: https://github.com/anthropics/claude-code
# [providers.claude_cli]
# command = "claude"
# model = "opus"  # opus, sonnet, or haiku

[heartbeat]
# Enable automatic heartbeat
enabled = true

# How often to check HEARTBEAT.md
interval = "30m"

# Only run during these hours (optional)
# [heartbeat.active_hours]
# start = "09:00"
# end = "22:00"

[memory]
# Where to store memory files
workspace = "~/.localgpt/workspace"

# Embedding provider for semantic search: "local" (default), "openai", or "none"
# - "local": Uses FastEmbed (all-MiniLM-L6-v2), no API key needed
# - "openai": Uses OpenAI embeddings (requires providers.openai config)
# - "none": FTS-only search, no vector embeddings
embedding_provider = "local"

# Embedding model for local provider (FastEmbed):
#
# English:
#   - all-MiniLM-L6-v2   (default, ~80MB, fastest)
#   - bge-base-en-v1.5   (~430MB, higher quality)
#
# Chinese:
#   - bge-small-zh-v1.5  (~95MB, Chinese-specific)
#
# Multilingual (Chinese, Japanese, Korean, 100+ languages):
#   - multilingual-e5-small  (~470MB, compact)
#   - multilingual-e5-base   (~1.1GB, recommended for Chinese)
#   - bge-m3                 (~2.2GB, best quality)
#
# For OpenAI provider: text-embedding-3-small, text-embedding-3-large
embedding_model = "all-MiniLM-L6-v2"

# Cache directory for local embedding models (ONNX format)
# Models are downloaded from HuggingFace on first use
# Default: ~/.cache/localgpt/models
# Can also be set via FASTEMBED_CACHE_DIR environment variable
# embedding_cache_dir = "~/.cache/localgpt/models"

# Chunk size for indexing (tokens)
chunk_size = 400

# Overlap between chunks (tokens)
chunk_overlap = 80

[server]
# Enable HTTP server
enabled = true

# Port to listen on
port = 31327

# Bind address (127.0.0.1 for localhost only)
bind = "127.0.0.1"

[logging]
# Log level: trace, debug, info, warn, error
level = "info"

# Log file path
file = "~/.localgpt/logs/agent.log"