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
31 changes: 31 additions & 0 deletions kits/interview-coach/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/

# production
build

# env files — NEVER commit secrets!
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

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

# misc
.DS_Store
*.pem
.vercel
171 changes: 171 additions & 0 deletions kits/interview-coach/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# 🎯 AI Interview Coach — Lamatic AgentKit

> Get a **fully personalized interview prep kit** in seconds. Paste your target role,
> company, and background — and get tailored technical questions, behavioral Q&A,
> company insights, and a 30-60-90 day plan.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit/tree/main/kits/interview-coach)

---

## 🧩 What Problem Does This Solve?

As a student and developer who went through campus placements and interviews myself,
I noticed a gap: generic interview prep tools give the same questions to everyone.
They don't care whether you're applying as a fresher to a startup or a mid-level
engineer at Google.

**AI Interview Coach** solves this by:
- Tailoring questions to your **specific role + company + background**
- Giving STAR-method answer frameworks based on your actual experience
- Sharing company-specific culture and tech stack insights
- Providing a realistic 30-60-90 day onboarding plan if you get hired

---

## ✨ Features

| Feature | Description |
|---|---|
| 💻 Technical Questions | 8-10 role-specific questions based on your target company |
| 🧠 Behavioral Questions | 5-6 behavioral Qs + what the interviewer is actually testing |
| 💡 Answer Tips | STAR-method frameworks tailored to your background |
| 🏢 Company Insights | Culture, values, tech stack, and what they look for |
| 🗓️ 30-60-90 Day Plan | Personalized onboarding roadmap if you land the job |

---

## 🛠️ Tech Stack

- **Frontend:** Next.js 14, React, Tailwind CSS, TypeScript
- **AI Orchestration:** Lamatic Studio (LLM Flow)
- **Deployment:** Vercel

---

## ⚙️ Setup Instructions

### Prerequisites
- Node.js 18+
- npm 9+
- [Lamatic.ai](https://lamatic.ai) account (free)
- [Vercel](https://vercel.com) account (for deployment)

### Step 1 — Set Up the Lamatic Flow

1. Go to [studio.lamatic.ai](https://studio.lamatic.ai) and sign in
2. Create a new Project → Create a new Flow
3. Add an **API Trigger** node with these inputs:
- `jobRole` (string)
- `company` (string)
- `background` (string)
- `experienceLevel` (string)
4. Add an **LLM Node** — copy system and user prompts from `prompts/interview-coach-flow_system.md` and `prompts/interview-coach-flow_user.md`
5. Add an **API Response** node connected to the LLM output
6. Click **Deploy** and wait for green status
7. Copy the **Flow ID** from the three-dot menu

### Step 2 — Get Your API Keys

Navigate to **Settings** in Lamatic Studio:

| Variable | Where to find it |
|---|---|
| `LAMATIC_PROJECT_API_KEY` | Settings → API Keys → Copy |
| `LAMATIC_PROJECT_ID` | Settings → Project → Project ID |
| `LAMATIC_PROJECT_ENDPOINT` | Settings → API Docs → App Frameworks → Endpoint |
| `LAMATIC_FLOW_ID` | Flow Editor → three-dot menu → Copy Flow ID |

### Step 3 — Run Locally

```bash
# Clone the AgentKit repo
git clone https://github.com/YOUR-USERNAME/AgentKit.git
cd AgentKit/kits/interview-coach/apps

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env and fill in your keys

# Run the development server
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) to see the app.

### Step 4 — Deploy to Vercel

1. Push your branch to GitHub
2. Go to [vercel.com](https://vercel.com) → Import project
3. Set **Root Directory** to `kits/interview-coach/apps`
4. Add all environment variables from your `.env` file
5. Click **Deploy**

---

## 🧪 Example Usage

**Input:**
- Role: `Frontend Developer`
- Company: `Lamatic.ai`
- Level: `Fresher`
- Background: `B.Tech IT, 1 year React + Node.js, built MediQueue (healthcare app), GSSoC Top 50 Rank 32, Oracle AI certified`

**Output includes:**
- Technical questions on React, TypeScript, REST APIs, system design basics
- Behavioral questions around teamwork, open source contributions
- Tips: How to frame GSSoC experience using STAR method
- Company insight: Lamatic values AI-native thinking and open source culture
- 90-day plan: week 1 codebase exploration → week 4 first PR → day 60 owning a feature

---

## 📁 Folder Structure

```
interview-coach/
├── constitutions/
│ └── default.md # Guardrails / safety rules for the flow
├── flows/
│ └── interview-coach-flow.ts # Lamatic flow layout definition
├── model-configs/
│ └── interview-coach-flow_llm.ts # Model settings
├── prompts/
│ ├── interview-coach-flow_system.md # LLM system prompt
│ └── interview-coach-flow_user.md # LLM user prompt
├── scripts/
│ └── interview-coach-flow_parse-json.ts # Parser script for LLM output
├── lamatic.config.ts # Project metadata
├── README.md
└── apps/ # Next.js UI Application
├── actions/
│ └── orchestrate.ts # Server action — calls Lamatic flow
├── app/
│ ├── layout.tsx
│ ├── page.tsx
│ └── globals.css
├── components/
│ └── InterviewCoach.tsx # UI component
├── lib/
│ └── lamatic-client.ts # Lamatic client configuration
├── package.json
└── tsconfig.json
```

---

## 🤝 Author

Built by **Piyush Kumar Singh** for the Lamatic AgentKit Challenge.

- GitHub: [@piyushkumar0707](https://github.com/piyushkumar0707)
- Portfolio: [piyush-singh.dev](https://piyush-singh.dev)

---

## 📄 License

MIT — feel free to use and extend.
87 changes: 87 additions & 0 deletions kits/interview-coach/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# AI Interview Prep Coach

## Overview
This project solves the problem of helping candidates prepare for interviews by generating personalized interview preparation kits based on the target role, company, background, and experience level. It uses Lamatic.ai's LLM orchestration flow to produce tailored technical and behavioral questions, answer tips, company insights, and a structured 30-60-90 day onboarding plan. The frontend application is built in Next.js and communicates with the Lamatic API.

---

## Purpose
The goal of this agent system is to provide targeted, contextual interview coaching. Instead of generic question lists, this coach analyzes the candidate's exact background (skills, past experience, projects) alongside details of the target company and role to provide highly relevant prep materials. It helps candidates structure their answers using frameworks like the STAR method and provides clear guidelines for their first 90 days if hired.

---

## Flows

### `Interview Coach Flow`

- **Flow ID / Env key mapping:** `interview-coach-flow` (configured via `LAMATIC_FLOW_ID`)

#### Trigger
- **Invocation type:** API request via a GraphQL trigger node (`API Request`).
- **Expected input shape:**
- `jobRole` (string): The target job title/role.
- `company` (string): The target company name.
- `background` (string): The candidate's skills, experience, and projects.
- `experienceLevel` (string): fresh / junior / mid / senior.

#### What it does
1. `API Request` (triggerNode): Receives the inputs from the Next.js app.
2. `LLM Node` (LLMNode_1): Calls the text LLM to generate the prep kit based on the system and user prompts.
3. `Parse JSON` (codeNode_parse_json): Parses the LLM's raw text response into a structured JSON object, stripping markdown code fences if present.
4. `API Response` (graphqlResponseNode_1): Returns the parsed JSON payload to the caller in realtime.

#### When to use this flow
- Use when a candidate inputs their career profile and needs a structured, company-specific preparation kit.
- Use when you need structured, multi-part preparation advice (questions + answer tips + insights + onboarding roadmap).

#### Output
A JSON object with the following fields:
- `quickSummary` (string): Candidates fit overview.
- `technicalQuestions` (array of strings): 8-10 role-specific technical questions.
- `behavioralQuestions` (array of strings): 5-6 behavioral questions.
- `answerTips` (array of strings): 4-5 STAR-method and role-specific tips.
- `companyInsights` (array of strings): 5-6 insights about company culture, values, or tech stack.
- `ninetyDayPlan` (object): Onboarding roadmap containing:
- `first30` (array of strings)
- `next30` (array of strings)
- `final30` (array of strings)

#### Dependencies
- Lamatic Project credentials (endpoint, projectId, apiKey).
- Deployed flow ID for the interview prep flow.

---

## Guardrails
- **Safety Guidelines**: Must not generate harmful, discriminatory, or inappropriate coaching content.
- **Input validation**: Inputs should be validated on the client side before triggering the flow.
- **Output constraints**: The flow must return valid JSON structure matching the schema.

---

## Integration Reference

| Integration Type | Purpose | Config Key / Env Var |
|---|---|---|
| Lamatic Flow Execution | Trigger the interview prep generation flow | `LAMATIC_FLOW_ID` |
| Lamatic SDK Client | Initialize communication with Lamatic API | `LAMATIC_PROJECT_ENDPOINT`, `LAMATIC_PROJECT_ID`, `LAMATIC_PROJECT_API_KEY` |

---

## Environment Setup
Make sure the following variables are configured in `apps/.env`:
- `LAMATIC_FLOW_ID`
- `LAMATIC_PROJECT_ENDPOINT`
- `LAMATIC_PROJECT_ID`
- `LAMATIC_PROJECT_API_KEY`

---

## Quickstart
1. Set up the flow in Lamatic Studio and deploy.
2. Configure the env variables in `apps/.env`.
3. In `apps/`, run:
```bash
npm install
npm run dev
```
19 changes: 19 additions & 0 deletions kits/interview-coach/apps/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ─────────────────────────────────────────────
# Lamatic Flow Configuration
# ─────────────────────────────────────────────

# Your Lamatic project endpoint (GraphQL API URL)
# Find it: Lamatic Studio → Settings → API Docs → App Frameworks → Endpoint
LAMATIC_PROJECT_ENDPOINT="YOUR_PROJECT_ENDPOINT"

# Your Lamatic Flow ID
# Find it: Flow Editor → three-dot menu → Copy Flow ID
LAMATIC_FLOW_ID="YOUR_FLOW_ID"

# Your Lamatic Project ID
# Find it: Lamatic Studio → Settings → Project → Project ID
LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"

# Your Lamatic API Key
# Find it: Lamatic Studio → Settings → API Keys → Copy
LAMATIC_PROJECT_API_KEY="YOUR_API_KEY"
73 changes: 73 additions & 0 deletions kits/interview-coach/apps/actions/orchestrate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
'use server'

import { lamaticClient } from '@/lib/lamatic-client'

export interface InterviewCoachInput {
jobRole: string
company: string
background: string
experienceLevel: string
}

export interface InterviewCoachResult {
technicalQuestions: string[]
behavioralQuestions: string[]
answerTips: string[]
companyInsights: string[]
ninetyDayPlan: {
first30: string[]
next30: string[]
final30: string[]
}
quickSummary: string
}

export interface ActionResult {
success: boolean
data?: InterviewCoachResult
error?: string
}

export async function runInterviewCoach(
input: InterviewCoachInput
): Promise<ActionResult> {
let raw: Record<string, unknown>

try {
raw = await lamaticClient.executeFlow(
process.env.LAMATIC_FLOW_ID!,
Comment thread
piyushkumar0707 marked this conversation as resolved.
{
jobRole: input.jobRole,
company: input.company,
background: input.background,
experienceLevel: input.experienceLevel,
}
) as Record<string, unknown>
} catch (e) {
return { success: false, error: `Lamatic flow error: ${e}` }
}

const resultData =
(raw?.result as Record<string, unknown>)?.output ??
raw?.result ??
raw?.output ??
raw

const safe = (resultData ?? {}) as Partial<InterviewCoachResult>

return {
success: true,
data: {
quickSummary: safe.quickSummary ?? '',
technicalQuestions: safe.technicalQuestions ?? [],
behavioralQuestions: safe.behavioralQuestions ?? [],
answerTips: safe.answerTips ?? [],
companyInsights: safe.companyInsights ?? [],
ninetyDayPlan: {
first30: safe.ninetyDayPlan?.first30 ?? [],
next30: safe.ninetyDayPlan?.next30 ?? [],
final30: safe.ninetyDayPlan?.final30 ?? [],
}
}
}
}
Loading