Features

  • 100% offline - No internet connection required
  • Privacy-first - Data never leaves your machine
  • No API keys - Zero configuration needed
  • Multimodal - Text, embeddings, vision, and speech

Installation

elizaos plugins add @elizaos/plugin-local-ai

Automatic Activation

Local AI serves as the ultimate fallback when no cloud providers are configured:

// Automatically loads when these are not set:
// - GOOGLE_GENERATIVE_AI_API_KEY
// - OLLAMA_API_ENDPOINT  
// - OPENAI_API_KEY

Configuration

Environment Variables

# Optional configuration
LOCAL_AI_MODEL_PATH=/path/to/models
LOCAL_AI_THREADS=4
LOCAL_AI_CONTEXT_SIZE=4096

Character Configuration

{
  "name": "MyAgent",
  "plugins": ["@elizaos/plugin-local-ai"]
}

Supported Operations

OperationTechnologyNotes
TEXT_GENERATIONllama.cppVarious model sizes
EMBEDDINGLocal transformersSentence embeddings
VISIONLocal vision modelsImage description
SPEECHWhisper + TTSTranscription & synthesis

Model Management

The plugin automatically downloads required models on first use:

// Models are cached in:
// ~/.eliza/models/

Available Models

Text Generation

  • Small: 1-3B parameter models
  • Medium: 7B parameter models
  • Large: 13B+ parameter models

Embeddings

  • Sentence transformers
  • MiniLM variants

Vision

  • BLIP for image captioning
  • CLIP for image understanding

Performance Optimization

CPU Optimization

# Use more threads
LOCAL_AI_THREADS=8

# Enable AVX2 (if supported)
LOCAL_AI_USE_AVX2=true

Memory Management

# Limit context size
LOCAL_AI_CONTEXT_SIZE=2048

# Use quantized models
LOCAL_AI_QUANTIZATION=q4_0

Hardware Requirements

FeatureMinimum RAMRecommended
Text (Small)4GB8GB
Text (Medium)8GB16GB
Embeddings2GB4GB
Vision4GB8GB
All Features16GB32GB

Common Use Cases

1. Development Environment

{
  "plugins": ["@elizaos/plugin-local-ai"],
  "settings": {
    "local_ai": {
      "model_size": "small",
      "fast_mode": true
    }
  }
}

2. Privacy-Critical Applications

{
  "plugins": ["@elizaos/plugin-local-ai"],
  "settings": {
    "local_ai": {
      "model_size": "large",
      "disable_telemetry": true
    }
  }
}

3. Offline Deployment

{
  "plugins": ["@elizaos/plugin-local-ai"],
  "settings": {
    "local_ai": {
      "preload_models": true,
      "cache_responses": true
    }
  }
}

Limitations

  • Slower than cloud APIs
  • Limited model selection
  • Higher memory usage
  • CPU-bound performance

Troubleshooting

Model Download Issues

# Clear model cache
rm -rf ~/.eliza/models/

# Download models manually
eliza download-models

Performance Issues

  1. Use smaller models
  2. Enable quantization
  3. Reduce context size
  4. Add more RAM/CPU

External Resources