Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/lamatic-update.yml
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.

This is not needed, kindly if you could remove this

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Detect & Sync Lamatic Flows

on:
push:
branches:
- main
paths:
- '**/lamatic/flows/**'
Comment on lines +7 to +8
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 | 🟠 Major

Mission-critical: Workflow trigger misses the new kit flow path.

This workflow watches **/lamatic/flows/**, but this PR’s flow lives under kits/agentic/mvp-builder/flows/...; sync won’t fire for those changes.

Proposed patch
 on:
   push:
     branches:
       - main
     paths:
       - '**/lamatic/flows/**'
+      - 'kits/**/flows/**'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/lamatic-update.yml around lines 7 - 8, The workflow's
paths filter only watches '**/lamatic/flows/**' so changes under
'kits/agentic/mvp-builder/flows/...' won't trigger it; update the paths list
(the paths: array in the workflow) to include the kit flow pattern—e.g. add
'kits/**/flows/**' or '**/kits/**/flows/**' alongside '**/lamatic/flows/**' so
changes in kits/agentic/mvp-builder/flows will fire the workflow.


jobs:
detect-flow-changes:
environment: main
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[LAMATIC-COMMIT]')"
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Sync Flows to lamatic
uses: Lamatic/sync-flows-to-lamatic@v1
with:
lamatic-endpoint: ${{ secrets.LAMATIC_PROJECT_ENDPOINT }}
api-key: ${{ secrets.LAMATIC_PROJECT_API_KEY }}
project-id: ${{ secrets.LAMATIC_PROJECT_ID }}
auto-deploy: ${{ secrets.LAMATIC_AUTO_DEPLOY_PROJECT }}

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

Mission cleanup: Remove trailing empty line to satisfy YAML lint.

Static analysis already flags this as an empty-lines error.

🧰 Tools
🪛 YAMLlint (1.38.0)

[error] 26-26: too many blank lines (1 > 0)

(empty-lines)

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

In @.github/workflows/lamatic-update.yml at line 26, Remove the trailing empty
line at the end of .github/workflows/lamatic-update.yml to satisfy the YAML
linter (fix the `empty-lines` error); open the file and delete the final blank
newline so the file ends immediately after the last YAML token, then save and
re-run linting to confirm the error is resolved.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Each kit includes configuration instructions, environment variables/lamatic-conf
| **🧠 Agentic Kits** | Advanced self-directed, reasoning agents for goal-driven operations | | | [`/kits/agentic`](./kits/agentic) |
| **Deep Search Agent** | A Next.js starter kit for goal-driven reasoning agents using Lamatic Flows. | Available | [![Live Demo](https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge)](https://agent-kit-reasoning.vercel.app) | [`/kits/agentic/deep-search`](./kits/agentic/deep-search) |
| **Generation Agent** | A Next.js starter kit for generating text/json/image content using Lamatic Flows. | Available | [![Live Demo](https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge)](https://agent-kit-generation.vercel.app) | [`/kits/agentic/generation`](./kits/agentic/generation) |
| **MVP Planner Agent** | A Next.js starter kit for generating a MVP plan for a project idea. | Available | [![Live Demo](https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge)](https://mvp-builder-sigma.vercel.app/) | [`/kits/agentic/mvp-builder`](./kits/agentic/mvp-builder) |
||
| **🤖 Automation Kits** | Automate complex business processes with robust and flexible agent workflows | | | [`/kits/automation`](./kits/automation) |
| **Hiring Automation** | A Next.js starter kit for hiring automation using Lamatic Flows. | Available | [![Live Demo](https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge)](https://agent-kit-hiring.vercel.app) | [`/kits/automation/hiring`](./kits/automation/hiring) |
Expand Down
4 changes: 4 additions & 0 deletions kits/agentic/mvp-builder/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
LAMATIC_API_URL = "YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
LAMATIC_API_KEY = "YOUR_API_KEY"
Comment on lines +1 to +4
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

Fix .env formatting: remove spaces around = and add trailing newline.

Spaces around = can cause parsing issues with some dotenv implementations. Standard .env format uses KEY=value without spaces.

🔧 Proposed fix
-AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
-LAMATIC_API_URL = "YOUR_API_ENDPOINT"
-LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
-LAMATIC_API_KEY = "YOUR_API_KEY"
+AGENTIC_GENERATE_CONTENT="YOUR_FLOW_ID"
+LAMATIC_API_KEY="YOUR_API_KEY"
+LAMATIC_API_URL="YOUR_API_ENDPOINT"
+LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"
📝 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
AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
LAMATIC_API_URL = "YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
LAMATIC_API_KEY = "YOUR_API_KEY"
AGENTIC_GENERATE_CONTENT="YOUR_FLOW_ID"
LAMATIC_API_KEY="YOUR_API_KEY"
LAMATIC_API_URL="YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 1-1: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 2-2: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 3-3: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 4-4: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)


[warning] 4-4: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 4-4: [UnorderedKey] The LAMATIC_API_KEY key should go before the LAMATIC_API_URL key

(UnorderedKey)

43 changes: 43 additions & 0 deletions kits/agentic/mvp-builder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
!.env.example

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
.context
213 changes: 213 additions & 0 deletions kits/agentic/mvp-builder/README.md
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.

Could you add a live demo link to this file? would allow us to view the functionality better, and allow users to see the kit before forking it. otherwise, LGTM. Thanks!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

yeah the link works, just if you could add it to the README.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# MVP Builder – Idea to Production Plan using Lamatic AgentKit

Generate a complete MVP blueprint from a single idea using Lamatic flows.

This project takes a raw product idea and transforms it into a structured plan including:

- App type classification
- Core features
- Database schema
- API routes
- Project structure
- Tech stack
- Summary

---

## What This Kit Does

This kit converts a simple idea into a production-ready MVP plan using a multi-step Lamatic flow.

Instead of generating everything in one prompt, it uses a **chained agent workflow**:

1. Classifies the idea (web app, mobile app, extension, API)
2. Generates features
3. Designs database schema
4. Creates API routes
5. Builds project structure
6. Suggests tech stack
7. Produces a final summary

Each step builds on previous outputs, ensuring structured and coherent results.

---

## Demo Flow

```txt
User Input (idea)
Lamatic Flow (7 nodes)
Structured JSON (Plan)
Next.js UI Rendering
```

---

## Flow Architecture

This kit uses a chained Instructor-based architecture:

1. Classify idea type
2. Generate features
3. Generate database schema
4. Generate API routes
5. Generate project structure
6. Generate tech stack
7. Generate summary

---

## Tech Stack

- **Frontend:** Next.js (App Router) + TailwindCSS
- **Backend:** Next.js Server Actions
- **AI Orchestration:** Lamatic AgentKit
- **Language:** TypeScript

---

## Folder Structure

```txt
.
├── actions/
│ └── orchestrate.ts # Calls Lamatic flow
├── app/
│ ├── page.tsx # Input screen
│ └── plan/page.tsx # Result screen
├── components/
│ ├── content.tsx # UI renderer for plan
│ └── loading.tsx
├── flows/
│ └── mvp-builder/ # Exported Lamatic flow
├── lib/
│ └── lamatic-client.ts # SDK client
├── orchestrate.js # Flow config
├── types/
│ └── index.ts # Plan types
```

---

## Prerequisites

- Node.js 18+
- pnpm
- Lamatic account

---

## Environment Variables

Create a `.env` file using:

```env
AGENTIC_GENERATE_CONTENT="YOUR_FLOW_ID"
LAMATIC_API_URL="YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"
LAMATIC_API_KEY="YOUR_API_KEY"
```

Reference:

---
Comment on lines +114 to +116
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

Incomplete "Reference:" line.

Line 116 contains "Reference:" with no content following it. Either add the intended reference or remove this line.


## Setup Instructions

Install dependencies:

```bash
pnpm install
```

Run development server:

```bash
pnpm dev
```

What this does:

- Starts Next.js dev server
- Enables server actions
- Connects to Lamatic flow via SDK

---

## How It Works

### 1. User Input

User enters an idea on `/`

---

### 2. Server Action

`actions/orchestrate.ts`:

- Sends idea to Lamatic
- Executes flow via SDK
- Returns structured response

---

### 3. Lamatic Flow

Flow consists of multiple Instructor LLM nodes:

- Each node updates part of the JSON
- Uses schema enforcement
- Passes context forward

---

### 4. UI Rendering

`components/content.tsx`:

- Displays:
- Features
- Tech stack
- Database tables
- API routes
- Project structure

---

## Example Output

```json
{
"type": "web_app",
"features": [...],
"database": { "tables": [...] },
"api": { "routes": [...] },
"structure": {...},
"tech_stack": {...},
"summary": "..."
}
```

---

## How to Run Locally

1. Clone repo
2. Add `.env`
3. Run:

```bash
pnpm dev
```

4. Open:

```
http://localhost:3000
```
Comment on lines +209 to +211
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

Add language specifier to fenced code block.

The code block should specify a language for proper syntax highlighting and linting compliance.

📝 Proposed fix
-```
+```txt
 http://localhost:3000
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>

[warning] 209-209: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<!-- fingerprinting:phantom:poseidon:ocelot -->

<!-- This is an auto-generated comment by CodeRabbit -->


---
25 changes: 25 additions & 0 deletions kits/agentic/mvp-builder/actions/orchestrate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use server';

import { lamaticClient } from '@/lib/lamatic-client';
import { config } from '@/orchestrate';
import { LamaticResponse } from 'lamatic/dist/types';
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if LamaticResponse is exported from the main package entry
fd -t f 'package.json' --exec cat {} \; | jq -r '.main, .types, .exports' 2>/dev/null || echo "package.json not found in repo"

# Search for LamaticResponse usage patterns in the codebase
rg -n "from ['\"]lamatic" --type ts

Repository: Lamatic/AgentKit

Length of output: 1026


🏁 Script executed:

# Search for LamaticResponse definitions and re-exports
rg -n "LamaticResponse" --type ts --type tsx

# Check if there are any type stub files or index files that might re-export it
fd -t f "index\.(ts|d\.ts|js)" --path "*lamatic*"

Repository: Lamatic/AgentKit

Length of output: 321


🏁 Script executed:

# Search for LamaticResponse definitions and re-exports
rg -n "LamaticResponse" --type ts

# Look for type definition files
fd -t f "index" | grep -E "\.(ts|d\.ts)$"

# Check if LamaticResponse might be exported from public api
rg -n "export.*LamaticResponse" --type ts

Repository: Lamatic/AgentKit

Length of output: 457


🏁 Script executed:

# Read the types/index.ts file
cat -n kits/agentic/mvp-builder/types/index.ts

# Search for other LamaticResponse-like response type imports
rg -n "Response.*from" kits/agentic/mvp-builder --type ts

# Check if there are other server action files that might handle responses
fd -t f "action" kits/agentic/mvp-builder

Repository: Lamatic/AgentKit

Length of output: 1027


🏁 Script executed:

# Read the orchestrate.ts file
cat -n kits/agentic/mvp-builder/actions/orchestrate.ts

# Also check if there are any other similar response patterns in related files
rg -n "Promise<" kits/agentic/mvp-builder --type ts -A 2 -B 2

Repository: Lamatic/AgentKit

Length of output: 1186


🏁 Script executed:

# Read the lamatic-client file to see how lamaticClient is typed
cat -n kits/agentic/mvp-builder/lib/lamatic-client.ts

# Search for any .d.ts files that might provide type definitions
fd -t f "\\.d\\.ts$"

# Check if there are any type imports from lamatic at all
rg -n "from.*lamatic.*types" --type ts

Repository: Lamatic/AgentKit

Length of output: 441


🏁 Script executed:

# Search for any 'lamatic/types' imports or references
rg -n "lamatic/types" --type ts

# Check if there's a types export mentioned anywhere in config files
rg -n "lamatic" tsconfig.json package.json 2>/dev/null || true

# Look at how the Lamatic class and its methods are used to understand the return type
rg -n "executeFlow" --type ts -A 3 -B 1

Repository: Lamatic/AgentKit

Length of output: 7022


Avoid importing from internal dist paths.

Importing from 'lamatic/dist/types' is fragile as internal paths may change between package versions without notice. This is the only file in the codebase that imports from lamatic/dist/types; all other files import from the public 'lamatic' API and work with the response object without explicit type imports. Either check if LamaticResponse is publicly exported from the 'lamatic' package, or define a local response type based on the actual structure being used.


export async function generatePlan(idea: string): Promise<LamaticResponse> {
const flow = config.flows.mvp;

if (!flow.workflowId) {
throw new Error('Workflow ID missing');
}

const inputs = {
idea
};
Comment on lines +7 to +16
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 | 🟠 Major

Mission hardening: validate idea on the server before flow execution.

Line 7 accepts untrusted input and Lines 14–18 forward it directly. Client checks can be bypassed; add server-side non-empty and size guards.

🛡️ Proposed fix
 export async function generatePlan(idea: string): Promise<LamaticResponse> {
+  const normalizedIdea = idea.trim();
+  if (!normalizedIdea) {
+    throw new Error('Idea is required');
+  }
+  if (normalizedIdea.length > 2000) {
+    throw new Error('Idea is too long');
+  }
+
   const flow = config.flows.mvp;
@@
   const inputs = {
-    idea
+    idea: normalizedIdea
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/actions/orchestrate.ts` around lines 7 - 16, The
generatePlan function accepts untrusted idea input and forwards it into inputs
without validation; add server-side guards at the top of generatePlan (before
creating inputs and before using config.flows.mvp/flow.workflowId) to ensure
idea is a string, trim whitespace, reject empty values and enforce a maximum
length (e.g., 1000 chars) by throwing an Error with a clear message when
validation fails; this prevents empty or oversized payloads from being passed
into inputs and downstream flow execution.


const res = await lamaticClient.executeFlow(flow.workflowId, inputs);

if (!res) {
throw new Error('No output from flow');
}

return res;
}
Binary file added kits/agentic/mvp-builder/app/favicon.ico
Binary file not shown.
Loading
Loading