Files
Codewalkers/drizzle/0024_add_conversations.sql
Lukas May a6371e156a feat: Add inter-agent conversation system (listen, ask, answer)
Enables parallel agents to communicate through a CLI-based conversation
mechanism coordinated via tRPC. Agents can ask questions to peers and
receive answers, with target resolution by agent ID, task ID, or phase ID.
2026-02-10 13:43:30 +01:00

19 lines
819 B
SQL

-- Inter-agent conversations
CREATE TABLE `conversations` (
`id` text PRIMARY KEY NOT NULL,
`from_agent_id` text NOT NULL REFERENCES `agents`(`id`) ON DELETE CASCADE,
`to_agent_id` text NOT NULL REFERENCES `agents`(`id`) ON DELETE CASCADE,
`initiative_id` text REFERENCES `initiatives`(`id`) ON DELETE SET NULL,
`phase_id` text REFERENCES `phases`(`id`) ON DELETE SET NULL,
`task_id` text REFERENCES `tasks`(`id`) ON DELETE SET NULL,
`question` text NOT NULL,
`answer` text,
`status` text DEFAULT 'pending' NOT NULL,
`created_at` integer NOT NULL,
`updated_at` integer NOT NULL
);
--> statement-breakpoint
CREATE INDEX `conversations_to_agent_status_idx` ON `conversations` (`to_agent_id`, `status`);
--> statement-breakpoint
CREATE INDEX `conversations_from_agent_idx` ON `conversations` (`from_agent_id`);