ALTER TABLE agent_session
    ADD COLUMN IF NOT EXISTS tool_policy TEXT,
    ADD COLUMN IF NOT EXISTS knowledge_base_ids TEXT,
    ADD COLUMN IF NOT EXISTS variables TEXT,
    ADD COLUMN IF NOT EXISTS visibility TEXT NOT NULL DEFAULT 'private',
    ADD COLUMN IF NOT EXISTS version INTEGER NOT NULL DEFAULT 1,
    ADD COLUMN IF NOT EXISTS published_at TIMESTAMPTZ,
    ADD COLUMN IF NOT EXISTS rollback_from_version INTEGER;
