Features: - Multi-platform bot (Slack, Telegram) - Memory system with SQLite FTS - Tool use capabilities (file ops, commands) - Scheduled tasks system - Dynamic model switching (/sonnet, /haiku) - Prompt caching for cost optimization Optimizations: - Default to Haiku 4.5 (12x cheaper) - Reduced context: 3 messages, 2 memory results - Optimized SOUL.md (48% smaller) - Automatic caching when using Sonnet (90% savings) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
4.5 KiB
4.5 KiB
Windows 11 Quick Reference
Quick command reference for testing and running Ajarbot on Windows 11.
First Time Setup (5 Minutes)
# Step 1: Navigate to project
cd c:\Users\fam1n\projects\ajarbot
# Step 2: Run automated setup
quick_start.bat
# Step 3: Set API key (if prompted)
# Get your key from: https://console.anthropic.com/
# Step 4: Verify installation
python test_installation.py
Test Examples (Choose One)
Option 1: Basic Agent Test
python example_usage.py
What it does: Tests basic chat and memory
Option 2: Pulse & Brain Monitoring
python example_bot_with_pulse_brain.py
What it does: Runs cost-effective monitoring
To stop: Press Ctrl+C
Option 3: Task Scheduler
python example_bot_with_scheduler.py
What it does: Shows scheduled task execution
To stop: Press Ctrl+C
Option 4: Multi-Platform Bot
# Generate config file
python bot_runner.py --init
# Edit config (add Slack/Telegram tokens)
notepad config\adapters.local.yaml
# Run bot
python bot_runner.py
To stop: Press Ctrl+C
Daily Commands
Activate Virtual Environment
cd c:\Users\fam1n\projects\ajarbot
.\venv\Scripts\activate
Start Bot
python bot_runner.py
Check Health
python bot_runner.py --health
View Logs
type logs\bot.log
Update Dependencies
pip install -r requirements.txt --upgrade
API Key Management
Set for Current Session
$env:ANTHROPIC_API_KEY = "sk-ant-your-key-here"
Set Permanently (System)
- Press
Win + X - Click "System"
- Click "Advanced system settings"
- Click "Environment Variables"
- Under "User variables", click "New"
- Variable:
ANTHROPIC_API_KEY - Value:
sk-ant-your-key-here
Check if Set
$env:ANTHROPIC_API_KEY
Running as Service
Quick Background Run
Start-Process python -ArgumentList "bot_runner.py" -WindowStyle Hidden
Stop Background Process
# Find process
Get-Process python | Where-Object {$_.CommandLine -like "*bot_runner*"}
# Stop it (replace <PID> with actual process ID)
Stop-Process -Id <PID>
Troubleshooting
"Python not recognized"
# Add to PATH
# Win + X -> System -> Advanced -> Environment Variables
# Edit PATH, add: C:\Users\fam1n\AppData\Local\Programs\Python\Python3XX
"Module not found"
.\venv\Scripts\activate
pip install -r requirements.txt --force-reinstall
"API key not found"
$env:ANTHROPIC_API_KEY = "sk-ant-your-key-here"
Reset Memory
Remove-Item -Recurse -Force memory_workspace
python example_usage.py
Project Files Quick Reference
| File/Folder | Purpose |
|---|---|
agent.py |
Main agent logic |
bot_runner.py |
Multi-platform bot launcher |
pulse_brain.py |
Monitoring system |
example_*.py |
Example scripts to test |
test_*.py |
Test scripts |
config/ |
Configuration files |
docs/ |
Full documentation |
adapters/ |
Platform integrations |
memory_workspace/ |
Memory database |
Need More Help?
- Full Windows Guide: docs/WINDOWS_DEPLOYMENT.md
- Main Documentation: docs/README.md
- Project Overview: README.md
Common Workflows
Development Testing
# Activate environment
.\venv\Scripts\activate
# Make changes to code
# ...
# Test changes
python test_installation.py
python example_usage.py
# Format code (optional)
pip install black
black .
Production Deployment
# 1. Configure adapters
python bot_runner.py --init
notepad config\adapters.local.yaml
# 2. Test locally
python bot_runner.py
# 3. Set up as service (see docs/WINDOWS_DEPLOYMENT.md)
# Option A: NSSM (recommended)
# Option B: Task Scheduler
# Option C: Startup script
Monitoring Costs
# In Python script or interactive shell
from pulse_brain import PulseBrain
from agent import Agent
agent = Agent(provider="claude", enable_heartbeat=False)
pb = PulseBrain(agent)
# After running for a while
status = pb.get_status()
tokens = status['brain_invocations'] * 1000 # Average tokens
cost = tokens * 0.000003 # Claude pricing
print(f"Estimated cost: ${cost:.4f}")
Quick Start Path:
- Run
quick_start.bat - Set API key
- Run
python test_installation.py - Run
python example_usage.py - Explore other examples!