Skip to content

feat: Meeting Intelligence Agent — Transform messy notes into action items#149

Open
AnuragDubey007 wants to merge 22 commits intoLamatic:old-mainfrom
AnuragDubey007:main
Open

feat: Meeting Intelligence Agent — Transform messy notes into action items#149
AnuragDubey007 wants to merge 22 commits intoLamatic:old-mainfrom
AnuragDubey007:main

Conversation

@AnuragDubey007
Copy link
Copy Markdown

@AnuragDubey007 AnuragDubey007 commented Apr 21, 2026

What This Kit Does

Transforms raw, messy meeting notes into structured action items, decisions, and follow-up questions — and automatically emails the report to your team.

Providers & Prerequisites

  • Groq API key (free) for Llama 3.3 70B
  • Gmail/SMTP credentials configured in Lamatic Connections
  • Lamatic.ai account (free)

How to Run Locally

  1. cd kits/automation/meeting-intelligence
  2. npm install
  3. cp .env.example .env.local and fill in values
  4. npm run dev

Live Preview

https://meeting-intelligence-tau.vercel.app/

Lamatic Flow

Flow ID: meeting-notes-extractor

Flow Architecture

API Request → Generate Text (Llama 3.3 70B via Groq) → Code Node (JSON parser + HTML builder) → SMTP Node (email delivery) → API Response

PR Checklist

  • Kit runs locally with npm run dev
  • .env.example has no secrets, only placeholders
  • README.md documents setup and usage
  • Folder structure follows kits/automation/meeting-intelligence/
  • config.json is present and valid
  • Vercel deployment works
  • Live preview URL works end-to-end
  • Files added (kit root & config)

    • .gitignore — excludes node_modules/, .env, .env.local, .next/
    • package.json — Next.js app scripts and dependencies
    • tsconfig.json — TypeScript config (strict, ES2017, Next plugin)
    • next.config.ts — Next.js config placeholder
    • postcss.config.mjs — PostCSS with Tailwind plugin
    • config.json — Kit metadata (Meeting Intelligence Agent) listing Groq & SMTP integrations
    • README.md — Kit documentation: purpose, prerequisites (Groq API key, Gmail/SMTP, Lamatic.ai), setup, local run, Vercel deploy, example output
  • Frontend & styles

    • app/layout.tsx — Root layout, fonts, metadata
    • app/page.tsx — Client page: meeting notes input, recipient email, Analyze action, displays summary, action items, decisions, follow-up questions, Copy All
    • app/globals.css — Tailwind-based global styles and light/dark theme variables
  • Backend & utilities

    • app/api/analyze/route.ts — POST API route that forwards {meetingNotes, recipientEmail} to Lamatic executeWorkflow GraphQL endpoint (uses LAMATIC_API_URL, LAMATIC_FLOW_ID)
    • actions/orchestrate.ts — Server action analyzeMeeting() that calls executeFlow(payload) from lamatic-client
    • lib/lamatic-client.ts — lamaticConfig (env-driven) and executeFlow(payload) which performs GraphQL executeWorkflow and returns result
  • Flow definition files

    • flows/meeting-notes-extractor/config.json — Flow definition (nodes, edges, wiring)
    • flows/meeting-notes-extractor/inputs.json — Node input definitions (LLM model selector, SMTP credential selector)
    • flows/meeting-notes-extractor/meta.json — Flow metadata
    • flows/meeting-notes-extractor/README.md — Flow-specific docs and contribution notes
  • Flow node types (from flows/meeting-notes-extractor/config.json)

    1. API Request (triggerNode) — entry point accepting meetingNotes and recipientEmail
    2. Generate Text (LLMNode) — Groq / groq/llama-3.3-70b-versatile with a system prompt that must return a single JSON object: { summary, actionItems[{task,owner,deadline,priority}], decisions[], followUpQuestions[] }
    3. Code Node (codeNode) — parses LLM JSON, builds HTML email body (summary, action items list, decisions) and outputs { summary, emailBody }; includes error fallback when parsing fails
    4. SMTP Node (smtpNode) — sends an HTML email to recipient (uses configured SMTP credential)
    5. API Response Node (responseNode) — returns the raw LLM generatedResponse as result to the API caller
  • High-level flow summary

    • End-to-end: API Request → LLM Generate Text (Groq Llama 3.3 70B) → Code node (JSON parse + HTML email build) → SMTP node (email delivery) → API Response.
    • Purpose: transform unstructured meeting notes into a structured JSON report (summary, action items with owner/deadline/priority, decisions, follow-ups), generate an HTML summary email, email it to the recipient, and return the LLM output to the API caller.

@github-actions
Copy link
Copy Markdown

PR Validation Results

New Contributions Detected

  • Kit: kits/automation/meeting-intelligence

Check Results

Check Status
No edits to existing projects ✅ Pass
Required root files present ✅ Pass
Flow folder structure valid ✅ Pass
No changes outside contribution dirs ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Walkthrough

Adds a Meeting Intelligence kit: a Next.js app plus Lamatic flow and client integration that extracts structured meeting data via an LLM, composes an HTML email, sends it via SMTP, and exposes a frontend and API to trigger the flow.

Changes

Meeting Intelligence Kit (single cohesive DAG)

Layer / File(s) Summary
Project metadata & toolchain
kits/automation/meeting-intelligence/package.json, kits/automation/meeting-intelligence/tsconfig.json, kits/automation/meeting-intelligence/next.config.ts, kits/automation/meeting-intelligence/postcss.config.mjs, kits/automation/meeting-intelligence/.gitignore
Adds project manifest, strict TypeScript config with Next.js plugin and path alias, placeholder Next config, PostCSS/Tailwind plugin config, and .gitignore excluding node_modules, .env*, and .next.
Lamatic client & API wiring
kits/automation/meeting-intelligence/lib/lamatic-client.ts, kits/automation/meeting-intelligence/app/api/analyze/route.ts, kits/automation/meeting-intelligence/actions/orchestrate.ts
Introduces lamaticConfig and executeFlow(payload) to perform the GraphQL executeWorkflow POST; adds a Next.js API POST route that forwards meetingNotes/recipientEmail to Lamatic; updates server action analyzeMeeting to call executeFlow.
Flow definition & inputs
kits/automation/meeting-intelligence/flows/meeting-notes-extractor/config.json, kits/automation/meeting-intelligence/flows/meeting-notes-extractor/inputs.json, kits/automation/meeting-intelligence/flows/meeting-notes-extractor/meta.json
Adds a Lamatic flow config: API Request → Generate Text (LLM) → Code (parse JSON, build HTML) → SMTP → API Response; defines private inputs for model selection and SMTP credentials and adds flow manifest metadata.
Kit config & docs
kits/automation/meeting-intelligence/config.json, kits/automation/meeting-intelligence/README.md, kits/automation/meeting-intelligence/flows/meeting-notes-extractor/README.md
Adds kit-level configuration declaring features/integrations and comprehensive README describing architecture, setup, example output, and flow README with node descriptions and contribution guidance.
Frontend layout & styling
kits/automation/meeting-intelligence/app/globals.css, kits/automation/meeting-intelligence/app/layout.tsx
Adds Tailwind global stylesheet with light/dark CSS variables and body/font settings; adds Next.js root layout exporting metadata and applying font variables.
Client UI
kits/automation/meeting-intelligence/app/page.tsx
Adds the client page: form for meeting notes and recipient email, POST to /api/analyze, handles response to render summary, action items (owner/deadline/priority), decisions, follow-up questions, and "Copy All" clipboard action.

Suggested reviewers

  • amanintech
  • d-pamneja
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly summarizes the main change: introducing a Meeting Intelligence Agent kit that transforms meeting notes into structured action items.
Description check ✅ Passed The description covers most required checklist items (kit functionality, prerequisites, local setup, live preview, flow architecture, and completed checklist), though it lacks explicit mention of .env.example file and some structural details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@AnuragDubey007
Copy link
Copy Markdown
Author

@coderabbitai review
Label: mission-possible

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

@AnuragDubey007 — Agent, your mission has been acknowledged. 🎯

This message will self-destruct in five seconds... just kidding. Initiating a full review of PR #149 — the Meeting Intelligence Agent kit. I'll be scanning the drop point (kits/automation/meeting-intelligence/) for any vulnerabilities, structural deviations, or exposed credentials before this operation goes live.

⚠️ Standing directive from prior intelligence: All Lamatic credentials (LAMATIC_PROJECT_ENDPOINT, LAMATIC_PROJECT_ID, LAMATIC_PROJECT_API_KEY, LAMATIC_FLOW_ID) and any JWT secrets must be server-only env vars — no NEXT_PUBLIC_ prefix. API routes require server-side JWT authentication using the jose library (HS256, 2-minute TTL). I'll be verifying compliance during the sweep.

Good luck. The Agency is watching. 🕵️


🧠 Learnings used
Learnt from: amanintech
Repo: Lamatic/AgentKit PR: 80
File: kits/automation/support-triage/app/utils.ts:0-0
Timestamp: 2026-03-27T19:13:32.229Z
Learning: In `kits/automation/support-triage`, the maintainer (amanintech) requires server-side JWT authentication for API routes. Use the `jose` library with an `HS256` short-lived JWT (2-minute TTL) issued by `/api/token` and verified in `/api/triage`. The JWT_SECRET must be a non-NEXT_PUBLIC_ env var. All Lamatic credentials (LAMATIC_PROJECT_ENDPOINT, LAMATIC_PROJECT_ID, LAMATIC_PROJECT_API_KEY, LAMATIC_FLOW_ID) must also be non-NEXT_PUBLIC_ and server-only.
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot requested review from amanintech and d-pamneja April 21, 2026 17:45
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 18

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@kits/automation/meeting-intelligence/actions/orchestrate.ts`:
- Around line 3-36: analyzeMeeting contains duplicated raw GraphQL logic and
should be removed or refactored to use the shared SDK: delete the orphaned
server action file if there are no call sites; otherwise replace the body of
analyzeMeeting to import executeFlow from lib/lamatic-client.ts, call
executeFlow({ workflowId: process.env.LAMATIC_FLOW_ID, payload: { meetingNotes,
recipientEmail } }) and return its result, and ensure environment flow IDs are
read from process.env as in the existing SDK abstraction.

In `@kits/automation/meeting-intelligence/app/api/analyze/route.ts`:
- Around line 6-40: Replace the in-file GraphQL fetch in analyze/route.ts with a
call to the shared Lamatic client: locate the duplicated logic that builds the
query, headers, variables (using workflowId, meetingNotes, recipientEmail) and
the response extraction, and instead call the exported executeFlow (or
executeWorkflow/executeFlowAsync) function from lib/lamatic-client.ts passing
meetingNotes and recipientEmail (and letting it supply auth/project/workflowId);
return the executeFlow result (or map its response to the same shape the route
expects) and remove the local fetch/query/response.json/result extraction so all
Lamatic request behavior is centralized in executeFlow.
- Around line 3-40: Protect the POST handler in route.ts by verifying an HS256
JWT from the Authorization: Bearer <token> header using the jose library and the
JWT_SECRET env var before executing the Lamatic call: in POST(req: NextRequest)
extract the bearer token, run jwtVerify(token, new
TextEncoder().encode(process.env.JWT_SECRET)) and return 401/403 for
missing/invalid tokens; only proceed to build and call Lamatic when verification
succeeds. Also add a new /api/token endpoint (e.g., a new POST handler) that
authenticates the client (validate a simple client credential or shared secret
from an env var like CLIENT_AUTH_SECRET) and issues a short-lived HS256 token
signed with process.env.JWT_SECRET and exp = 2 minutes (use jose SignJWT).
Ensure all token-related errors return appropriate 401 responses and do not
change the existing Lamatic call logic in POST except gating it behind the
verified token check.

In `@kits/automation/meeting-intelligence/app/globals.css`:
- Around line 22-26: The body selector in globals.css currently hard-codes
"font-family: Arial, Helvetica, sans-serif", which overrides the theme token
exposed as --font-sans in layout.tsx; either remove the body font-family
declaration or change it to use the theme token (font-family: var(--font-sans))
so the Geist font (--font-geist-sans) can take effect; update the body rule in
globals.css to reference --font-sans (or delete the rule) and verify layout.tsx
continues to set --font-sans correctly.

In `@kits/automation/meeting-intelligence/app/layout.tsx`:
- Around line 15-18: The exported metadata object (export const metadata:
Metadata) still contains the scaffold defaults ("Create Next App" / "Generated
by create next app"); update the metadata constant in layout.tsx to use
kit-appropriate values (e.g., title: "Meeting Intelligence" and a descriptive
description such as "AI-powered meeting summaries and insights from the Meeting
Intelligence kit") so the browser tab, social previews, and SEO reflect the app
identity.

In `@kits/automation/meeting-intelligence/app/page.tsx`:
- Around line 56-72: The copyToClipboard function currently calls
navigator.clipboard.writeText without awaiting it and immediately shows an
alert; make copyToClipboard async, await navigator.clipboard.writeText(text),
handle errors with a try/catch, call setError(...) on failure (and avoid showing
the success alert when writeText rejects), and only show the "Copied to
clipboard!" alert when the awaited writeText completes successfully; reference
the copyToClipboard function, result, navigator.clipboard.writeText, and
setError state in your changes.
- Around line 138-140: Replace inline SVG spinner and emoji/inline icons in the
component with lucide-react components: swap the spinner SVG (the animate-spin
circle/path) for Loader2, and replace emojis with ClipboardList, CheckCircle2,
User, Calendar, Hammer, and CircleHelp respectively; update any decorative
checkmark/question elements to use the appropriate icon variants from
lucide-react. Also fix the clipboard copy handler that calls
navigator.clipboard.writeText() by awaiting the Promise and only showing the
success alert after the await resolves, and add a catch to handle and surface
copy failures. Locate these changes around the spinner SVG, the emoji icon
usages (previously at lines referenced in the review), and the clipboard call to
navigator.clipboard.writeText() to apply the fixes.

In `@kits/automation/meeting-intelligence/config.json`:
- Around line 1-27: The config.json contains an empty documentationUrl which
will render as a dead link; update the "documentationUrl" field in config.json
to either a valid documentation URL (e.g., the kit README or demo docs) or
remove the "documentationUrl" key entirely so the catalog won't render an empty
anchor—ensure you modify the "documentationUrl" property in the existing JSON
rather than adding a duplicate key.

In
`@kits/automation/meeting-intelligence/flows/meeting-notes-extractor/config.json`:
- Around line 53-62: The config.json export includes account-specific credential
bindings (fields credentialId and credential_name inside the generativeModelName
entry for configA) and a personal SMTP credential; remove these sensitive
identifiers by clearing credentialId and credential_name (or setting them
null/empty) and ensure the node in the Lamatic Studio editor is unbound so users
must supply credentials via inputs.json; re-open the flow in the Studio node
editor, unbind/clear any credential selections for the generativeModelName node
(configName "configA") and the SMTP node, save and re-export the config.json so
the exported flow contains no account-specific credential bindings.

In
`@kits/automation/meeting-intelligence/flows/meeting-notes-extractor/meta.json`:
- Around line 3-8: The meta.json manifest for the Meeting Notes Extractor flow
is missing metadata fields; populate the "description", "tags", "testInput",
"githubUrl", "documentationUrl", and "deployUrl" keys with meaningful values (or
remove unused keys) so the kit catalog can render the card correctly; update the
"description" to a concise summary of the flow, add one or more comma-separated
"tags" for discovery, provide a representative "testInput" transcript snippet,
and fill "githubUrl", "documentationUrl", and "deployUrl" with the appropriate
repo/docs/deployment links (or omit keys if not applicable).

In
`@kits/automation/meeting-intelligence/flows/meeting-notes-extractor/README.md`:
- Around line 20-24: The package manifest currently omits README.md so exported
flows miss a required file; update the flow export manifest/packaging
configuration (the files array or export list for the flow export) to include
"README.md" alongside "config.json", "inputs.json", and "meta.json" so all four
required files in the flows/ directory are bundled; locate the export
configuration or function responsible for building the flow package (e.g., the
manifest/files array or export list used by the flow exporter) and add
"README.md" to that list, then run the flow export to verify README.md is
included.

In `@kits/automation/meeting-intelligence/lib/lamatic-client.ts`:
- Around line 8-39: The executeFlow function silently swallows failures and can
hang; update executeFlow to (1) tighten the payload type to { meetingNotes:
string; recipientEmail: string } so callers can't pass unexpected keys, (2)
attach an AbortController with a configurable timeout to the fetch call using
lamaticConfig or a default, (3) check response.ok and, if false, parse and
include HTTP status and body text in a structured error, (4) defensively parse
JSON (handle non-JSON body) and surface GraphQL-level errors by returning or
throwing a detailed object that includes response.status, statusText, any parsed
errors array, and the raw body, and (5) avoid returning a generic { error: "No
result" } so callers (e.g., actions/orchestrate.ts and app/api/analyze/route.ts)
can distinguish auth/validation/server/parse/timeout failures; locate and modify
executeFlow, lamaticConfig usage, and the fetch/response handling to implement
these changes.
- Around line 1-6: Replace the custom fetch+GraphQL implementation in
lib/lamatic-client.ts (and the exported lamaticConfig object) with the standard
SDK pattern used elsewhere: validate presence of process.env.LAMATIC_API_URL,
process.env.LAMATIC_PROJECT_ID and process.env.LAMATIC_API_KEY early and throw a
clear Error if missing, then instantiate and export a single lamaticClient = new
Lamatic({ endpoint: process.env.LAMATIC_API_URL, projectId:
process.env.LAMATIC_PROJECT_ID, apiKey: process.env.LAMATIC_API_KEY }); remove
the brittle hardcoded GraphQL query logic that only handles
meetingNotes/recipientEmail so payload keys aren’t dropped and rely on the SDK’s
typing/retries/schema validation instead.

In `@kits/automation/meeting-intelligence/package.json`:
- Around line 16-25: Update package.json devDependencies to use exact pinned
versions instead of caret ranges: replace "@tailwindcss/postcss", "@types/node",
"@types/react", "@types/react-dom", "eslint", "eslint-config-next",
"tailwindcss", and "typescript" entries in the devDependencies object with
concrete version strings you have tested (no ^ or ~), ensuring each value is a
single exact version; keep the same keys and only change the version strings so
builds are reproducible.
- Line 9: The package.json "lint" script currently is just "eslint" with no
target; update the "lint" npm script entry (the "lint" key in package.json) to
invoke ESLint against the current directory (e.g., include "./" or "." as the
target) so it runs deterministically after the Next.js upgrade—modify the "lint"
script value to include the directory target.

In `@kits/automation/meeting-intelligence/README.md`:
- Around line 118-125: The README currently instructs users to recreate the five
Lamatic nodes manually; instead update it to tell users to import the shipped
flow export at flows/meeting-notes-extractor/ into Lamatic Studio, deploy that
imported flow, and set its private inputs (SMTP and project credentials) via the
flow's inputs (e.g., inputs.json) or Lamatic Connections; ensure you reference
the included export files (config.json, inputs.json, meta.json, README.md) and
instruct users to copy the Flow ID and any required project credentials into
.env.local after import.
- Around line 93-99: Replace the standalone repo clone instructions with steps
that instruct users to clone the main AgentKit repository and then change into
this kit's directory; specifically update the README.md's setup section to run
git clone for the AgentKit repo and then cd into
kits/automation/meeting-intelligence so users land in this kit (edit the section
that currently contains the standalone repo URL and thegit clone/cd commands).
- Around line 193-194: Update the broken relative link to the repository
CONTRIBUTING.md in the README: locate the link text "CONTRIBUTING.md" in
kits/automation/meeting-intelligence/README.md (the lines containing "See
[CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines.") and change the path
from ../../CONTRIBUTING.md to ../../../CONTRIBUTING.md so it correctly points to
the repository root CONTRIBUTING.md.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 95945cc0-5cd3-4bff-957b-b02e0fda8aa4

📥 Commits

Reviewing files that changed from the base of the PR and between 113298a and 543d9cb.

⛔ Files ignored due to path filters (6)
  • kits/automation/meeting-intelligence/app/favicon.ico is excluded by !**/*.ico
  • kits/automation/meeting-intelligence/public/file.svg is excluded by !**/*.svg
  • kits/automation/meeting-intelligence/public/globe.svg is excluded by !**/*.svg
  • kits/automation/meeting-intelligence/public/next.svg is excluded by !**/*.svg
  • kits/automation/meeting-intelligence/public/vercel.svg is excluded by !**/*.svg
  • kits/automation/meeting-intelligence/public/window.svg is excluded by !**/*.svg
📒 Files selected for processing (18)
  • kits/automation/meeting-intelligence/.env.example
  • kits/automation/meeting-intelligence/.gitignore
  • kits/automation/meeting-intelligence/README.md
  • kits/automation/meeting-intelligence/actions/orchestrate.ts
  • kits/automation/meeting-intelligence/app/api/analyze/route.ts
  • kits/automation/meeting-intelligence/app/globals.css
  • kits/automation/meeting-intelligence/app/layout.tsx
  • kits/automation/meeting-intelligence/app/page.tsx
  • kits/automation/meeting-intelligence/config.json
  • kits/automation/meeting-intelligence/flows/meeting-notes-extractor/README.md
  • kits/automation/meeting-intelligence/flows/meeting-notes-extractor/config.json
  • kits/automation/meeting-intelligence/flows/meeting-notes-extractor/inputs.json
  • kits/automation/meeting-intelligence/flows/meeting-notes-extractor/meta.json
  • kits/automation/meeting-intelligence/lib/lamatic-client.ts
  • kits/automation/meeting-intelligence/next.config.ts
  • kits/automation/meeting-intelligence/package.json
  • kits/automation/meeting-intelligence/postcss.config.mjs
  • kits/automation/meeting-intelligence/tsconfig.json

Comment thread kits/automation/meeting-intelligence/actions/orchestrate.ts
Comment thread kits/automation/meeting-intelligence/app/api/analyze/route.ts
Comment on lines +6 to +40
const query = `
query ExecuteWorkflow($workflowId: String!, $meetingNotes: String, $recipientEmail: String) {
executeWorkflow(
workflowId: $workflowId
payload: { meetingNotes: $meetingNotes, recipientEmail: $recipientEmail }
) {
status
result
}
}
`;

const response = await fetch(process.env.LAMATIC_API_URL!, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${process.env.LAMATIC_API_KEY}`,
"x-project-id": process.env.LAMATIC_PROJECT_ID!,
},
body: JSON.stringify({
query,
variables: {
workflowId: process.env.LAMATIC_FLOW_ID,
meetingNotes,
recipientEmail,
},
}),
});

const data = await response.json();


const result = data?.data?.executeWorkflow?.result?.result;

return NextResponse.json(result ?? { error: "No result" });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Mission cleanup: reuse the shared Lamatic flow client.

This route duplicates the GraphQL query, headers, variables, and result extraction already present in lib/lamatic-client.ts. After adding auth, call executeFlow() here to keep Lamatic request behavior in one place.

♻️ Proposed refactor
 import { NextRequest, NextResponse } from "next/server";
+import { executeFlow } from "@/lib/lamatic-client";

 export async function POST(req: NextRequest) {
   const { meetingNotes, recipientEmail } = await req.json();
-
-  const query = `
-    query ExecuteWorkflow($workflowId: String!, $meetingNotes: String, $recipientEmail: String) {
-      executeWorkflow(
-        workflowId: $workflowId
-        payload: { meetingNotes: $meetingNotes, recipientEmail: $recipientEmail }
-      ) {
-        status
-        result
-      }
-    }
-  `;
-
-  const response = await fetch(process.env.LAMATIC_API_URL!, {
-    method: "POST",
-    headers: {
-      "Content-Type": "application/json",
-      "Authorization": `Bearer ${process.env.LAMATIC_API_KEY}`,
-      "x-project-id": process.env.LAMATIC_PROJECT_ID!,
-    },
-    body: JSON.stringify({
-      query,
-      variables: {
-        workflowId: process.env.LAMATIC_FLOW_ID,
-        meetingNotes,
-        recipientEmail,
-      },
-    }),
-  });
-
-  const data = await response.json();
-  
-  
-  const result = data?.data?.executeWorkflow?.result?.result;
-
-  return NextResponse.json(result ?? { error: "No result" });
+  const result = await executeFlow({ meetingNotes, recipientEmail });
+  return NextResponse.json(result);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/automation/meeting-intelligence/app/api/analyze/route.ts` around lines 6
- 40, Replace the in-file GraphQL fetch in analyze/route.ts with a call to the
shared Lamatic client: locate the duplicated logic that builds the query,
headers, variables (using workflowId, meetingNotes, recipientEmail) and the
response extraction, and instead call the exported executeFlow (or
executeWorkflow/executeFlowAsync) function from lib/lamatic-client.ts passing
meetingNotes and recipientEmail (and letting it supply auth/project/workflowId);
return the executeFlow result (or map its response to the same shape the route
expects) and remove the local fetch/query/response.json/result extraction so all
Lamatic request behavior is centralized in executeFlow.

Comment thread kits/automation/meeting-intelligence/app/globals.css
Comment thread kits/automation/meeting-intelligence/app/layout.tsx
Comment thread kits/automation/meeting-intelligence/package.json Outdated
Comment thread kits/automation/meeting-intelligence/package.json
Comment thread kits/automation/meeting-intelligence/README.md Outdated
Comment thread kits/automation/meeting-intelligence/README.md
Comment thread kits/automation/meeting-intelligence/README.md Outdated
AnuragDubey007 and others added 7 commits April 22, 2026 01:13
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Replaced raw fetch call with executeFlow function for executing workflows.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
kits/automation/meeting-intelligence/README.md (1)

93-96: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Mission briefing incomplete: setup step is missing executable commands.

The “Clone and install” section is empty, so first-time users cannot reliably bootstrap the kit.

🛠️ Proposed patch
 ### 1. Clone and install
 
+```bash
+git clone https://github.com/Lamatic/AgentKit.git
+cd AgentKit/kits/automation/meeting-intelligence
+npm install
+```

As per coding guidelines, kits/**/README.md: "Every kit must have a README.md that documents setup, environment variables, and usage".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/automation/meeting-intelligence/README.md` around lines 93 - 96,
Populate the "Clone and install" and "Set up environment variables" sections in
the README by adding explicit bootstrap commands and example env vars: under the
"Clone and install" heading add the git clone, cd into the kit directory, and
npm install (or yarn) commands; under "Set up environment variables" list
required variables with example values or a .env sample and how to load it
(e.g., export or cp .env.example .env), referencing the README section headings
"Clone and install" and "Set up environment variables" so reviewers can locate
the edits quickly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@kits/automation/meeting-intelligence/actions/orchestrate.ts`:
- Around line 6-9: The call to executeFlow in orchestrate.ts incorrectly
supplies two arguments (process.env.LAMATIC_FLOW_ID! and the payload) while the
declared function signature in lamatic-client.ts is executeFlow(payload:
Record<string,string>); remove the first argument so the call becomes a single
payload object (include meetingNotes and recipientEmail) to match executeFlow's
contract and avoid the TypeScript build error.

In `@kits/automation/meeting-intelligence/README.md`:
- Around line 38-40: Update step 2 in the README so it accurately describes the
request flow: change the statement that the frontend sends data directly to
Lamatic GraphQL to indicate the Next.js frontend posts to the local API route
(/api/analyze implemented in app/api/analyze/route.ts), which then
forwards/queries Lamatic GraphQL; reference the Next.js UI, the /api/analyze
route, and Lamatic GraphQL in the revised wording so readers can follow the
exact flow.

---

Duplicate comments:
In `@kits/automation/meeting-intelligence/README.md`:
- Around line 93-96: Populate the "Clone and install" and "Set up environment
variables" sections in the README by adding explicit bootstrap commands and
example env vars: under the "Clone and install" heading add the git clone, cd
into the kit directory, and npm install (or yarn) commands; under "Set up
environment variables" list required variables with example values or a .env
sample and how to load it (e.g., export or cp .env.example .env), referencing
the README section headings "Clone and install" and "Set up environment
variables" so reviewers can locate the edits quickly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: ff41de08-51f8-41bc-a2b4-03804400eed1

📥 Commits

Reviewing files that changed from the base of the PR and between 543d9cb and 4dd69b0.

📒 Files selected for processing (5)
  • kits/automation/meeting-intelligence/README.md
  • kits/automation/meeting-intelligence/actions/orchestrate.ts
  • kits/automation/meeting-intelligence/app/globals.css
  • kits/automation/meeting-intelligence/app/layout.tsx
  • kits/automation/meeting-intelligence/package.json

Comment on lines +6 to +9
const result = await executeFlow(
process.env.LAMATIC_FLOW_ID!,
{ meetingNotes, recipientEmail }
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify declaration and call-site arity for executeFlow.
ast-grep --lang ts --pattern 'export async function executeFlow($_) { $$$ }' kits/automation/meeting-intelligence/lib/lamatic-client.ts
ast-grep --lang ts --pattern 'executeFlow($_, $_)' kits/automation/meeting-intelligence/actions/orchestrate.ts
rg -nP -C2 'export\s+async\s+function\s+executeFlow\s*\(' kits/automation/meeting-intelligence/lib/lamatic-client.ts
rg -nP -C2 '\bexecuteFlow\s*\(' kits/automation/meeting-intelligence/actions/orchestrate.ts

Repository: Lamatic/AgentKit

Length of output: 3760


Your mission, should you choose to accept: fix this function contract before merging.

The call at lines 6–9 passes two arguments to executeFlow, but the function declared in kits/automation/meeting-intelligence/lib/lamatic-client.ts accepts only one parameter—payload: Record<string, string>. This is a TypeScript build-breaker.

The implementation reads the flow ID from lamaticConfig.flowId, not from the call site. Correct the call to match the contract:

-  const result = await executeFlow(
-    process.env.LAMATIC_FLOW_ID!,
-    { meetingNotes, recipientEmail }
-  );
+  const result = await executeFlow({ meetingNotes, recipientEmail });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const result = await executeFlow(
process.env.LAMATIC_FLOW_ID!,
{ meetingNotes, recipientEmail }
);
const result = await executeFlow({ meetingNotes, recipientEmail });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/automation/meeting-intelligence/actions/orchestrate.ts` around lines 6 -
9, The call to executeFlow in orchestrate.ts incorrectly supplies two arguments
(process.env.LAMATIC_FLOW_ID! and the payload) while the declared function
signature in lamatic-client.ts is executeFlow(payload: Record<string,string>);
remove the first argument so the call becomes a single payload object (include
meetingNotes and recipientEmail) to match executeFlow's contract and avoid the
TypeScript build error.

Comment on lines +38 to +40
1. User pastes messy meeting notes and enters recipient email in the Next.js UI
2. Frontend sends the data to Lamatic via GraphQL API
3. **LLM Node** extracts structured JSON from the raw notes using Llama 3.3 70B
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Mission telemetry mismatch: request path description is inaccurate.

Line 39 says the frontend sends data directly to Lamatic GraphQL, but this kit structure includes app/api/analyze/route.ts; the step should describe frontend → /api/analyze → Lamatic.

✏️ Suggested wording
-2. Frontend sends the data to Lamatic via GraphQL API
-3. **LLM Node** extracts structured JSON from the raw notes using Llama 3.3 70B
+2. Frontend sends the data to the Next.js API route (`/api/analyze`)
+3. Backend route forwards the payload to Lamatic GraphQL (`executeWorkflow`)
+4. **LLM Node** extracts structured JSON from the raw notes using Llama 3.3 70B
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/automation/meeting-intelligence/README.md` around lines 38 - 40, Update
step 2 in the README so it accurately describes the request flow: change the
statement that the frontend sends data directly to Lamatic GraphQL to indicate
the Next.js frontend posts to the local API route (/api/analyze implemented in
app/api/analyze/route.ts), which then forwards/queries Lamatic GraphQL;
reference the Next.js UI, the /api/analyze route, and Lamatic GraphQL in the
revised wording so readers can follow the exact flow.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Hi @AnuragDubey007! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants