From d9e7781dfceaf254f87e1b854724d192aa8c516f Mon Sep 17 00:00:00 2001 From: harishghasolia07 Date: Sun, 22 Mar 2026 20:10:12 +0530 Subject: [PATCH 1/7] feat: Add meeting-action-agent kit --- .gitignore | 6 +- .../meeting-action-agent/.gitignore | 27 + .../automation/meeting-action-agent/README.md | 144 + .../actions/orchestrate.ts | 92 + .../meeting-action-agent/app/globals.css | 153 + .../meeting-action-agent/app/layout.tsx | 28 + .../meeting-action-agent/app/page.tsx | 383 ++ .../meeting-action-agent/components.json | 21 + .../components/header.tsx | 47 + .../components/theme-provider.tsx | 11 + .../components/ui/accordion.tsx | 66 + .../components/ui/alert-dialog.tsx | 157 + .../components/ui/alert.tsx | 66 + .../components/ui/aspect-ratio.tsx | 11 + .../components/ui/avatar.tsx | 53 + .../components/ui/badge.tsx | 46 + .../components/ui/breadcrumb.tsx | 109 + .../components/ui/button-group.tsx | 83 + .../components/ui/button.tsx | 60 + .../components/ui/calendar.tsx | 213 + .../components/ui/card.tsx | 92 + .../components/ui/carousel.tsx | 241 + .../components/ui/chart.tsx | 353 ++ .../components/ui/checkbox.tsx | 32 + .../components/ui/collapsible.tsx | 33 + .../components/ui/command.tsx | 184 + .../components/ui/context-menu.tsx | 252 + .../components/ui/dialog.tsx | 143 + .../components/ui/drawer.tsx | 135 + .../components/ui/dropdown-menu.tsx | 257 + .../components/ui/empty.tsx | 104 + .../components/ui/field.tsx | 244 + .../components/ui/form.tsx | 167 + .../components/ui/hover-card.tsx | 44 + .../components/ui/input-group.tsx | 169 + .../components/ui/input-otp.tsx | 77 + .../components/ui/input.tsx | 21 + .../components/ui/item.tsx | 193 + .../components/ui/kbd.tsx | 28 + .../components/ui/label.tsx | 24 + .../components/ui/menubar.tsx | 276 ++ .../components/ui/navigation-menu.tsx | 166 + .../components/ui/pagination.tsx | 127 + .../components/ui/popover.tsx | 48 + .../components/ui/progress.tsx | 31 + .../components/ui/radio-group.tsx | 45 + .../components/ui/resizable.tsx | 56 + .../components/ui/scroll-area.tsx | 58 + .../components/ui/select.tsx | 185 + .../components/ui/separator.tsx | 28 + .../components/ui/sheet.tsx | 139 + .../components/ui/sidebar.tsx | 726 +++ .../components/ui/skeleton.tsx | 13 + .../components/ui/slider.tsx | 63 + .../components/ui/sonner.tsx | 25 + .../components/ui/spinner.tsx | 16 + .../components/ui/switch.tsx | 31 + .../components/ui/table.tsx | 116 + .../components/ui/tabs.tsx | 66 + .../components/ui/textarea.tsx | 18 + .../components/ui/toast.tsx | 129 + .../components/ui/toaster.tsx | 35 + .../components/ui/toggle-group.tsx | 73 + .../components/ui/toggle.tsx | 47 + .../components/ui/tooltip.tsx | 61 + .../components/ui/use-mobile.tsx | 19 + .../components/ui/use-toast.ts | 191 + .../meeting-action-agent/config.json | 27 + .../flows/meeting-action-flow/README.md | 62 + .../flows/meeting-action-flow/config.json | 131 + .../flows/meeting-action-flow/inputs.json | 26 + .../flows/meeting-action-flow/meta.json | 9 + .../meeting-action-agent/hooks/use-mobile.ts | 19 + .../meeting-action-agent/hooks/use-toast.ts | 191 + .../lib/lamatic-client.ts | 19 + .../meeting-action-agent/lib/utils.ts | 6 + .../meeting-action-agent/next.config.mjs | 14 + .../meeting-action-agent/package-lock.json | 4379 +++++++++++++++++ .../meeting-action-agent/package.json | 62 + .../meeting-action-agent/postcss.config.mjs | 8 + .../meeting-action-agent/tsconfig.json | 23 + 81 files changed, 12332 insertions(+), 1 deletion(-) create mode 100644 kits/automation/meeting-action-agent/.gitignore create mode 100644 kits/automation/meeting-action-agent/README.md create mode 100644 kits/automation/meeting-action-agent/actions/orchestrate.ts create mode 100644 kits/automation/meeting-action-agent/app/globals.css create mode 100644 kits/automation/meeting-action-agent/app/layout.tsx create mode 100644 kits/automation/meeting-action-agent/app/page.tsx create mode 100644 kits/automation/meeting-action-agent/components.json create mode 100644 kits/automation/meeting-action-agent/components/header.tsx create mode 100644 kits/automation/meeting-action-agent/components/theme-provider.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/accordion.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/alert-dialog.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/alert.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/aspect-ratio.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/avatar.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/badge.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/breadcrumb.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/button-group.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/button.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/calendar.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/card.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/carousel.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/chart.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/checkbox.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/collapsible.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/command.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/context-menu.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/dialog.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/drawer.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/dropdown-menu.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/empty.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/field.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/form.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/hover-card.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/input-group.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/input-otp.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/input.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/item.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/kbd.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/label.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/menubar.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/navigation-menu.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/pagination.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/popover.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/progress.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/radio-group.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/resizable.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/scroll-area.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/select.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/separator.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/sheet.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/sidebar.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/skeleton.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/slider.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/sonner.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/spinner.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/switch.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/table.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/tabs.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/textarea.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/toast.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/toaster.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/toggle-group.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/toggle.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/tooltip.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/use-mobile.tsx create mode 100644 kits/automation/meeting-action-agent/components/ui/use-toast.ts create mode 100644 kits/automation/meeting-action-agent/config.json create mode 100644 kits/automation/meeting-action-agent/flows/meeting-action-flow/README.md create mode 100644 kits/automation/meeting-action-agent/flows/meeting-action-flow/config.json create mode 100644 kits/automation/meeting-action-agent/flows/meeting-action-flow/inputs.json create mode 100644 kits/automation/meeting-action-agent/flows/meeting-action-flow/meta.json create mode 100644 kits/automation/meeting-action-agent/hooks/use-mobile.ts create mode 100644 kits/automation/meeting-action-agent/hooks/use-toast.ts create mode 100644 kits/automation/meeting-action-agent/lib/lamatic-client.ts create mode 100644 kits/automation/meeting-action-agent/lib/utils.ts create mode 100644 kits/automation/meeting-action-agent/next.config.mjs create mode 100644 kits/automation/meeting-action-agent/package-lock.json create mode 100644 kits/automation/meeting-action-agent/package.json create mode 100644 kits/automation/meeting-action-agent/postcss.config.mjs create mode 100644 kits/automation/meeting-action-agent/tsconfig.json diff --git a/.gitignore b/.gitignore index 6a3e68da..580f5e84 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -**/.DS_Store \ No newline at end of file +**/.DS_Store +.env* +node_modules/ +.next/ +/meeting-action-agent/ \ No newline at end of file diff --git a/kits/automation/meeting-action-agent/.gitignore b/kits/automation/meeting-action-agent/.gitignore new file mode 100644 index 00000000..b28ea810 --- /dev/null +++ b/kits/automation/meeting-action-agent/.gitignore @@ -0,0 +1,27 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules + +# next.js +/.next/ +/out/ + +# production +/build + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files +.env + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts \ No newline at end of file diff --git a/kits/automation/meeting-action-agent/README.md b/kits/automation/meeting-action-agent/README.md new file mode 100644 index 00000000..2e5ed42a --- /dev/null +++ b/kits/automation/meeting-action-agent/README.md @@ -0,0 +1,144 @@ +# πŸ“‹ Meeting Action Items Agent + +> An AI-powered agent that turns raw meeting notes into prioritized action items, key decisions, a markdown summary, and a follow-up email draft β€” in seconds. + +Built with [Lamatic AgentKit](https://github.com/Lamatic/AgentKit) Β· [Lamatic Studio](https://studio.lamatic.ai) Β· Next.js + +--- + +## ✨ What It Does + +Paste any raw meeting notes, transcript, or summary and the agent will automatically extract: + +- βœ… **Key Decisions** β€” numbered list of decisions made in the meeting +- 🎯 **Action Items** β€” each with an owner, deadline, and priority (High / Medium / Low) +- πŸ“„ **Meeting Summary** β€” a clean markdown report +- πŸ“§ **Follow-up Email Draft** β€” ready to copy and send to your team + +--- + +## πŸ—οΈ Architecture + +``` +User (pastes meeting notes) + ↓ +Next.js Frontend (app/page.tsx) + ↓ +Server Action (actions/orchestrate.ts) + ↓ +Lamatic Flow (API Request β†’ LLM β†’ API Response) + ↓ +Structured JSON output rendered in the UI +``` + +--- + +## πŸš€ Quick Start + +### Prerequisites + +| Tool | Version | +|------|---------| +| Node.js | 18+ | +| npm | 9+ | +| Lamatic Account | [lamatic.ai](https://lamatic.ai) | + +### 1. Clone the repo + +```bash +git clone https://github.com/Lamatic/AgentKit.git +cd AgentKit/kits/automation/meeting-action-agent +``` + +### 2. Set up environment variables + +```bash +cp .env.example .env.local +``` + +Edit `.env.local` and fill in your values: + +```env +MEETING_ACTION_FLOW_ID="your-flow-id" +LAMATIC_API_URL="https://your-org.lamatic.dev/graphql" +LAMATIC_PROJECT_ID="your-project-id" +LAMATIC_API_KEY="your-api-key" +``` + +> **Where to find these values:** +> - `MEETING_ACTION_FLOW_ID` β†’ Flow URL in Lamatic Studio (the UUID) +> - `LAMATIC_API_URL` β†’ Settings β†’ API Docs β†’ Endpoint +> - `LAMATIC_PROJECT_ID` β†’ Settings β†’ Project β†’ Project ID +> - `LAMATIC_API_KEY` β†’ Settings β†’ API Keys + +### 3. Install & run + +```bash +npm install +npm run dev +``` + +Open [http://localhost:3000](http://localhost:3000) and paste your meeting notes! + +--- + +## 🧠 Lamatic Flow Setup + +### Trigger +- **Type:** API Request +- **Input schema:** `{ "meeting_notes": "string" }` + +### LLM Node (Generate Text) +- **Model:** GPT-4o / GPT-4o-mini / Gemini 1.5 Pro +- **System prompt:** Instructs the model to extract decisions, action items, summary, and email as JSON +- **User message:** `{{trigger.meeting_notes}}` + +### Response +- **Output schema:** `{ "result": "{{LLMNode.output.generatedResponse}}" }` + +> See the exported flow files in the `flows/` folder. + +--- + +## πŸ“‚ Project Structure + +``` +kits/automation/meeting-action-agent/ +β”œβ”€β”€ .env.example # Environment variables template +β”œβ”€β”€ .gitignore +β”œβ”€β”€ README.md +β”œβ”€β”€ config.json # Kit metadata +β”œβ”€β”€ package.json +β”œβ”€β”€ actions/ +β”‚ └── orchestrate.ts # Server action calling Lamatic +β”œβ”€β”€ app/ +β”‚ β”œβ”€β”€ globals.css +β”‚ β”œβ”€β”€ layout.tsx +β”‚ └── page.tsx # Main UI +β”œβ”€β”€ components/ # shadcn/ui components +β”œβ”€β”€ flows/ # Exported Lamatic flow files +β”œβ”€β”€ lib/ +β”‚ └── lamatic-client.ts # Lamatic SDK client +└── hooks/ +``` + +--- + +## 🌐 Deploy to Vercel + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/automation/meeting-action-agent&env=MEETING_ACTION_FLOW_ID,LAMATIC_API_URL,LAMATIC_PROJECT_ID,LAMATIC_API_KEY) + +1. Click the button above +2. Set the **Root Directory** to `kits/automation/meeting-action-agent` +3. Add all 4 environment variables +4. Deploy! + +--- + +## 🀝 Contributing + +This kit is part of [Lamatic AgentKit](https://github.com/Lamatic/AgentKit). See [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines. + +## πŸ“œ License + +MIT β€” see [LICENSE](../../LICENSE) diff --git a/kits/automation/meeting-action-agent/actions/orchestrate.ts b/kits/automation/meeting-action-agent/actions/orchestrate.ts new file mode 100644 index 00000000..7bbb8e9d --- /dev/null +++ b/kits/automation/meeting-action-agent/actions/orchestrate.ts @@ -0,0 +1,92 @@ +"use server" + +import { lamaticClient } from "@/lib/lamatic-client" + +type Priority = "High" | "Medium" | "Low" + +function normalizePriority(p: string): Priority { + const cap = ((p ?? "medium").charAt(0).toUpperCase() + (p ?? "medium").slice(1).toLowerCase()) as Priority + return (["High", "Medium", "Low"] as Priority[]).includes(cap) ? cap : "Medium" +} + +function extractParsed(resData: any): any { + // Try every possible path the Lamatic SDK might use + const candidates = [ + resData?.result?.result, // {result: {result: {...}}} + resData?.result, // {result: {...}} + resData?.data?.result, // {data: {result: {...}}} + resData?.data, // {data: {...}} + resData, // top-level + ] + for (const c of candidates) { + if (c && typeof c === "object" && (c.decisions || c.action_items || c.summary_report)) { + return c + } + } + // If none matched, try parsing the first string candidate + for (const c of candidates) { + if (typeof c === "string" && c.trim().startsWith("{")) { + try { + const cleaned = c.replace(/```json\n?/g, "").replace(/```\n?/g, "").trim() + return JSON.parse(cleaned) + } catch {} + } + } + return null +} + +export async function analyzeMeeting(meetingNotes: string): Promise<{ + success: boolean + data?: { + decisions: string[] + action_items: Array<{ task: string; owner: string; deadline: string; priority: Priority }> + summary_report: string + followup_email: string + } + rawResult?: string + error?: string +}> { + try { + const flowId = process.env.MEETING_ACTION_FLOW_ID + if (!flowId) throw new Error("MEETING_ACTION_FLOW_ID is not set in environment variables.") + + const resData = await lamaticClient.executeFlow(flowId, { meeting_notes: meetingNotes }) + console.log("[meeting-agent] Full SDK response:", JSON.stringify(resData)) + + const parsed = extractParsed(resData) + console.log("[meeting-agent] Extracted parsed:", JSON.stringify(parsed)) + + if (!parsed) { + // Return raw so the UI can show something + return { success: true, rawResult: JSON.stringify(resData, null, 2) } + } + + return { + success: true, + data: { + decisions: Array.isArray(parsed.decisions) ? parsed.decisions : [], + action_items: Array.isArray(parsed.action_items) + ? parsed.action_items.map((item: any) => ({ + task: item.task ?? "", + owner: item.owner ?? "Unassigned", + deadline: item.deadline ?? "TBD", + priority: normalizePriority(item.priority ?? "medium"), + })) + : [], + summary_report: parsed.summary_report ?? "", + followup_email: parsed.followup_email ?? "", + }, + } + } catch (error) { + console.error("[meeting-agent] Error:", error) + let errorMessage = "Unknown error occurred" + if (error instanceof Error) { + errorMessage = error.message + if (error.message.includes("fetch failed")) + errorMessage = "Network error: Cannot connect to the service." + else if (error.message.includes("API key")) + errorMessage = "Authentication error: Check your LAMATIC_API_KEY." + } + return { success: false, error: errorMessage } + } +} diff --git a/kits/automation/meeting-action-agent/app/globals.css b/kits/automation/meeting-action-agent/app/globals.css new file mode 100644 index 00000000..f4a49a29 --- /dev/null +++ b/kits/automation/meeting-action-agent/app/globals.css @@ -0,0 +1,153 @@ +@import "tailwindcss"; +@import "tw-animate-css"; + +@custom-variant dark (&:is(.dark *)); + +:root { + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --destructive-foreground: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --radius: 0.625rem; + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.145 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.145 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.985 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.396 0.141 25.723); + --destructive-foreground: oklch(0.637 0.237 25.331); + --border: oklch(0.269 0 0); + --input: oklch(0.269 0 0); + --ring: oklch(0.439 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(0.269 0 0); + --sidebar-ring: oklch(0.439 0 0); +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; + } + + .prose-invert { + color: rgb(255, 255, 255); + } + + .prose-invert p, + .prose-invert ul, + .prose-invert ol, + .prose-invert li, + .prose-invert strong, + .prose-invert em, + .prose-invert span, + .prose-invert div { + color: rgb(229, 231, 235) !important; + } + + .prose-invert strong { + color: rgb(255, 255, 255) !important; + font-weight: 600; + } + + .prose-invert ul, + .prose-invert ol { + padding-left: 1.5rem; + margin: 0.5rem 0; + } + + .prose-invert li { + margin: 0.25rem 0; + } +} diff --git a/kits/automation/meeting-action-agent/app/layout.tsx b/kits/automation/meeting-action-agent/app/layout.tsx new file mode 100644 index 00000000..c10cf18b --- /dev/null +++ b/kits/automation/meeting-action-agent/app/layout.tsx @@ -0,0 +1,28 @@ +import type { Metadata } from 'next' +import { Geist, Geist_Mono } from 'next/font/google' +import { Analytics } from '@vercel/analytics/next' +import './globals.css' + +const _geist = Geist({ subsets: ["latin"] }); +const _geistMono = Geist_Mono({ subsets: ["latin"] }); + +export const metadata: Metadata = { + title: 'Meeting Action Items Agent | Lamatic AgentKit', + description: 'Paste raw meeting notes and instantly extract prioritized action items, key decisions, and a follow-up email draft β€” powered by Lamatic AI.', + keywords: ['meeting', 'action items', 'AI', 'productivity', 'automation', 'lamatic'], +} + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + + {children} + + + + ) +} diff --git a/kits/automation/meeting-action-agent/app/page.tsx b/kits/automation/meeting-action-agent/app/page.tsx new file mode 100644 index 00000000..6bc45687 --- /dev/null +++ b/kits/automation/meeting-action-agent/app/page.tsx @@ -0,0 +1,383 @@ +"use client" + +import type React from "react" +import { useState } from "react" +import { Button } from "@/components/ui/button" +import { Textarea } from "@/components/ui/textarea" +import { Card } from "@/components/ui/card" +import { + Loader2, + Sparkles, + ClipboardList, + Copy, + Check, + RotateCcw, + CheckCircle2, + AlertCircle, + Clock, + User, + Mail, + FileText, +} from "lucide-react" +import { analyzeMeeting } from "@/actions/orchestrate" +import ReactMarkdown from "react-markdown" +import { Header } from "@/components/header" + +type Priority = "High" | "Medium" | "Low" + +type ActionItem = { + task: string + owner: string + deadline: string + priority: Priority +} + +type MeetingResult = { + decisions: string[] + action_items: ActionItem[] + summary_report: string + followup_email: string +} + +const priorityColors: Record = { + High: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400 border border-red-200 dark:border-red-800", + Medium: + "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800", + Low: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400 border border-green-200 dark:border-green-800", +} + +const SAMPLE_NOTES = `Team Sync - March 21, 2026 + +Attendees: Alice (PM), Bob (Backend), Carol (Design), Dave (Frontend) + +Alice: We need to launch the new onboarding flow by April 5th. Agreed? +All: Yes, that works. + +Bob: The API integration is done. Still need Carol to finish the UI mockups. +Carol: I'll have the mockups ready by March 25th. +Dave: Once I have the mockups I can build it in 3 days. + +Alice: Bob, can you also write unit tests for the new endpoints? +Bob: Sure, I'll add those by March 28th. + +Alice: Dave, please also update the README with the new setup steps. +Dave: Will do, I'll get that done by March 26th. + +Decision: We will use Stripe for payments instead of PayPal. +Decision: The beta will be invite-only for the first 2 weeks.` + +export default function MeetingAgentPage() { + const [meetingNotes, setMeetingNotes] = useState("") + const [isLoading, setIsLoading] = useState(false) + const [result, setResult] = useState(null) + const [rawResult, setRawResult] = useState(null) + const [error, setError] = useState("") + const [copiedEmail, setCopiedEmail] = useState(false) + const [copiedReport, setCopiedReport] = useState(false) + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault() + if (!meetingNotes.trim()) { + setError("Please paste your meeting notes first.") + return + } + setIsLoading(true) + setError("") + setResult(null) + setRawResult(null) + + try { + const response = await analyzeMeeting(meetingNotes) + console.log("[page] Full response:", JSON.stringify(response)) + + if (response.success) { + if (response.data) { + // Best case: structured data parsed correctly + setResult(response.data) + } else if (response.rawResult) { + // rawResult may be a string or an object β€” try to extract data from it + const raw = response.rawResult as any + if (typeof raw === "object" && raw !== null) { + // It's already a parsed object β€” check nested shapes + const inner = raw?.result ?? raw + if (inner?.decisions || inner?.action_items) { + setResult({ + decisions: Array.isArray(inner.decisions) ? inner.decisions : [], + action_items: Array.isArray(inner.action_items) + ? inner.action_items.map((item: any) => ({ + task: item.task ?? "", + owner: item.owner ?? "Unassigned", + deadline: item.deadline ?? "TBD", + priority: + (["High", "Medium", "Low"].includes( + (item.priority ?? "").charAt(0).toUpperCase() + + (item.priority ?? "").slice(1).toLowerCase(), + ) + ? (item.priority ?? "").charAt(0).toUpperCase() + + (item.priority ?? "").slice(1).toLowerCase() + : "Medium") as "High" | "Medium" | "Low", + })) + : [], + summary_report: inner.summary_report ?? "", + followup_email: inner.followup_email ?? "", + }) + } else { + setRawResult(JSON.stringify(raw, null, 2)) + } + } else { + setRawResult(String(raw)) + } + } + } else { + setError(response.error || "Analysis failed. Please try again.") + } + } catch (err) { + setError(err instanceof Error ? err.message : "An unexpected error occurred.") + } finally { + setIsLoading(false) + } + } + + const handleReset = () => { + setResult(null) + setRawResult(null) + setMeetingNotes("") + setError("") + setCopiedEmail(false) + setCopiedReport(false) + } + + const handleCopyEmail = async () => { + if (!result?.followup_email) return + await navigator.clipboard.writeText(result.followup_email) + setCopiedEmail(true) + setTimeout(() => setCopiedEmail(false), 2000) + } + + const handleCopyReport = async () => { + if (!result?.summary_report) return + await navigator.clipboard.writeText(result.summary_report) + setCopiedReport(true) + setTimeout(() => setCopiedReport(false), 2000) + } + + return ( +
+
+ +
+ {/* Input form β€” shown when no result yet */} + {!result && !rawResult && ( +
+
+
+
+
+ +
+
+

Meeting Action Agent

+

+ Paste your meeting notes and instantly get prioritized action items, decisions, and a follow-up email. +

+
+ + +
+
+ +