Snippbot uses SQLite for all persistence. Each subsystem has its own database file to avoid schema conflicts and allow independent migration.
File Path Contents main.db~/.snippbot/main.dbAgents, projects, tasks, chat history scheduler.db~/.snippbot/scheduler.dbJobs, runs, chains, activity patterns workflows.db~/.snippbot/workflows.dbWorkflow definitions, runs, templates hooks.db~/.snippbot/hooks.dbHooks, deliveries, webhook endpoints channels.db~/.snippbot/channels.dbPlatform credentials, bindings, access rules skills.db~/.snippbot/skills.dbTool registry, MCP server configs devices.db~/.snippbot/devices.dbDevice registrations, execution history memory_{agent_id}.db~/.snippbot/agents/{id}/Episodic memory, knowledge graph
| profile_settings.db | ~/.snippbot/profile_settings.db | User profile (display name, theme, avatar) |
Database migrations run automatically on daemon startup. Each database file has a schema_version table tracking the applied migration version.
If a migration fails, the daemon logs the error and exits. To diagnose:
tail -50 ~/.snippbot/logs/daemon.log | grep -i migrat
Pre-upgrade backups are saved automatically to ~/.snippbot/backups/ before each migration.
The runtime roster of agents. This table is not the canonical agent
definition: an agent’s identity (name, handle, bio, expertise) is a synced
projection of its workspace IDENTITY.md, refreshed by agent_sync on startup;
only the runtime-customization columns (preferred model, avatar, custom system
prompt, tool profile) are owned here. The canonical definition lives in the
workspace files (IDENTITY.md + companions). A marketplace install also drops an
agent.json provenance backlink in the agent’s directory — that file is not a
definition source and is not read at runtime.
Column Type Description idTEXT PK UUID nameTEXT Display name archetypeTEXT One of 10 archetypes modelTEXT LLM model ID system_promptTEXT Custom instructions tools_configTEXT JSON — enabled tools memory_configTEXT JSON — memory settings trust_scoreREAL 0.0–1.0 created_atTEXT ISO 8601 updated_atTEXT ISO 8601
Column Type Description idTEXT PK UUID nameTEXT Project name goalTEXT High-level goal statusTEXT pending, planning, in_progress, paused, completed, failedagent_idTEXT FK Assigned agent execution_strategyTEXT sequential, parallel, dagcreated_atTEXT ISO 8601
Column Type Description idTEXT PK UUID project_idTEXT FK Parent project titleTEXT Task title descriptionTEXT Detailed description statusTEXT pending, running, completed, failed, skippeddepends_onTEXT JSON array of task IDs resultTEXT Task output errorTEXT Error message if failed started_atTEXT ISO 8601 completed_atTEXT ISO 8601
Column Type Description idTEXT PK UUID nameTEXT Job name goalTEXT Agent goal agent_idTEXT FK Executing agent schedule_configTEXT JSON — type, expression, timezone delivery_configTEXT JSON — channel, format retry_configTEXT JSON — attempts, strategy condition_configTEXT JSON — condition type, expression statusTEXT active, paused, completed, failedrun_countINTEGER Total runs next_run_atTEXT Next scheduled time last_run_atTEXT Last execution time
Column Type Description idTEXT PK UUID job_idTEXT FK Parent job statusTEXT running, completed, failed, cancelledtrigger_timeTEXT When the job was supposed to fire started_atTEXT Actual start time completed_atTEXT End time outputTEXT Agent result errorTEXT Error if failed attemptINTEGER Retry attempt number
Column Type Description platformTEXT PK Platform ID (slack, discord, etc.) encrypted_dataBLOB Fernet-encrypted JSON of credentials previewTEXT Masked preview for display created_atTEXT ISO 8601 updated_atTEXT ISO 8601
Column Type Description idTEXT PK UUID platformTEXT Platform ID channel_idTEXT Platform channel ID channel_nameTEXT Display name agent_idTEXT FK Bound agent access_modeTEXT open, allowlist, admin_onlyenabledINTEGER 1 = active
Column Type Description idTEXT PK UUID nameTEXT Hook name eventTEXT Event type to subscribe to typeTEXT webhook, script, announcement, chainconfigTEXT JSON — URL, secret, code, etc. conditionTEXT Optional filter expression enabledINTEGER 1 = active
Column Type Description idTEXT PK UUID hook_idTEXT FK Parent hook event_typeTEXT Event that triggered statusTEXT success, failed, pendingattemptINTEGER Attempt number response_codeINTEGER HTTP status (for webhooks) latency_msINTEGER Round-trip time delivered_atTEXT ISO 8601
All databases use these pragmas for performance and safety:
PRAGMA journal_mode = WAL; -- Write-ahead logging for concurrent reads
PRAGMA synchronous = NORMAL; -- Balance safety and performance
PRAGMA foreign_keys = ON ; -- Enforce referential integrity
PRAGMA cache_size = - 64000 ; -- 64 MB cache
snippbot reset --list-backups
snippbot reset --restore pre-upgrade-2026-03-01
Automatic backups are created before each migration and can also be scheduled via a cron job pointing to ~/.snippbot/.