CREATE TABLE `agent_items` ( `id` text PRIMARY KEY NOT NULL, `user_id` text NOT NULL, `conversation_id` text, `type` text NOT NULL, `title` text NOT NULL, `content` text, `done` integer DEFAULT false NOT NULL, `sort_order` integer DEFAULT 0 NOT NULL, `parent_id` text, `metadata` text, `created_at` text NOT NULL, `updated_at` text NOT NULL, FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade );