-
Notifications
You must be signed in to change notification settings - Fork 92
feat(automation): add Meeting Action Items Agent kit #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
harishghasolia07
wants to merge
9
commits into
Lamatic:main
Choose a base branch
from
harishghasolia07:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d9e7781
feat: Add meeting-action-agent kit
harishghasolia07 60510ff
security: Replace real API keys with placeholders in .env.example
harishghasolia07 f933407
Merge pull request #1 from harishghasolia07/meeting-action-agent
harishghasolia07 36745cd
version updated
harishghasolia07 e5cb90e
error fix
harishghasolia07 9576d17
minor changes
harishghasolia07 0256f2a
fix: safe priority normalization, remove production logs, fix .gitignore
harishghasolia07 269b391
Merge: resolve .gitignore conflict
harishghasolia07 f8d6650
Merge upstream/main and resolve .gitignore conflict
harishghasolia07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| **/.DS_Store | ||
|
|
||
| .env | ||
| .env | ||
| node_modules/ | ||
| .next/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| MEETING_ACTION_FLOW_ID="your-flow-id-here" | ||
| LAMATIC_API_URL="https://your-org.lamatic.dev/graphql" | ||
| LAMATIC_PROJECT_ID="your-project-id-here" | ||
| LAMATIC_API_KEY="your-api-key-here" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| # 📋 Meeting Action Items Agent | ||
|
|
||
| > **Problem:** After meetings, notes live in one place while tasks, docs, and follow-up emails live in others — so owners, deadlines, and priorities get lost in manual cleanup. | ||
| > **This kit:** One Lamatic flow + UI turns **pasted** notes or a transcript into **structured** decisions, **prioritized** action items (owner + deadline), a **markdown** summary, and a **ready-to-send** email draft — so you’re not re-typing the same meeting three times. | ||
|
|
||
| Built with [Lamatic AgentKit](https://github.com/Lamatic/AgentKit) · [Lamatic Studio](https://studio.lamatic.ai) · Next.js | ||
|
|
||
| **v1 scope:** text in (notes / pasted transcript). Audio file upload is out of scope for this kit. | ||
|
|
||
| --- | ||
|
|
||
| ## ✨ 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 | ||
|
|
||
| [](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) |
94 changes: 94 additions & 0 deletions
94
kits/automation/meeting-action-agent/actions/orchestrate.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| "use server" | ||
|
|
||
| import { lamaticClient } from "@/lib/lamatic-client" | ||
| import { normalizePriority } from "@/lib/priority" | ||
|
|
||
| type Priority = "High" | "Medium" | "Low" | ||
|
|
||
| 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") { | ||
| try { | ||
| const cleaned = c.replace(/```json\n?/g, "").replace(/```\n?/g, "").trim() | ||
| if (cleaned.startsWith("{")) { | ||
| 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 }) | ||
| if (process.env.NODE_ENV !== "production") { | ||
| console.debug("[meeting-agent] SDK response received") | ||
| } | ||
|
|
||
| const parsed = extractParsed(resData) | ||
| if (process.env.NODE_ENV !== "production") { | ||
| console.debug("[meeting-agent] Parsed payload extracted:", Boolean(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 during flow execution") | ||
| 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 } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mission-critical: harden
action_itemsmapping against null/primitive entries.LLM output can include
nullor non-object items; direct property access can throw and fail the whole action.Suggested diff
🤖 Prompt for AI Agents