Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Add support for nextjs based app (#7266)

Aarushidd960f9306e1
diff --git a/.gitignore b/.gitignore
index 3b4050b42e..d23d09da8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -162,7 +162,7 @@ agbenchmark/reports/
# Nodejs
package-lock.json
-package.json
+
# Allow for locally private items
# private
diff --git a/rnd/autogpt_builder/.eslintrc.json b/rnd/autogpt_builder/.eslintrc.json
new file mode 100644
index 0000000000..bffb357a71
--- /dev/null
+++ b/rnd/autogpt_builder/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "next/core-web-vitals"
+}
diff --git a/rnd/autogpt_builder/.gitignore b/rnd/autogpt_builder/.gitignore
new file mode 100644
index 0000000000..fd3dbb571a
--- /dev/null
+++ b/rnd/autogpt_builder/.gitignore
@@ -0,0 +1,36 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+.yarn/install-state.gz
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+
+# misc
+.DS_Store
+*.pem
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# local env files
+.env*.local
+
+# vercel
+.vercel
+
+# typescript
+*.tsbuildinfo
+next-env.d.ts
diff --git a/rnd/autogpt_builder/README.md b/rnd/autogpt_builder/README.md
new file mode 100644
index 0000000000..5aa16c6781
--- /dev/null
+++ b/rnd/autogpt_builder/README.md
@@ -0,0 +1,25 @@
+This is the frontend for AutoGPT's next generation
+
+## Getting Started
+
+First, run the development server:
+
+```bash
+npm run dev
+# or
+yarn dev
+# or
+pnpm dev
+# or
+bun dev
+```
+
+Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+
+You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+
+This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
+
+## Deploy
+
+TODO
\ No newline at end of file
diff --git a/rnd/autogpt_builder/next.config.mjs b/rnd/autogpt_builder/next.config.mjs
new file mode 100644
index 0000000000..4678774e6d
--- /dev/null
+++ b/rnd/autogpt_builder/next.config.mjs
@@ -0,0 +1,4 @@
+/** @type {import('next').NextConfig} */
+const nextConfig = {};
+
+export default nextConfig;
diff --git a/rnd/autogpt_builder/package.json b/rnd/autogpt_builder/package.json
new file mode 100644
index 0000000000..67b793bbad
--- /dev/null
+++ b/rnd/autogpt_builder/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "autogpt_builder",
+ "version": "0.1.0",
+ "private": true,
+ "scripts": {
+ "dev": "next dev",
+ "build": "next build",
+ "start": "next start",
+ "lint": "next lint"
+ },
+ "dependencies": {
+ "react": "^18",
+ "react-dom": "^18",
+ "next": "14.2.4"
+ },
+ "devDependencies": {
+ "typescript": "^5",
+ "@types/node": "^20",
+ "@types/react": "^18",
+ "@types/react-dom": "^18",
+ "postcss": "^8",
+ "tailwindcss": "^3.4.1",
+ "eslint": "^8",
+ "eslint-config-next": "14.2.4"
+ }
+}
diff --git a/rnd/autogpt_builder/postcss.config.mjs b/rnd/autogpt_builder/postcss.config.mjs
new file mode 100644
index 0000000000..1a69fd2a45
--- /dev/null
+++ b/rnd/autogpt_builder/postcss.config.mjs
@@ -0,0 +1,8 @@
+/** @type {import('postcss-load-config').Config} */
+const config = {
+ plugins: {
+ tailwindcss: {},
+ },
+};
+
+export default config;
diff --git a/rnd/autogpt_builder/public/autogpt.svg b/rnd/autogpt_builder/public/autogpt.svg
new file mode 100644
index 0000000000..3f322e4d3a
--- /dev/null
+++ b/rnd/autogpt_builder/public/autogpt.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="AUTOgpt_logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
+ y="0px" viewBox="0 0 2000 2000" style="enable-background:new 0 0 2000 2000;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill:url(#SVGID_1_);}
+ .st1{fill:url(#SVGID_00000044859330063917736280000017916509329539228544_);}
+ .st2{fill:url(#SVGID_00000140714777961496567230000017473346511890493859_);}
+ .st3{fill:url(#SVGID_00000016043459524955834950000015278934287808704695_);}
+ .st4{fill:url(#SVGID_00000133526441615091004900000013561443639704575621_);}
+ .st5{fill:#000030;}
+ .st6{fill:#669CF6;}
+</style>
+<g>
+
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="17241.2793" y1="15058.8164" x2="17241.2793" y2="16623.8047" gradientTransform="matrix(7.200000e-02 0 0 7.200000e-02 0.928 1.072)">
+ <stop offset="0" style="stop-color:#000030"/>
+ <stop offset="1" style="stop-color:#9900FF"/>
+ </linearGradient>
+ <path class="st0" d="M1216.7,1078.8v86.8c0,6.4-5.2,11.6-11.6,11.6c-6.9,0-12.6-4.4-12.6-11.6V1036c0-27.5,22.3-49.8,49.8-49.8
+ s49.8,22.3,49.8,49.8c0,27.5-22.3,49.8-49.8,49.8C1233,1085.8,1224.2,1083.2,1216.7,1078.8L1216.7,1078.8z M1226.9,1020.6
+ c8.5,0,15.4,6.9,15.4,15.4s-6.9,15.4-15.4,15.4c-1.6,0-3.1-0.2-4.5-0.7c4.5,6.1,11.8,10.1,19.9,10.1c13.7,0,24.8-11.1,24.8-24.8
+ s-11.1-24.8-24.8-24.8c-8.2,0-15.4,4-19.9,10.1C1223.8,1020.9,1225.3,1020.6,1226.9,1020.6L1226.9,1020.6z"/>
+
+ <linearGradient id="SVGID_00000085938981603410528570000012380000869662973629_" gradientUnits="userSpaceOnUse" x1="15312.8066" y1="15057.3965" x2="15312.8066" y2="16624.1172" gradientTransform="matrix(7.200000e-02 0 0 7.200000e-02 0.928 1.072)">
+ <stop offset="0" style="stop-color:#000030"/>
+ <stop offset="1" style="stop-color:#4285F4"/>
+ </linearGradient>
+ <path style="fill:url(#SVGID_00000085938981603410528570000012380000869662973629_);" d="M1154.5,1078.8v55.8c0,5.1-2.1,9.7-5.4,13
+ c-7.3,7.3-20.9,7.3-28.2,0c-9.6-9.6-0.5-25.9-17.7-43.1c-16.7-16.7-45.8-16.7-62.5,0c-7.7,7.7-12.5,18.4-12.5,30.1
+ c0,6.4,5.2,11.6,11.6,11.6c6.9,0,12.6-4.4,12.6-11.6c0-5.1,2.1-9.7,5.4-13c7.3-7.3,20.9-7.3,28.2,0c10.5,10.5-0.1,25.3,17.7,43.1
+ c16.7,16.7,45.8,16.7,62.5,0c7.7-7.7,12.5-18.4,12.5-30.1v-98.2v-0.3c0-27.5-22.3-49.8-49.8-49.8c-27.5,0-49.8,22.3-49.8,49.8
+ c0,27.5,22.3,49.8,49.8,49.8C1138.3,1085.8,1147,1083.2,1154.5,1078.8z M1128.9,1060.8c-8.2,0-15.4-4-19.9-10.1
+ c1.4,0.4,3,0.7,4.5,0.7c8.5,0,15.4-6.9,15.4-15.4s-6.9-15.4-15.4-15.4c-1.6,0-3.1,0.2-4.5,0.7c4.5-6.1,11.8-10.1,19.9-10.1
+ c13.7,0,24.8,11.1,24.8,24.8C1153.7,1049.7,1142.6,1060.8,1128.9,1060.8L1128.9,1060.8z"/>
+
+ <linearGradient id="SVGID_00000127739374497564837560000013534033995177318078_" gradientUnits="userSpaceOnUse" x1="18088.9141" y1="13182.8672" x2="15383.333" y2="11899.5996" gradientTransform="matrix(7.200000e-02 0 0 7.200000e-02 0.928 1.072)">
+ <stop offset="0" style="stop-color:#4285F4"/>
+ <stop offset="1" style="stop-color:#9900FF"/>
+ </linearGradient>
+ <path style="fill:url(#SVGID_00000127739374497564837560000013534033995177318078_);" d="M1328.4,937.5c0-30.6-12.2-59.7-33.8-81.3
+ c-21.6-21.6-50.7-33.8-81.3-33.8c-30.6,0-59.7,12.2-81.3,33.8c-21.6,21.6-33.8,50.7-33.8,81.3v5.2c0,6.7,5.4,12.1,12.1,12.1
+ c6.7,0,12.1-5.4,12.1-12.1v-5.2c0-24.2,9.7-47.2,26.7-64.2c17.1-17.1,40.1-26.7,64.2-26.7s47.2,9.7,64.2,26.7
+ c17.1,17.1,26.7,40.1,26.7,64.2c0,6.7,5.4,12.1,12.1,12.1C1323,949.5,1328.4,944.1,1328.4,937.5z"/>
+
+ <linearGradient id="SVGID_00000026880830724572405890000002574533588083035832_" gradientUnits="userSpaceOnUse" x1="18708.3613" y1="14393.377" x2="18708.3613" y2="16782.8711" gradientTransform="matrix(7.200000e-02 0 0 7.200000e-02 0.928 1.072)">
+ <stop offset="0" style="stop-color:#000030"/>
+ <stop offset="1" style="stop-color:#4285F4"/>
+ </linearGradient>
+ <path style="fill:url(#SVGID_00000026880830724572405890000002574533588083035832_);" d="M1328.4,973.9v14.9h19.4
+ c6.5,0,11.8,5.3,11.8,11.8c0,6.8-4.6,12.4-11.8,12.4h-19.4v122c0,5.1,2.1,9.7,5.4,13c7.3,7.3,20.9,7.3,28.2,0
+ c3.3-3.3,5.4-7.9,5.4-13v-4.1c0-7.2,5.7-11.6,12.6-11.6c6.4,0,11.6,5.2,11.6,11.6v4.1c0,11.8-4.8,22.4-12.5,30.1
+ c-16.7,16.7-45.7,16.7-62.4,0c-7.7-7.7-12.5-18.4-12.5-30.1V973.9c0-7,5.6-11.8,12.4-11.8C1323.1,962.2,1328.3,967.4,1328.4,973.9
+ L1328.4,973.9z"/>
+
+ <linearGradient id="SVGID_00000018229338295230736120000011477717140636842910_" gradientUnits="userSpaceOnUse" x1="17447.4375" y1="15469.0166" x2="17540.1348" y2="16329.7832" gradientTransform="matrix(7.200000e-02 0 0 7.200000e-02 0.928 1.072)">
+ <stop offset="0" style="stop-color:#4285F4"/>
+ <stop offset="1" style="stop-color:#9900FF"/>
+ </linearGradient>
+ <path style="fill:url(#SVGID_00000018229338295230736120000011477717140636842910_);" d="M1272.6,1165.5c0,6.4-5.2,11.6-11.6,11.6
+ c-6.9,0-12.6-4.4-12.6-11.6c0-35.5,0-3.9,0-39.4c0-6.4,5.2-11.6,11.6-11.6c6.9,0,12.6,4.4,12.6,11.6
+ C1272.6,1161.6,1272.6,1130.1,1272.6,1165.5z"/>
+ <path class="st5" d="M707.2,1020.3v82.9h-25.1v-41.6h-54.3v41.6h-25.1v-82.9C602.7,952,707.2,951.1,707.2,1020.3z M996.8,1103.2
+ c37.1,0,67.2-30.1,67.2-67.2s-30.1-67.2-67.2-67.2s-67.2,30.1-67.2,67.2C929.6,1073.2,959.7,1103.2,996.8,1103.2z M996.8,1077.5
+ c-22.9,0-41.5-18.6-41.5-41.5c0-22.9,18.6-41.5,41.5-41.5s41.5,18.6,41.5,41.5C1038.3,1058.9,1019.8,1077.5,996.8,1077.5z
+ M934.1,968.8V993h-36.5v110.3h-24.2V993h-36.5v-24.2C869.3,968.8,901.7,968.8,934.1,968.8z M824.8,1051.7v-82.9h-25.1v82.9
+ c0,37.3-54.3,36.7-54.3,0v-82.9h-25.1v82.9C720.3,1120,824.8,1120.9,824.8,1051.7z M682.1,1037.4v-17.1c0-37.3-54.3-36.7-54.3,0
+ v17.1H682.1z"/>
+ <circle class="st6" cx="1379.5" cy="1096.4" r="12.4"/>
+ <circle class="st6" cx="1039.8" cy="1164.7" r="12.4"/>
+</g>
+</svg>
diff --git a/rnd/autogpt_builder/src/app/favicon.ico b/rnd/autogpt_builder/src/app/favicon.ico
new file mode 100644
index 0000000000..74db319671
Binary files /dev/null and b/rnd/autogpt_builder/src/app/favicon.ico differ
diff --git a/rnd/autogpt_builder/src/app/globals.css b/rnd/autogpt_builder/src/app/globals.css
new file mode 100644
index 0000000000..875c01e819
--- /dev/null
+++ b/rnd/autogpt_builder/src/app/globals.css
@@ -0,0 +1,33 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+:root {
+ --foreground-rgb: 0, 0, 0;
+ --background-start-rgb: 214, 219, 220;
+ --background-end-rgb: 255, 255, 255;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --foreground-rgb: 255, 255, 255;
+ --background-start-rgb: 0, 0, 0;
+ --background-end-rgb: 0, 0, 0;
+ }
+}
+
+body {
+ color: rgb(var(--foreground-rgb));
+ background: linear-gradient(
+ to bottom,
+ transparent,
+ rgb(var(--background-end-rgb))
+ )
+ rgb(var(--background-start-rgb));
+}
+
+@layer utilities {
+ .text-balance {
+ text-wrap: balance;
+ }
+}
diff --git a/rnd/autogpt_builder/src/app/layout.tsx b/rnd/autogpt_builder/src/app/layout.tsx
new file mode 100644
index 0000000000..3760c7434a
--- /dev/null
+++ b/rnd/autogpt_builder/src/app/layout.tsx
@@ -0,0 +1,22 @@
+import type { Metadata } from "next";
+import { Inter } from "next/font/google";
+import "./globals.css";
+
+const inter = Inter({ subsets: ["latin"] });
+
+export const metadata: Metadata = {
+ title: "NextGen AutoGPT",
+ description: "Your one stop shop to creating AI Agents",
+};
+
+export default function RootLayout({
+ children,
+}: Readonly<{
+ children: React.ReactNode;
+}>) {
+ return (
+ <html lang="en">
+ <body className={inter.className}>{children}</body>
+ </html>
+ );
+}
diff --git a/rnd/autogpt_builder/src/app/page.tsx b/rnd/autogpt_builder/src/app/page.tsx
new file mode 100644
index 0000000000..916ce244e8
--- /dev/null
+++ b/rnd/autogpt_builder/src/app/page.tsx
@@ -0,0 +1,97 @@
+import Image from "next/image";
+
+export default function Home() {
+ return (
+ <main className="flex min-h-screen flex-col items-center justify-between p-24">
+ <div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
+ <p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
+ Get started by adding a&nbsp;
+ <code className="font-mono font-bold">node</code>
+ </p>
+ <div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:size-auto lg:bg-none">
+ <a
+ className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
+ href="https://news.agpt.co/"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ By{" "}
+ <Image
+ src="/autogpt.svg"
+ alt="AutoGPT Logo"
+ className="dark:invert"
+ width={100}
+ height={24}
+ priority
+ />
+ </a>
+ </div>
+ </div>
+
+ <div className="relative z-[-1] flex place-items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px]">
+ <Image
+ className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
+ src="/autogpt.svg"
+ alt="AutoGPT Logo"
+ width={180}
+ height={37}
+ priority
+ />
+ </div>
+
+ <div className="mb-32 w-full flex place-items-center max-w-5xl grid grid-cols-1 md:grid-cols-3 gap-4 text-center lg:mb-0 lg:text-left">
+ <a
+ href="https://docs.agpt.co/"
+ className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <h2 className="mb-3 text-2xl font-semibold">
+ Docs{" "}
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
+ -&gt;
+ </span>
+ </h2>
+ <p className="m-0 max-w-[30ch] text-sm opacity-50">
+ Find all the information about AutoGPT&apos;s features.
+ </p>
+ </a>
+
+
+ <a
+ href=""
+ className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <h2 className="mb-3 text-2xl font-semibold">
+ Runner{" "}
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
+ -&gt;
+ </span>
+ </h2>
+ <p className="m-0 max-w-[30ch] text-sm opacity-50">
+ Run your agent!
+ </p>
+ </a>
+
+ <a
+ href=""
+ className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <h2 className="mb-3 text-2xl font-semibold">
+ Deploy{" "}
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
+ -&gt;
+ </span>
+ </h2>
+ <p className="m-0 max-w-[30ch] text-balance text-sm opacity-50">
+ Deploy your agent!
+ </p>
+ </a>
+ </div>
+ </main>
+ );
+}
diff --git a/rnd/autogpt_builder/tailwind.config.ts b/rnd/autogpt_builder/tailwind.config.ts
new file mode 100644
index 0000000000..e9a0944e7b
--- /dev/null
+++ b/rnd/autogpt_builder/tailwind.config.ts
@@ -0,0 +1,20 @@
+import type { Config } from "tailwindcss";
+
+const config: Config = {
+ content: [
+ "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
+ ],
+ theme: {
+ extend: {
+ backgroundImage: {
+ "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
+ "gradient-conic":
+ "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
+ },
+ },
+ },
+ plugins: [],
+};
+export default config;
diff --git a/rnd/autogpt_builder/tsconfig.json b/rnd/autogpt_builder/tsconfig.json
new file mode 100644
index 0000000000..7b28589304
--- /dev/null
+++ b/rnd/autogpt_builder/tsconfig.json
@@ -0,0 +1,26 @@
+{
+ "compilerOptions": {
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "module": "esnext",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve",
+ "incremental": true,
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ],
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ },
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "exclude": ["node_modules"]
+}