Quick Start
1
Pull the embedder
2
Local memory
3
Add local knowledge
Install the MongoDB extra first:
pip install "praisonaiagents[mongodb]". Chroma is the default local vector store and needs no extra service.How It Works
The sameembedder block drives memory and knowledge — embed, store, and query all stay on your machine.
The SDK now sizes the vector index at the model’s real dimension — nomic-embed-text is 768, not the 1536 default it was silently written as before PR #4802.
Choosing a Local Embedder
Pick by what matters most: speed, balance, or quality.Common Patterns
Local memory with a local LLM:Knowledge class:
Best Practices
Re-create the vector index when you change the embedder
Re-create the vector index when you change the embedder
Atlas vector indexes are built for a fixed dimension. Moving from
text-embedding-3-small (1536) to nomic-embed-text (768) means dropping and re-creating vector_index at the new size — otherwise writes succeed but searches error or return nothing.Pull the embedder before running
Pull the embedder before running
The first embed call fails cold if the model isn’t downloaded. Run
ollama pull nomic-embed-text before starting the agent.Set api_base when Ollama isn't on localhost
Set api_base when Ollama isn't on localhost
Ollama defaults to
http://localhost:11434. Point elsewhere by setting api_base explicitly on the embedder call or OLLAMA_HOST in the environment.Prefer the embedder block form
Prefer the embedder block form
The
{"provider": "...", "config": {"model": "..."}} block works identically across memory, knowledge, and the MongoDB adapters — reuse one dict everywhere.Related
MongoDB Memory
Configure the embedder on the MongoDB memory store
MongoDB Knowledge
Scoped, vector-searchable knowledge in MongoDB
Ollama Embeddings
Local embedding models and auto-detected dimensions
Local Models
Run the LLM side fully local

