diff --git a/docs/development/workflows.mdx b/docs/development/workflows.mdx
new file mode 100644
index 0000000000..75de6e9562
--- /dev/null
+++ b/docs/development/workflows.mdx
@@ -0,0 +1,20 @@
+---
+title: "Workflows"
+description: The workflow automation system within AgentGPT.
+icon: "wave-sine"
+---
+
+A core function of Reworkd is AI powered workflow automation. This documentation covers key concepts within our workflow platform.
+
+## Frontend models
+The workflow hierarchy follows a graph-like structure. The frontend models only prescribe the front-end view of the workflow.
+
+- A workflow is the graph itself. It represents the workflow in its entirety
+- A node is a single element within a workflow. It has a position
+- An edge represents a connection between two nodes of a workflow
+
+## Backend models
+The backend models represent the mechanisms to actually perform work for a given node.
+Each frontend `Node` will have an associated `Block`.
+`Node` represents the frontend view / position while the `Block` represents what will actually happen when that `Node` is run.
+For example, a "SlackMessageBlock" is a `Block` that, when executed, would send a user a message on "Slack".
\ No newline at end of file
diff --git a/next/prisma/schema.prisma b/next/prisma/schema.prisma
index d24c78f6bc..5f35fadfb8 100644
--- a/next/prisma/schema.prisma
+++ b/next/prisma/schema.prisma
@@ -170,8 +170,21 @@ model WorkflowNode {
update_date DateTime? @updatedAt
delete_date DateTime?
- workflow Workflow @relation(fields: [workflow_id], references: [id], onDelete: Cascade)
+ workflow Workflow @relation(fields: [workflow_id], references: [id], onDelete: Cascade)
+ NodeBlock NodeBlock[]
@@unique([workflow_id, ref])
@@map("workflow_node")
}
+
+model NodeBlock {
+ id String @id @default(cuid())
+ workflow_node_id String
+
+ type String
+ input Json
+
+ workflow_node WorkflowNode @relation(fields: [workflow_node_id], references: [id], onDelete: Cascade)
+
+ @@map("node_block")
+}
diff --git a/next/prisma/useSqlite.sh b/next/prisma/useSqlite.sh
index 6c36e97953..a6c8fec0a3 100755
--- a/next/prisma/useSqlite.sh
+++ b/next/prisma/useSqlite.sh
@@ -5,4 +5,4 @@ cp schema.prisma schema.prisma.mysql
sed -ie 's/mysql/sqlite/g' schema.prisma
sed -ie 's/@db.Text//' schema.prisma
sed -ie 's/@db.VarChar([0-9]\{1,\})//' schema.prisma
-
+sed -ie 's/Json/String/g' schema.prisma
diff --git a/next/public/tools/web.png b/next/public/tools/web.png
new file mode 100644
index 0000000000..4082aa20c9
Binary files /dev/null and b/next/public/tools/web.png differ
diff --git a/next/src/components/drawer/WorkflowSidebar.tsx b/next/src/components/drawer/WorkflowSidebar.tsx
new file mode 100644
index 0000000000..d308b21f71
--- /dev/null
+++ b/next/src/components/drawer/WorkflowSidebar.tsx
@@ -0,0 +1,68 @@
+import type { DisplayProps } from "./Sidebar";
+import Sidebar from "./Sidebar";
+import React from "react";
+import { FaBars } from "react-icons/fa";
+import type { NodeBlockDefinition } from "../../services/workflow/node-block-definitions";
+import { getNodeBlockDefinitions } from "../../services/workflow/node-block-definitions";
+import type { createNodeType } from "../../hooks/useWorkflow";
+
+type WorkflowControls = {
+ createNode: createNodeType;
+};
+
+type WorkflowSidebarProps = DisplayProps & WorkflowControls;
+
+// Wrapper HOC to curry the createNode function
+export const getWorkflowSidebar = (createNode: createNodeType) => {
+ const WorkflowSidebarHOC = ({ show, setShow }: DisplayProps) => (
+
{definition.description}
+