Daneel
XMPP research bot named after R. Daneel Olivaw from Isaac Asimov’s Robot/Foundation series.
Features
- Multi-provider LLM support (Anthropic, Google, OpenAI, Ollama, Groq, Mistral)
- Model selection via message prefixes (
opus:, gemini:, llama:, etc.)
- Per-user session persistence (JSONL)
- Tool calling for research, org-mode saving, and system status
- NixOS service module
Quick Start
# Install dependencies
npm install
# Build
npm run build
# Run (with environment variables)
DANEEL_XMPP_JID="bot@xmpp.example.com" \
DANEEL_XMPP_PASSWORD="password" \
DANEEL_OWNER_JID="owner@xmpp.example.com" \
ANTHROPIC_API_KEY="sk-..." \
npm start
Environment Variables
Required
| Variable |
Description |
DANEEL_XMPP_JID |
Bot’s XMPP JID |
DANEEL_XMPP_PASSWORD |
Bot’s XMPP password |
DANEEL_OWNER_JID |
Owner’s JID (only this user can interact) |
Optional
| Variable |
Description |
Default |
DANEEL_DATA_DIR |
Session storage directory |
./data |
DANEEL_INBOX_PATH |
Org-mode inbox path |
~/org/inbox.org |
DANEEL_DEFAULT_MODEL |
Default model alias |
sonnet |
DANEEL_DEBUG |
Enable debug logging |
false |
Provider API Keys
| Variable |
Provider |
ANTHROPIC_API_KEY |
Anthropic (Claude) |
GOOGLE_API_KEY |
Google (Gemini) |
OPENAI_API_KEY |
OpenAI (GPT-4) |
GITHUB_TOKEN |
GitHub Copilot |
OLLAMA_BASE_URL |
Ollama (local) |
GROQ_API_KEY |
Groq |
MISTRAL_API_KEY |
Mistral |
OPENROUTER_API_KEY |
OpenRouter |
Usage
Commands
/help - Show help message
/ping - Check if bot is alive
/status - Show system status
/clear - Clear conversation history
/models - List available models
/stats - Show session statistics
Model Prefixes
Prefix your message to use a specific model:
opus: What is quantum entanglement?
gemini: Summarize the latest AI news
llama: Explain this concept simply
Available Prefixes
| Prefix |
Provider |
Model |
opus:, o: |
Anthropic |
Claude Opus 4.5 |
sonnet:, s: |
Anthropic |
Claude Sonnet 4.5 |
haiku:, h: |
Anthropic |
Claude Haiku |
gemini:, g: |
Google |
Gemini 2.0 Flash |
gemini-pro:, gp: |
Google |
Gemini 2.5 Pro |
gpt:, gpt4: |
OpenAI |
GPT-4o |
o1: |
OpenAI |
O1 |
o3: |
OpenAI |
O3 Mini |
copilot:, cp: |
GitHub |
GPT-4o via Copilot |
copilot-claude: |
GitHub |
Claude via Copilot |
ollama:, llama: |
Ollama |
Llama 3.2 |
qwen: |
Ollama |
Qwen 2.5 |
deepseek: |
Ollama |
DeepSeek R1 |
groq: |
Groq |
Llama 3.3 70B |
mistral: |
Mistral |
Mistral Large |
NixOS Integration
{
imports = [ ./path/to/daneel/nix/module.nix ];
services.daneel = {
enable = true;
xmppJid = "daneel@xmpp.example.com";
xmppPasswordFile = config.age.secrets.daneel-xmpp.path;
ownerJid = "owner@xmpp.example.com";
anthropicApiKeyFile = config.age.secrets.anthropic-api.path;
};
}
Architecture
┌─────────────────────────────────────────────────────────┐
│ Daneel │
├─────────────────────────────────────────────────────────┤
│ @xmpp/client → SessionManager → AgentRunner │
│ │ (per-JID) (LLM provider) │
│ ↓ ↓ ↓ │
│ Message Router → context.jsonl → Tool Execution │
│ │
│ Tools: research, save_to_org, status, web_search │
│ LLMs: Claude, Gemini, GPT-4, Llama, etc. │
└─────────────────────────────────────────────────────────┘
License
Apache-2.0