Skip to main content
Every workspace, issue, agent, and comment you create is stored in these tables.
Updated for PraisonAI Platform PR #1591: issues support parent_issue_id, workspace-scoped number/identifier, and kanban position; comments support parent_id threading; projects use title, icon, status (default planned), and lead_type/lead_id; agents use owner_type/owner_id, runtime_mode/runtime_config, and default status offline.
Every workspace, issue, agent, and comment you create is stored in these tables.
The user maps product concepts to tables; workspaces contain projects, issues, agents, and comments.

Quick Start

1

Zero Configuration (Default)

2

Persistent SQLite

3

PostgreSQL Production


How It Works


Entities

User (users)

Authentication and identity for platform access.

Workspace (workspaces)

Top-level container for organizing projects and issues.

Member (members)

User membership and roles within workspaces. Constraints: Unique (user_id, workspace_id)

Project (projects)

Optional grouping for issues within a workspace.

Issue (issues)

Work items and tasks within a workspace.

Comment (comments)

Discussion threads on issues.

Agent (agents)

AI agents assigned to workspaces.

IssueLabel (issue_labels)

Label definitions for categorizing issues. Many-to-many relationship between issues and labels. Constraints: Unique (issue_id, label_id)

IssueDependency (issue_dependencies)

Dependency relationships between issues. Constraints: Unique (issue_id, depends_on_id, dependency_type)

ActivityLog (activity_logs)

Audit trail for workspace activities.

Configuration Options


Common Patterns

Running One-Off Queries

Switching to PostgreSQL in Production

Resetting Engine in Tests


Best Practices

For non-memory databases, call init_db() once at application startup, not per request. The default in-memory SQLite creates tables automatically.
The engine is cached globally - if you need to switch DATABASE_URL values, call reset_engine() first to avoid connection pool conflicts.
Use SQLite for development and testing, but switch to PostgreSQL for production workloads. SQLite doesn’t handle concurrent writes well in server environments.
Always use the get_db dependency in FastAPI routes - it handles session lifecycle, commits, and rollbacks automatically. Don’t create sessions manually.

Workspaces

Manage teams and organize work

Issues

Track and manage work items

Agents

Deploy AI agents to workspaces

Authentication

User authentication and sessions