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.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.IssueLabelLink (issue_label_links)
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
Initialize Database Once
Initialize Database Once
For non-memory databases, call
init_db() once at application startup, not per request. The default in-memory SQLite creates tables automatically.Don't Mix Database URLs
Don't Mix Database URLs
The engine is cached globally - if you need to switch
DATABASE_URL values, call reset_engine() first to avoid connection pool conflicts.Keep SQLite for Development Only
Keep SQLite for Development Only
Use SQLite for development and testing, but switch to PostgreSQL for production workloads. SQLite doesn’t handle concurrent writes well in server environments.
Use Sessions Properly
Use Sessions Properly
Always use the
get_db dependency in FastAPI routes - it handles session lifecycle, commits, and rollbacks automatically. Don’t create sessions manually.Related
Workspaces
Manage teams and organize work
Issues
Track and manage work items
Agents
Deploy AI agents to workspaces
Authentication
User authentication and sessions

