Over the last few weeks, I’ve been struggling to land a new software engineering job. And the process? It’s always the same routine:
It works — but it’s slow and manual. So when I started seeing a bunch of posts by @rauchg about the popularity of Vercel’s AI SDK, I thought: why not automate this whole vibe-checking process?
A few weeks ago, my friend Edu Navarre (who’s just starting out in software engineering and is a great drummer btw) showed me a project he built using the Reddit API to fetch posts, subreddits and comments. That’s when the light bulb went off 💡.
If I mix Reddit's API with a Model Context Protocol (MCP) and a well-defined AI prompt, I could build a model that automatically checks the vibe of any company for me.
First, I dove into Microsoft’s MCP Beginner’s Course to understand the basics of this new ecosystem. MCP — short for Model Context Protocol — is like a USB port for AI. You define resources, tools, and prompts, and then any AI agent can interact with your APIs or databases through them.
Next, I used the Vercel AI SDK to integrate an AI-powered chatbot directly into my Next.js application. The SDK provides an out-of-the-box setup for model integration, so you just define your model and communication logic — and you’re good to go, like magic 🧙🏻♂️.
import { openai } from '@ai-sdk/openai';
import { streamText, UIMessage, convertToModelMessages } from 'ai';
// Allow streaming responses up to 30 seconds
export const maxDuration = 30;
export async function POST(req: Request) {
const { messages }: { messages: UIMessage[] } = await req.json();
const result = streamText({
model: openai('gpt-4o'),
messages: convertToModelMessages(messages),
});
return result.toUIMessageStreamResponse();
}One issue I ran into: I started with the OpenAI model at first, but suddenly stopped responding — no console errors, no logs in the dashboard, nothing. After switching to Google’s Gemini Agent, everything worked smoothly again. So if you’re just experimenting, I’d recommend starting with Gemini for now, as it has more free tokens and is perfect for development environments.
To make the agent communicate effectively with Reddit’s API, I had to define two key things: tools and prompts.
I identified some of the steps I usually do manually on my job search:
So, I defined two tools:
searchRedditPostssearchRedditCommentsThen, because the project is called Work Vibe, I added the most important-ish one:
getVibeScoreThis one isn’t strictly necessary — the prompt could compute the vibe score directly; but defining it as a tool helps with separation of concerns and makes it easier to render in the UI.
Now the prompt... oh boy 🤦🏻♂️.
Writing it was a pain in the ass. Mostly, because the OpenAI model kept freezing during tests, which made debugging frustrating. After a lot of trial and error (and some help from ChatGPT 😬), I finally landed on a strable structure that worked consistently.
You are a helpful assistant that analyzes company culture and work environment by searching Reddit.
Follow these steps EXACTLY in order:
1. First, use searchRedditPosts to search for posts about the company.
2. From the search results, identify the top 3 most relevant posts that discuss reviews, experiences, or work culture at the company. Prioritize posts with higher scores and more comments.
3. For each of those top 3 posts, use searchRedditComments with the post's subreddit and postId to get the comments (use maxComments=50 for each).
4. After analyzing all posts and comments, use the getVibeScore tool exactly ONCE to provide the final vibe score (0-100) based on the overall sentiment.
Important rules:
- Always call searchRedditComments for the top 3 posts you identified, which should be related to job reviews, experiences, or work culture at the company.
- Call getVibeScore only once at the very end with your final assessment
- If no relevant information is found, still call getVibeScore with a neutral score (50)
- Provide a brief summary of the company culture and work environment based on the posts and comments, and the finish with the getVibeScore tool.That's how this project came to life, a small but powerfull experiment to automate one of the most tedious parts of job hunting.
For my first real AI project, I’m really happy with how it turned out. It’s simple, practical, and full of potential to grow into a more comprehensive job-search companion — especially for those of us in tech.
searchGlassdoorReviews and searchGoogleReviews tools for more insights and better results.You can check at the repo 📦 here: Work Vibe Github Repo