You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source of truth for SLM role definitions.
Update this document when adding, removing, or changing roles.
Role definitions in autobot-slm-backend/services/role_registry.py must match this document.
Role Concepts
SLM roles and Ansible roles are not the same thing:
Ansible role — a deployment unit that installs and configures a service on a host
SLM role — a logical fleet role tracked in the SLM registry, representing a service or group of services a node is responsible for
A single SLM role may be deployed by one or more Ansible roles. A node may run multiple SLM roles (e.g. .19 runs slm-backend, slm-frontend, slm-database, slm-monitoring by default).
Required vs optional:
required: true — fleet health is critical if no node has this role active
required: false — fleet health is degraded if no node has this role active, but the system can still function
Python dependencies (LlamaIndex, LangChain, etc.) that are installed via pip into a service's venv are not separate SLM roles. They are tracked as dependencies of the role that uses them.
nginx runs on most nodes as a reverse proxy. It is infrastructure-level and not a separate SLM role.
Role Conflicts
The following pairs of roles cannot run on the same node due to port collisions or hardware exclusivity.
Port Conflicts
Role A
Role B
Conflicting port
Reason
slm-backend
chromadb
8000
Both bind :8000 (uvicorn / ChromaDB HTTP)
slm-monitoring
browser-service
3000
Both bind :3000 (Grafana / Node.js Express)
autobot-llm-cpu
autobot-llm-gpu
11434
Both are Ollama — only one instance per node
slm-database
redis
5432
Both run PostgreSQL — only one pg cluster per node
Hardware Exclusivity
Role
Constraint
autobot-llm-gpu
Requires NVIDIA GPU. Cannot share GPU VRAM with npu-worker on the same node without careful resource partitioning — avoid co-locating.
npu-worker
Requires Intel NPU or NVIDIA GPU. Do not co-locate with autobot-llm-gpu unless hardware has sufficient separate VRAM/NPU units.
Implied Node Assignments
These conflicts drive the default fleet layout:
.19 — SLM stack only (slm-backend, slm-frontend, slm-database, slm-monitoring) — no user-facing services
.20 — Backend only (backend, celery, autobot-llm-gpu) — no SLM components
.23 — Databases only (redis, postgresql) — no application services
.24 — AI stack only (ai-stack, chromadb) — no SLM monitoring (Grafana port conflict)
.25 — Browser only (browser-service) — no SLM monitoring (Grafana port conflict)
node_exporter on all nodes :9100, redis_exporter :9121, SLM /api/metrics
Ansible playbook
deploy-monitoring.yml
Source path
— (binary install, no code sync)
Scrape interval
15 seconds
Retention
15 days or 10GB
Notes
Grafana embedded in SLM frontend via iframe. Anonymous access allowed. Hardware-specific collectors (IPMI, NVMe, SMART, Mellanox) installed conditionally based on detected hardware (see #1147).
backend
Field
Value
Description
Main AutoBot FastAPI backend — AI agent execution, knowledge management, chat, file processing
dist/ may be root-owned after Ansible deploy — fix: sudo chown -R autobot:autobot /opt/autobot/autobot-frontend/. Never npm run dev on production nodes.
npu-worker
Field
Value
Description
Intel NPU/GPU inference worker using OpenVINO — hardware-accelerated model inference
Always use from autobot_shared.redis_client import get_redis_client — never direct connection. PostgreSQL co-hosted here for backend user management; not needed in single_user deployment mode.
autobot_shared
Field
Value
Description
Shared Python library — Redis client, SSOT config, utilities used by all Python services
Default node
All nodes running Python services
Required
yes
Systemd service
— (library, no service)
Port
—
Install dir
/opt/autobot/autobot_shared
Python
3.12 (editable install into each service's venv)
Node.js
—
System packages
python3 python3-venv
External deps
—
Ansible playbook
deploy-shared.yml
Source path
autobot_shared/
Post-sync
pip install -e .
Notes
Must be deployed before any other Python service. Provides get_redis_client(), ssot_config, and shared utilities.
slm-agent
Field
Value
Description
Per-node agent — heartbeat to SLM manager, task polling, service monitoring, Prometheus metrics export
slm-agent + prometheus-node-exporter run on every node.
autobot_shared deployed to every node running a Python service.
tts-worker is portable — currently on .22, can move to .21 or any available node.
chromadb is portable — currently on .24, can co-locate with Redis on .23 or backend on .20.
When provisioning AutoBot from scratch, the following databases must be initialised
before services start. Ansible handles creation automatically via the postgresql
Ansible role, but this section documents what gets created where.
Backend user management (users, teams, orgs, API keys, audit)
Only active whenAUTOBOT_DEPLOYMENT_MODE != single_user.
Set AUTOBOT_DEPLOYMENT_MODE=single_company (or higher) to enable.
Schema applied by: alembic upgrade head inside the backend venv
Credentials file: /etc/autobot/db-credentials.env (prefix AUTOBOT_DB_)
SQLite on .20 — Backend Primary Storage
No setup required — aiosqlite creates the file on first startup.
File
Purpose
/var/lib/autobot/autobot.db
Conversations, knowledge, files, agent state
Redis on .23 — Key Namespace Reference
No schema setup — namespaces are managed by application code.
DB ID
Name
Used by
Contents
0
main + RediSearch
backend, ai-stack
App data, RediSearch/vector indexes (RediSearch requires db 0)
1
metrics
backend
Performance metrics, monitoring time series
2
prompts
backend
Prompt templates
3
agents
backend
Agent coordination, pub/sub
4
cache
backend
General cache
6
sessions
backend
User sessions, auth tokens
8
chat_history
backend
Chat conversation history
15
testing
test suites
Isolated test data
Celery (in celery_app.py): broker=db1, result_backend=db2
ChromaDB on .24 — Vector Persistence
No setup required — ChromaDB creates its own storage on first startup.