├── .husky ├── .gitignore └── pre-commit ├── public ├── robots.txt ├── banner.png ├── social.png ├── favicon.ico ├── favicon-16x16.png ├── favicon-32x32.png ├── apple-touch-icon.png ├── android-chrome-192x192.png ├── android-chrome-512x512.png └── site.webmanifest ├── .github └── FUNDING.yml ├── .gitattributes ├── .dockerignore ├── postcss.config.cjs ├── prisma ├── useSqlite.sh └── schema.prisma ├── aws └── cf │ ├── deploy.sh │ └── agent.cf.json ├── prettier.config.cjs ├── src ├── pages │ ├── api │ │ ├── auth │ │ │ └── [...nextauth].ts │ │ ├── trpc │ │ │ └── [trpc].ts │ │ ├── execute.ts │ │ ├── chain.ts │ │ └── create.ts │ ├── _app.tsx │ └── index.tsx ├── server │ ├── db.ts │ ├── api │ │ ├── root.ts │ │ ├── routers │ │ │ ├── example.ts │ │ │ └── chain.ts │ │ └── trpc.ts │ └── auth.ts ├── components │ ├── DottedGridBackground.tsx │ ├── loader.tsx │ ├── Badge.tsx │ ├── motions │ │ ├── popin.tsx │ │ ├── FadeOut.tsx │ │ └── expand.tsx │ ├── Input.tsx │ ├── Button.tsx │ ├── HelpDialog.tsx │ ├── SettingsDialog.tsx │ ├── Dialog.tsx │ ├── toast.tsx │ ├── Drawer.tsx │ ├── AutonomousAgent.ts │ └── ChatWindow.tsx ├── env │ ├── server.mjs │ ├── client.mjs │ └── schema.mjs ├── styles │ └── globals.css ├── utils │ ├── api.ts │ └── chain.ts └── layout │ └── default.tsx ├── .env.example ├── tsconfig.json ├── tailwind.config.cjs ├── setup.sh ├── next.config.mjs ├── .gitignore ├── Dockerfile ├── .eslintrc.json ├── package.json ├── README.md └── LICENSE /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: reworkd-admin 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /public/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/banner.png -------------------------------------------------------------------------------- /public/social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/social.png -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/favicon.ico -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.git 2 | **/node_modules 3 | **/idea 4 | **/.next 5 | **/aws 6 | **/.husky 7 | **/venv -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuilenren/AgentGPT/main/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /prisma/useSqlite.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd "$(dirname "$0")" 3 | 4 | sed -ie 's/postgresql/sqlite/g' schema.prisma 5 | sed -ie 's/@db.Text//' schema.prisma 6 | -------------------------------------------------------------------------------- /aws/cf/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd "$(dirname "$0")" 3 | 4 | aws cloudformation create-stack --stack-name agent \ 5 | --template-body file:///$PWD/agent.cf.json -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import("prettier").Config} */ 2 | module.exports = { 3 | plugins: [require.resolve("prettier-plugin-tailwindcss")], 4 | }; 5 | -------------------------------------------------------------------------------- /src/pages/api/auth/[...nextauth].ts: -------------------------------------------------------------------------------- 1 | import NextAuth from "next-auth"; 2 | import { authOptions } from "../../../server/auth"; 3 | 4 | export default NextAuth(authOptions); 5 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Deployment Environment: 2 | NODE_ENV=development 3 | 4 | # Next Auth config: 5 | # Generate a secret with `openssl rand -base64 32` 6 | NEXTAUTH_SECRET=changeme 7 | NEXTAUTH_URL=http://localhost:3000 8 | 9 | # Prisma 10 | DATABASE_URL=file:./db.sqlite 11 | 12 | # External APIs: 13 | OPENAI_API_KEY=changeme 14 | -------------------------------------------------------------------------------- /public/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Agent-GPT", 3 | "short_name": "Agent-GPT", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /src/server/db.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | import { env } from "../env/server.mjs"; 4 | 5 | const globalForPrisma = globalThis as unknown as { prisma: PrismaClient }; 6 | 7 | export const prisma = 8 | globalForPrisma.prisma || 9 | new PrismaClient({ 10 | log: 11 | env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"], 12 | }); 13 | 14 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; 15 | -------------------------------------------------------------------------------- /src/server/api/root.ts: -------------------------------------------------------------------------------- 1 | import { createTRPCRouter } from "./trpc"; 2 | import { exampleRouter } from "./routers/example"; 3 | import { chainRouter } from "./routers/chain"; 4 | 5 | /** 6 | * This is the primary router for your server. 7 | * 8 | * All routers added in /api/routers should be manually added here 9 | */ 10 | export const appRouter = createTRPCRouter({ 11 | example: exampleRouter, 12 | chain: chainRouter, 13 | }); 14 | 15 | // export type definition of API 16 | export type AppRouter = typeof appRouter; 17 | -------------------------------------------------------------------------------- /src/components/DottedGridBackground.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface DottedGridBackgroundProps { 4 | children: React.ReactNode; 5 | className?: string; 6 | } 7 | 8 | const DottedGridBackground = ({ 9 | children, 10 | className, 11 | }: DottedGridBackgroundProps) => { 12 | return ( 13 |