Database Schema
Overview of the 27 SQLite tables in AgentDesk.
AgentDesk uses SQLite with Drizzle ORM. The database lives at ~/.agent-desk/data.db.
Tables by Category
Authentication
| Table | Purpose |
|---|
users | Human accounts (email, password hash, role) |
auth_sessions | Login session tokens, scoped to user |
invites | Time-limited invite tokens for registration |
Access Control
| Table | Purpose |
|---|
project_members | User ↔ project membership with roles |
agent_access | Per-user permissions for each agent |
Projects
| Table | Purpose |
|---|
projects | Project records (name, slug, mission, status) |
app_config | Single-row-per-key global settings |
Tasks
| Table | Purpose |
|---|
tasks | Work items (title, status, priority, assignee, paused flag) |
subtasks | Checklist items nested under tasks |
tags | Label taxonomy with colors, optionally project-scoped |
task_tags | Many-to-many: tasks ↔ tags |
comments | Markdown comments with reply threads |
mentions | Extracted @mention targets from comments |
activities | Audit log of all board actions |
taskContexts | Context files attached to tasks |
Agents
| Table | Purpose |
|---|
agents | Agent configs (id, role, model, provider, paused flag, session ID) |
agentRuns | Dispatcher run history — one row per turn |
Scheduling
| Table | Purpose |
|---|
ccCrons | Scheduled jobs (cron/interval/one-shot) |
ccCronRuns | Job run history (status, duration, error) |
cronLinks | Links jobs to projects for the Schedule page |
cronContexts | Context files attached to jobs |
ccChatTabs | Side chat sessions per agent |
Providers
| Table | Purpose |
|---|
providers | LLM provider configs (type, URL, encrypted credential, model) |
Integrations
| Table | Purpose |
|---|
telegramConfig | Telegram bot configuration |
telegramLinkCodes | One-time Telegram account linking codes |
telegramLinks | User ↔ Telegram chat mapping |
notionConnections | Per-user Notion tokens (AES-256-GCM encrypted) |
Backup
To back up AgentDesk, copy the database file:
$ cp ~/.agent-desk/data.db ~/.agent-desk/data.db.backup
SQLite’s WAL mode ensures consistent reads even while the server is running.