Skip to content

chaosLegacy/AICollaboationCopilot

Repository files navigation

Meeting Intelligence Copilot

An AI-powered Slack bot that analyzes collaboration requests and tells your team whether to hold a meeting, go async, or use a hybrid approach — before anyone opens a calendar.

Built with Next.js, Claude AI, and the Slack API.

Live app: https://meeting-intelligence-copilot.vercel.app


What it does

Most meetings don't need to happen. This bot analyzes the context of a request — participants, timezones, urgency, decision complexity — and gives a structured recommendation with:

  • A one-line verdict
  • Why this decision (3 bullets)
  • A ready-to-send async message template
  • A meeting plan with agenda if a live sync is truly needed
  • An auto-cancel suggestion if an existing meeting can be replaced
  • A running count of meetings saved across the workspace

Slash command

/ask-meeting Q2 planning with <@alice> <@bob>, urgency: high, need decision on priorities

Tip: @mention participants — the bot resolves their real timezone from Slack and uses it for scheduling recommendations.

Output structure

🟢 Skip the meeting — async gets this done.
✅ 1 meeting avoided · ⏱ Estimated time saved: 3–5 hours

Why this decision
• EST/CET/IST overlap costs more than the meeting is worth
• Feature priorities can be scored independently
• Structured async doc gets richer input than a rushed call

📋 DOC Template — ready to send
[ready-to-copy async message]

→ Recommended next step

Tech stack

Layer Technology
Framework Next.js 15 (App Router)
AI Anthropic Claude (claude-sonnet-4-6)
Slack integration Slash commands + Block Kit
Deployment Vercel
Language TypeScript

Project structure

app/
  api/
    analyze/          → Web UI analysis endpoint
    slack/ask-meeting → Slash command handler
  page.tsx            → Web UI

lib/
  claude.ts           → Claude client, system prompt, JSON schema
  logger.ts           → Structured stdout logger
  counter.ts          → Meeting-saved counter
  slack/
    verify.ts         → Slack HMAC-SHA256 signature verification
    users.ts          → Slack users.info resolver
    formatter.ts      → Block Kit message builder

components/
  CollaborationForm.tsx
  AnalysisResult.tsx

types/
  index.ts            → Shared TypeScript interfaces

Local development

1. Clone and install

git clone git@github.com:chaosLegacy/AICollaboationCopilot.git
cd AICollaboationCopilot
npm install

2. Environment variables

Copy the example file and fill in your values:

cp .env.example .env.local

Then edit .env.local — every variable is documented in .env.example:

Variable Where to get it
AI_COPILOT_ANTHROPIC_KEY console.anthropic.com
SLACK_SIGNING_SECRET Slack app → Basic Information → App Credentials
SLACK_BOT_TOKEN Slack app → OAuth & Permissions → Bot User OAuth Token
PUBLIC_APP_URL Your ngrok URL for local dev (e.g. https://xxxx.ngrok-free.app)
CLAUDE_MODEL Default is claude-sonnet-4-6 — see .env.example for other options

3. Expose localhost via ngrok

ngrok http 3000

Copy the https://xxxx.ngrok-free.app URL into:

  • .env.local as PUBLIC_APP_URL
  • Slack app → Slash Commands → Request URL: https://xxxx.ngrok-free.app/api/slack/ask-meeting

4. Run

npm run dev

Slack app setup

  1. Go to api.slack.com/appsCreate New App → From scratch
  2. Name: Meeting Intelligence Copilot
  3. Slash Commands → Create /ask-meeting
    • Request URL: https://your-domain/api/slack/ask-meeting
    • Short description: Analyze if you need a meeting or can go async — AI-powered
    • Usage hint: Q2 planning with <@alice> <@bob>, urgency: high, need decision on priorities
  4. OAuth & Permissions → Bot Token Scopes: commands, chat:write
  5. Install to Workspace → copy Bot Token
  6. Basic Information → copy Signing Secret

Production deployment (Vercel)

vercel --prod

Copy .env.example, fill in your values, and set PUBLIC_APP_URL to your Vercel domain. Add each variable in the Vercel dashboard under Settings → Environment Variables.

Update the Slack slash command Request URL to your Vercel domain.


Viewing logs

Vercel dashboard: Project → Logs tab

Live tail via CLI:

vercel logs https://meeting-intelligence-copilot.vercel.app --follow

Locally:

npm run dev 2>&1 | grep '"event"' | jq .

Each request emits structured JSON:

{ "event": "request", "user": { "name": "Alice", "tz": "America/New_York" }, "query": "..." }
{ "event": "success", "recommendation": "async", "meeting_avoided": true, "duration_ms": 7200 }

Security

  • All Slack requests verified with HMAC-SHA256 signature + 5-minute replay-attack protection
  • No calendar data accessed — timezone availability is heuristic-based only
  • API keys stored in environment variables, never in source code

About

AI-powered Slack bot that analyzes meeting requests and recommends async, hybrid, or live sync — saving teams time by eliminating unnecessary meetings.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages