A business orchestration template built with Next.js, NextAuth (Google OAuth), shadcn/ui, and ChatBotKit. Create companies, deploy AI agents with pre-configured tools (file read/write, shell/bash, shared workspace), and assign tasks.
Note: This template is deliberately bare-bones. It provides the minimal structure and wiring needed to get a working app, intentionally leaving styling, layout, and architectural choices open so you can build on top without fighting existing opinions.
Building an AI orchestration system typically means sourcing models, a conversation layer, background processing, storage, a tested abilities catalogue, authentication, security, monitoring, and more from separate systems. The cost adds up fast - not just in money, but in engineering time.
ChatBotKit brings all of this into one platform. This template gets you started with a multi-agent orchestration app where companies, agents, tools, and task execution are all managed through a single API.
- Google OAuth via NextAuth for authentication
- Companies (backed by ChatBotKit Blueprints) as organizational workspaces
- Agents (backed by ChatBotKit Bots) with editable names and backstories
- Pre-configured Tools per company: file read/write, shell execution, shared space storage
- Chat directly with any agent through a streaming conversation UI
- Tasks - assign one-off tasks to agents and see streaming results
- shadcn/ui components with Tailwind CSS
-
Copy
.env.exampleto.envand fill in the values:cp .env.example .env
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
| Variable | Description |
|---|---|
CHATBOTKIT_API_SECRET |
ChatBotKit API token from https://chatbotkit.com/tokens |
NEXTAUTH_SECRET |
Random secret for NextAuth JWT encryption |
NEXTAUTH_URL |
Your app URL (e.g. http://localhost:3000) |
GOOGLE_CLIENT_ID |
Google OAuth client ID |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret |
- Sign up or log in at chatbotkit.com
- Go to chatbotkit.com/tokens and create an API token
- Copy the API token to
CHATBOTKIT_API_SECRETin your.envfile
No pre-configured bots are needed. The app creates companies (blueprints) and agents (bots) dynamically, each with pre-configured tools for file access, shell execution, and shared workspace storage.
- Go to Google Cloud Console
- Create a new OAuth 2.0 Client ID
- Set authorized redirect URI to
http://localhost:3000/api/auth/callback/google - Copy the Client ID and Client Secret to your
.envfile
Run the following command and paste the output into your .env file:
openssl rand -base64 32/auth/signin - Google OAuth sign-in page
/agents - Company + agent management dashboard
/agents/[id] - Agent detail with chat and settings tabs
/tasks - Task assignment and execution
- User signs in with Google
- User creates a Company (ChatBotKit Blueprint) with shared tools:
- File read/write ability
- Shell/bash execution ability
- Shared space storage ability
- Inside a company, user creates Agents (ChatBotKit Bots) with custom names and backstories
- User can chat with agents directly or assign tasks for one-off execution
- All agents in a company share the same toolset through a connected Skillset
├── actions/
│ ├── agent.js # Agent CRUD server actions
│ ├── company.js # Company CRUD server actions
│ ├── conversation.jsx # Chat streaming server actions
│ └── task.jsx # Task execution server actions
├── app/
│ ├── agents/ # Agent management and detail pages
│ ├── auth/signin/ # Google OAuth sign-in page
│ ├── companies/ # Company management pages
│ ├── tasks/ # Task assignment and execution
│ ├── api/auth/ # NextAuth API route
│ ├── layout.jsx # Root layout with providers
│ └── page.jsx # Root redirect
├── components/
│ ├── agents/ # Agent-specific components
│ ├── ui/ # shadcn/ui primitives
│ └── providers.jsx # NextAuth session provider
├── lib/
│ ├── auth-options.js # NextAuth configuration
│ ├── models.js # Model definitions
│ └── utils.js # Utility functions
└── middleware.ts # Auth middleware for protected routes
MIT - see LICENSE




