├── backend ├── .gitignore ├── .env.template ├── Makefile ├── README.md ├── pyproject.toml ├── src │ ├── settings.py │ ├── auth.py │ ├── open_interpreter.py │ └── e2b_tool.py ├── Dockerfile └── server.py ├── .gitignore ├── supabase-auth.png ├── frontend ├── public │ ├── favicon.ico │ ├── favicon-old.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon-48x48.png │ ├── agentboard_logo.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ └── thirteen.svg ├── app │ ├── opengraph-image.png │ ├── twitter-image.png │ ├── error │ │ └── page.tsx │ ├── middleware.ts │ ├── page.tsx │ ├── auth │ │ └── callback │ │ │ └── route.ts │ ├── api │ │ ├── create-sandbox │ │ │ └── route.ts │ │ └── upload-file │ │ │ └── route.ts │ ├── globals.css │ ├── layout.tsx │ └── privacypolicy │ │ └── page.js ├── assets │ └── fonts │ │ ├── Inter-Bold.woff │ │ └── Inter-Regular.woff ├── postcss.config.js ├── .npmrc ├── lib │ ├── constants.ts │ ├── utils.ts │ ├── fonts.ts │ ├── agents.ts │ └── hooks │ │ ├── use-at-bottom.tsx │ │ ├── use-enter-submit.tsx │ │ ├── use-copy-to-clipboard.tsx │ │ └── use-agent.tsx ├── next-env.d.ts ├── utils │ ├── supabase │ │ ├── client.ts │ │ ├── server.ts │ │ └── middleware.ts │ └── posthog-server.ts ├── .env.template ├── README.md ├── components │ ├── markdown.tsx │ ├── feedback.tsx │ ├── providers.tsx │ ├── tailwind-indicator.tsx │ ├── external-link.tsx │ ├── chat-scroll-anchor.tsx │ ├── ui │ │ ├── separator.tsx │ │ ├── tooltip.tsx │ │ ├── button.tsx │ │ ├── dropdown-menu.tsx │ │ ├── dialog.tsx │ │ ├── codeblock.tsx │ │ └── icons.tsx │ ├── button-scroll-to-bottom.tsx │ ├── chat-message-actions.tsx │ ├── chat-list.tsx │ ├── header.tsx │ ├── anon-shield.tsx │ ├── login-button.tsx │ ├── empty-screen.tsx │ ├── chat-panel.tsx │ ├── agent-selector.tsx │ ├── user-menu.tsx │ ├── prompt-form.tsx │ ├── chat-message.tsx │ └── chat.tsx ├── next.config.js ├── .gitignore ├── LICENSE ├── .eslintrc.json ├── tsconfig.json ├── prettier.config.cjs ├── package.json └── tailwind.config.js ├── .env.template ├── docker-compose.yml ├── sandbox-template ├── e2b.Dockerfile ├── e2b.toml ├── requirements.txt └── README.md ├── terraform ├── init │ ├── variables.tf │ ├── outputs.tf │ └── main.tf └── github-action │ ├── variables.tf │ └── main.tf ├── .github └── workflows │ ├── template.yml │ ├── backend.yml │ └── deploy.yml ├── Makefile ├── README.md ├── variables.tf ├── .terraform.lock.hcl └── main.tf /backend/.gitignore: -------------------------------------------------------------------------------- 1 | backend-env/ 2 | __pycache__/ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | agent_frameworks 3 | .idea 4 | .vscode 5 | .env 6 | .next 7 | -------------------------------------------------------------------------------- /supabase-auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/supabase-auth.png -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/favicon.ico -------------------------------------------------------------------------------- /backend/.env.template: -------------------------------------------------------------------------------- 1 | # Required 2 | SUPABASE_URL= 3 | SUPABASE_KEY= 4 | OPENAI_API_KEY= 5 | E2B_API_KEY= 6 | -------------------------------------------------------------------------------- /frontend/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/app/opengraph-image.png -------------------------------------------------------------------------------- /frontend/app/twitter-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/app/twitter-image.png -------------------------------------------------------------------------------- /frontend/public/favicon-old.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/favicon-old.ico -------------------------------------------------------------------------------- /.env.template: -------------------------------------------------------------------------------- 1 | # Required for Terraform 2 | GCP_PROJECT_ID= 3 | GCP_REGION= 4 | GCP_ZONE= 5 | TERRAFORM_STATE_BUCKET= 6 | -------------------------------------------------------------------------------- /frontend/app/error/page.tsx: -------------------------------------------------------------------------------- 1 | export default function ErrorPage() { 2 | return

Sorry, something went wrong

3 | } 4 | -------------------------------------------------------------------------------- /frontend/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/favicon-16x16.png -------------------------------------------------------------------------------- /frontend/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/favicon-32x32.png -------------------------------------------------------------------------------- /frontend/public/favicon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/favicon-48x48.png -------------------------------------------------------------------------------- /frontend/assets/fonts/Inter-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/assets/fonts/Inter-Bold.woff -------------------------------------------------------------------------------- /frontend/public/agentboard_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/agentboard_logo.png -------------------------------------------------------------------------------- /frontend/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/apple-touch-icon.png -------------------------------------------------------------------------------- /frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /frontend/assets/fonts/Inter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/assets/fonts/Inter-Regular.woff -------------------------------------------------------------------------------- /frontend/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e2b-dev/agentboard/HEAD/frontend/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | backend: 3 | build: 4 | context: backend 5 | ports: 6 | - "8080:8080" 7 | env_file: backend/.env 8 | -------------------------------------------------------------------------------- /frontend/.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true 2 | auto-install-peers=true 3 | exclude-links-from-lockfile=true 4 | prefer-workspace-packages=false 5 | link-workspace-packages=false -------------------------------------------------------------------------------- /frontend/lib/constants.ts: -------------------------------------------------------------------------------- 1 | const CHAT_API_ENDPOINT = 2 | process.env.NODE_ENV === 'development' 3 | ? 'http://localhost:8080/chat' 4 | : `${process.env.NEXT_PUBLIC_AGENTBOARD_API_URL}/chat` 5 | export { CHAT_API_ENDPOINT } 6 | -------------------------------------------------------------------------------- /frontend/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /frontend/utils/supabase/client.ts: -------------------------------------------------------------------------------- 1 | import { createBrowserClient } from '@supabase/ssr' 2 | 3 | export const createClient = () => 4 | createBrowserClient( 5 | process.env.NEXT_PUBLIC_SUPABASE_URL!, 6 | process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY! 7 | ) 8 | -------------------------------------------------------------------------------- /sandbox-template/e2b.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM e2bdev/code-interpreter:latest 2 | 3 | RUN apt-get update && apt-get install -y ffmpeg && apt-get clean && rm -rf /var/lib/apt/lists/* 4 | 5 | COPY ./requirements.txt /requirements.txt 6 | RUN pip install -r /requirements.txt 7 | -------------------------------------------------------------------------------- /frontend/.env.template: -------------------------------------------------------------------------------- 1 | # Required 2 | NEXT_PUBLIC_SUPABASE_URL= 3 | NEXT_PUBLIC_SUPABASE_ANON_KEY= 4 | E2B_API_KEY= 5 | 6 | # Required for production 7 | NEXT_PUBLIC_AGENTBOARD_API_URL= 8 | 9 | # Optional 10 | NEXT_PUBLIC_POSTHOG_KEY= 11 | NEXT_PUBLIC_POSTHOG_HOST= 12 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Agentboard Frontend 2 | 3 | Build on top of [Vercel AI Chat template](https://github.com/vercel/ai-chatbot) 4 | 5 | ## How to run the frontend locally 6 | 7 | 1. Make sure you have the correct `.env` file. 8 | 2. Run `pnpm dev`, it will start the frontend on `localhost:3000`. 9 | -------------------------------------------------------------------------------- /frontend/components/markdown.tsx: -------------------------------------------------------------------------------- 1 | import { FC, memo } from 'react' 2 | import ReactMarkdown, { Options } from 'react-markdown' 3 | 4 | export const MemoizedReactMarkdown: FC = memo( 5 | ReactMarkdown, 6 | (prevProps, nextProps) => 7 | prevProps.children === nextProps.children && 8 | prevProps.className === nextProps.className 9 | ) 10 | -------------------------------------------------------------------------------- /backend/Makefile: -------------------------------------------------------------------------------- 1 | -include .env 2 | 3 | PHONY:build 4 | build: 5 | @docker build --platform linux/amd64 -t "${GCP_REGION}-docker.pkg.dev/${GCP_PROJECT_ID}/${REPOSITORY_NAME}/backend:latest" . 6 | 7 | .PHONY:push 8 | push: 9 | @docker push "${GCP_REGION}-docker.pkg.dev/${GCP_PROJECT_ID}/${REPOSITORY_NAME}/backend:latest" 10 | 11 | .PHONY:build-push 12 | build-push: build push 13 | -------------------------------------------------------------------------------- /terraform/init/variables.tf: -------------------------------------------------------------------------------- 1 | variable "prefix" { 2 | type = string 3 | description = "The prefix to use for all resources in this module" 4 | default = "e2b-" 5 | } 6 | 7 | variable "labels" { 8 | description = "The labels to attach to resources created by this module" 9 | type = map(string) 10 | default = { 11 | "app" = "e2b" 12 | "terraform" = "true" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from 'clsx' 2 | import { customAlphabet } from 'nanoid' 3 | import { twMerge } from 'tailwind-merge' 4 | 5 | export function cn(...inputs: ClassValue[]) { 6 | return twMerge(clsx(inputs)) 7 | } 8 | 9 | export const nanoid = customAlphabet( 10 | '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 11 | 7 12 | ) // 7-character random string 13 | -------------------------------------------------------------------------------- /frontend/lib/fonts.ts: -------------------------------------------------------------------------------- 1 | import { JetBrains_Mono as FontMono, Inter as FontSans } from 'next/font/google' 2 | 3 | export const fontSans = FontSans({ 4 | subsets: ['latin'], 5 | variable: '--font-sans', 6 | display: 'swap', 7 | adjustFontFallback: false 8 | }) 9 | 10 | export const fontMono = FontMono({ 11 | subsets: ['latin'], 12 | variable: '--font-mono', 13 | display: 'swap', 14 | adjustFontFallback: false 15 | }) 16 | -------------------------------------------------------------------------------- /frontend/utils/posthog-server.ts: -------------------------------------------------------------------------------- 1 | import { PostHog } from 'posthog-node' 2 | 3 | export default function PostHogClient() { 4 | if (process.env.NODE_ENV === 'production') { 5 | return new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY!, { 6 | host: process.env.NEXT_PUBLIC_POSTHOG_HOST, 7 | flushAt: 1, 8 | flushInterval: 0 9 | }) 10 | } else { 11 | return new PostHog('dev', { 12 | enable: false 13 | }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /frontend/lib/agents.ts: -------------------------------------------------------------------------------- 1 | export enum AgentsEnum { 2 | OpenInterpreter = 'OPEN_INTERPRETER' 3 | } 4 | export const Agents = { 5 | [AgentsEnum.OpenInterpreter]: 'Open Interpreter' 6 | } 7 | 8 | export enum ModelsEnum { 9 | GPT3 = 'GPT-3.5', 10 | GPT4 = 'GPT-4' 11 | } 12 | export const Models = { 13 | [ModelsEnum.GPT3]: 'GPT-3.5', 14 | [ModelsEnum.GPT4]: 'GPT-4' 15 | } 16 | 17 | export function getInitials(text: string): string { 18 | return (text.match(/[A-Z]/g) || []).join('') 19 | } 20 | -------------------------------------------------------------------------------- /frontend/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | module.exports = { 3 | reactStrictMode: true, 4 | images: { 5 | remotePatterns: [ 6 | { 7 | protocol: 'https', 8 | hostname: 'avatars.githubusercontent.com', 9 | port: '', 10 | pathname: '**' 11 | }, 12 | { 13 | protocol: 'https', 14 | hostname: 'lh3.googleusercontent.com', 15 | port: '', 16 | pathname: '**' 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /backend/README.md: -------------------------------------------------------------------------------- 1 | # Agentboard Backend 2 | 3 | Uses [Open Interpreter](https://github.com/OpenInterpreter/open-interpreter) running the code in [e2b](https://github.com/e2b-dev/E2B) sandboxes. 4 | 5 | ## Running backend locally 6 | 7 | 1. Make sure you have the correct `.env` file. 8 | 2. Install the dependencies with `poetry install` (if you don't have poetry, here's an [installation guide](https://python-poetry.org/docs/#installation). 9 | 3. Run the backend with `uvicorn server:app --reload --port 8080`. 10 | -------------------------------------------------------------------------------- /frontend/components/feedback.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import Script from 'next/script' 4 | 5 | declare global { 6 | namespace JSX { 7 | interface IntrinsicElements { 8 | 'chatlio-widget': any 9 | } 10 | } 11 | } 12 | export function Feedback() { 13 | return ( 14 | <> 15 |