Setting Up Ollama for Local AI
Ollama provides local AI inference without cloud dependencies. Asta uses Ollama for:- RAG embeddings with
nomic-embed-text - Local chat with models like
llama3,mistral, orqwen - Privacy-focused workflows that keep data on your machine
Install Ollama
Download and install Ollama from ollama.commacOS/Linux:Windows:
Download the installer from ollama.com/downloadVerify installation:
Pull the RAG embedding model
Asta’s Learning skill requires This model is lightweight (~274 MB) and optimized for embeddings.
nomic-embed-text for semantic search:Start Ollama server
Ollama runs as a background service. Start it with:Or launch the Ollama app. The API runs at
http://localhost:11434 by default.On macOS, Ollama starts automatically when you pull a model or run
ollama serve.Pull a chat model (optional)
Quick Setup Script
Asta includes a setup script that installs Ollama (Linux/macOS) and pulls the RAG model:- Installs Ollama via
curl | sh(Linux/macOS only) - Pulls
nomic-embed-text - Verifies the installation
~/workspace/source/scripts/setup_ollama_rag.sh
Configuration
Environment Variables
Set these in.env or Settings:
Testing RAG
Once configured, test the Learning skill:- Research the topic via web search
- Generate embeddings with
nomic-embed-text - Store knowledge in ChromaDB for retrieval
Troubleshooting
Ollama not found in PATH
Ollama not found in PATH
After installation, restart your terminal or add Ollama to PATH:On macOS, Ollama installs to
/usr/local/bin by default.Connection refused at localhost:11434
Connection refused at localhost:11434
Ensure Ollama is running:Or launch the Ollama app from your Applications folder.
Model not found error
Model not found error
Verify the model is pulled:If missing, pull it:
RAG embeddings not working
RAG embeddings not working
Check these steps:
nomic-embed-textis pulled:ollama list- Ollama is running:
curl http://localhost:11434/api/tags - Environment variable is set:
echo $ASTAMISTRA L_OLLAMA_EMBEDDING_MODEL
Model Recommendations
| Model | Size | Use Case |
|---|---|---|
nomic-embed-text | 274 MB | RAG embeddings (required) |
llama3.2:3b | 4 GB | Fast chat, low memory |
mistral | 7 GB | Balanced quality/speed |
qwen2.5:7b | 7 GB | Excellent for coding |
llama3.1:70b | 40 GB | Advanced reasoning (requires 64GB+ RAM) |
Next Steps
- Creating Skills - Build custom workspace skills
- Telegram Bot Setup - Connect Asta to Telegram
- RAG Learning - Deep dive into the Learning skill