CREATE TABLE IF NOT EXISTS agent_message (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    conversation UUID NOT NULL,
    parent UUID,
    role TEXT NOT NULL,
    author UUID,
    content TEXT NOT NULL,
    content_type TEXT NOT NULL DEFAULT 'text',
    status TEXT NOT NULL DEFAULT 'sent',
    model_invocation UUID,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    deleted_at TIMESTAMPTZ
);
