AI Agents in Retool

@qinfeng I've attached the app and the workflow that powers it. You'll need to import both into your instance of Retool. You'll also need to create 3 database tables to make it work, which you can do by running the following against your Retool DB:

CREATE SEQUENCE reagent_messages_id_seq;
CREATE SEQUENCE reagent_steps_id_seq;
CREATE SEQUENCE reagent_threads_id_seq;

-- Create the tables
CREATE TABLE reagent_messages (
    id INTEGER NOT NULL DEFAULT nextval('reagent_messages_id_seq'::regclass),
    created TIMESTAMP WITH TIME ZONE DEFAULT now(),
    message_text TEXT,
    message_type TEXT,
    thread_id INTEGER,
    complete BOOLEAN DEFAULT FALSE
);

CREATE TABLE reagent_steps (
    id INTEGER NOT NULL DEFAULT nextval('reagent_steps_id_seq'::regclass),
    message_id INTEGER,
    step JSONB,
    artifact JSONB DEFAULT '{}'::jsonb
);

CREATE TABLE reagent_threads (
    id INTEGER NOT NULL DEFAULT nextval('reagent_threads_id_seq'::regclass),
    uuid UUID NOT NULL DEFAULT gen_random_uuid(),
    owner_email TEXT,
    created TIMESTAMP WITH TIME ZONE DEFAULT now(),
    title TEXT
);

[Reagent] Orchestrator - copy for sharing.json (159.1 KB)

Reagent (2).json (87.1 KB)

5 Likes