Quick Start Guide¶
Get your AI chatbot with persistent memory running in 5 minutes!
1. Prerequisites Check¶
Make sure you have these installed:
# Check Python version (need 3.8+)
python3 --version
# Check if Ollama is installed
ollama --version
# Check installed models
ollama list
If you don't have Ollama or any model:
# Install Ollama from https://ollama.ai
# Then pull a model (qwen3:8b is the default):
ollama pull qwen3:8b
2. Setup Environment¶
# Navigate to project directory
cd local-agent-with-memory
# Create virtual environment
python3 -m venv venv
# Activate it
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
3. Choose Your Interface¶
Option A: Web Interface (Recommended)¶
Then open: http://localhost:7000
✨ You'll get: - Beautiful chat UI - Session sidebar - Search functionality - Mobile-friendly design
Option B: Command Line Interface¶
Interactive terminal chat with full memory.
Option C: Programmatic Usage¶
import sys
sys.path.insert(0, 'src')
from chatbot_agent import PersistentChatbot
chatbot = PersistentChatbot()
chatbot.start_new_session("My Chat")
response = chatbot.respond("Hello!")
print(response)
chatbot.close()
4. First Conversation¶
Try these to see the memory in action:
- "Hi, my name is Alice and I love Python programming"
- "What's my name?" → It remembers!
- "What language do I like?" → It recalls!
5. Exploring Features¶
Web Interface¶
- New Chat: Click "New Chat" button
- Switch Sessions: Click on any session in sidebar
- Switch Model: Use the model dropdown in the header to change the Ollama model per-message
- Search: Click search icon, type to find messages
- History: All messages automatically saved
CLI Interface¶
history- View conversation historysearch <term>- Search across all messagesquit- Exit (conversation is saved)
Common Tasks¶
Start Fresh Session¶
Search Old Conversations¶
Continue Previous Chat¶
Troubleshooting¶
"Connection refused" / Ollama not responding¶
"Module not found" errors¶
# Make sure virtual environment is activated
source venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txt
"Port 7000 already in use"¶
# Find and kill the process
lsof -i :7000
kill -9 <PID>
# Or change port in src/web_app.py (line 200)
Web interface not loading¶
# Check browser console (F12) for errors
# Make sure you're at http://localhost:7000 not https://
# Try a different browser
Testing¶
Verify Ollama integration:
Run the full example script:
This demonstrates basic conversation, session management, search, and memory persistence.
CLI Commands¶
When running the command line interface:
| Command | Action |
|---|---|
| (any text) | Chat with the bot |
history |
Display full conversation history |
search <query> |
Search messages across all sessions |
quit / exit |
End session |
Next Steps¶
- Web Interface guide — deployment, customization, API endpoints
- Sub-Agents docs — how real-time data fetching works
- Plugin Guide — create your own agents
- Reference — full API, database schema, extending with cloud providers