CREATE TABLE IF NOT EXISTS agent_long_term_memory (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    session UUID NOT NULL,
    key TEXT NOT NULL,
    value TEXT NOT NULL,
    importance INTEGER NOT NULL DEFAULT 0,
    last_used_at TIMESTAMPTZ,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    deleted_at TIMESTAMPTZ
);
