Slides for Lesson 1 + Recording + Q&A Recording

💡 How to use this page: I suggest making a copy of this page so you have a checklist you can interact with for your setup flow + take your own notes if you get stuck.

Table of Contents

What is Cursor and Why is it so powerful for a PM?

What is Cursor - IDE for non-technical PMs

Cursor is more than a code editor; it’s an AI-first Integrated Development Environment (IDE) designed for building with Large Language Models. Think of it as a supercharged version of VS Code that has an AI assistant deeply integrated, acting as your personal tech lead or pair programmer.

For a Product Manager, this is a game-changer. Here’s why:

Even if Cursor feels intimidating at first, the core concepts are what matter. Once you understand how to prompt an agent, provide it with context, and guide it through building an application, you can apply these same principles to any AI development process, whether it’s with low-code tools or a full production engineering team. This is your safe space to build intuition. You can use the same principles with other “vibe coded” or real production applications to:

When to use Cursor

When to use Cursor

🏁 Start Here → Lesson 1 Workflow

Goal: Go from zero to running a functional AI agent application on your own machine.

Instructions: You can click through each link until you complete the steps. If you get stuck, please review the useful commands!

Prerequisite Setup

Lesson Content

How to Setup Cursor

✨ Cursor Guide

Components of the IDE

Check what layout you’re using:

Cursor Layout Settings

You can start a terminal with cmd+T:

Cursor Terminal View

When you open Cursor, here are the key windows you’ll be working with:

Cursor Chat Interface

✨ How to use Cursor as a PM - “Vibe Coding” with Cursor

  1. Copy-Paste Errors: If you get an error in your terminal, copy the entire error message and paste it into the agent window. A good prompt is: "I got this error. What does it mean and how do I fix it?"

  2. Ask “Dumb” Questions: There are no dumb questions. Use the chat to understand what a piece of code does. "What is the purpose of the main.py file? Explain it to me like I'm a product manager."

  3. Iterate with Prompts: Start with a simple prompt and then refine it. “Build me a simple web app” → “Add a login page to the web app” → “Make the login page look nicer with CSS.”

  4. Reference context using @ Symbol

    • For example, you can say @codebase or @internet
    • You can also simply copy paste docs from the internet in
      • For example: prompt: Using these docs, instrument my application for observability: https://arize.com/docs/ax

Key Features

Useful Commands (Tips and Tricks)

Cursor

Terminal Primer

The terminal is how you “talk” to your computer directly. You only need to know a few basic commands.

Github Primer

GitHub is how developers store and collaborate on code. For this course, you just need the basics.

Virtual Python Environments

Important: Python on your computer can get messy. Different projects need different versions of libraries, which can conflict. A virtual environment is like a clean, isolated workspace for each project. We highly recommend you use them.

The easiest and fastest way to create a Python virtual environment is by using the built-in venv (Virtual Environment) module. It requires no extra installation.

1. Create the Virtual Environment

Navigate to your project folder in the terminal and run the following command. This creates a new folder (e.g., venv) containing the Python interpreter and necessary files.

python3 -m venv venv

2. Activate the Environment

To start using the virtual environment, you need to activate it.

Your terminal prompt will change to show the name of the active environment (e.g., (venv)), indicating you’re now working inside it. Any packages you install will be isolated to this environment.

To deactivate it, simply type deactivate.

Note: To maintain multiple environments, you can also use conda **What is Conda?** Conda is an environment manager. It lets you create these isolated workspaces (`environments`) so that the packages you install for one project don't interfere with another. Install Conda here: [https://www.anaconda.com/docs/getting-started/miniconda/main](https://www.anaconda.com/docs/getting-started/miniconda/main) **Python Commands to use:** 1. `conda create -n your-env-name python=3.12` # Creates a new environment named "your-env-name" with a specific Python version. 2. `conda activate your-env-name` # "Enters" or activates the environment. You must do this every time you work on the project. You can copy paste the below line by line into your terminal: ```python > pip install conda #installs conda on your machine > conda create -n your-env python=3.12 > conda activate your-env ```

Clone the Trip Planner Repo

Project Setup: Running the AI Trip Planner

This is our main goal for the first session. We are going to get the AI Trip Planner application running locally.

  1. Clone the repo and navigate to the repo

    a. Navigate into the Project Folder:

       cd ai-trip-planner
    
  2. Create the Environment File for Your API Keys:

    This is a crucial step for telling the application what your secret API key is.

    • Navigate into the backend directory by typing this into the cursor terminal:
      cd backend
      
    • Create a new file named .env:
      • In your Cursor terminal, type: touch .env
    • Open the new .env file in the Cursor editor (you’ll see it in the file directory on the left).

    • Add the following line to the file, replacing YOUR_API_KEY_HERE with your actual OpenAI key:
      OPENAI_API_KEY=YOUR_API_KEY_HERE
      
    • Save the .env file. Cursor will automatically use this to load your key.
  3. Set Up the Backend:
    • Navigate into the project folder: cd ai-trip-planner
    • Create and activate your python virtual environment (if you haven’t already): source venv/bin/activate
    • Install the required Python packages: pip install -r requirements.txt
  4. Start the Backend Server:
    • While in backend folder, in the terminal, type in
      • python main.py
      • Ignore warnings about arize credentials missing
  5. Set Up and Start the Frontend:
    • Open a new terminal instance. (click the + button in the top right of the terminal)
    • Navigate into the frontend directory: cd frontend
    • Install the required packages: in the terminal npm install
    • Start the frontend server: npm start
  6. View Your Live App!
    • Your terminal will give you a URL (usually http://localhost:3000) to view the running application in your browser.

Idea Bank for Agents

Think about agents as smart, enthusiastic college interns. They have access to powerful tools and can get a lot done, but they still require clear direction and supervision. They might not get it perfect the first time, and that’s okay. You have to check their work.

This is where the concepts we’ll cover later, Evals and Observability, become critical. They are the processes you use to check your “intern’s” work and help them improve.

✨ Simple Agent Ideas to Get You Started:

Homework 1

Bonus: Deploy your project on Render

Congratulations on building and modifying your first AI application! Now, let’s get it live on the internet so you can share it with anyone. We will use a platform called Render.

Goal: Deploy our Python backend and our React frontend as two separate services that can communicate with each other.

Part 1: Deploying the Backend API

  1. Create a Render Account: Sign up for a free account at render.com using your GitHub account.

  2. Create a New “Web Service”:
    • On the Render Dashboard, click New + and select Web Service.
    • Connect your GitHub account and select your forked ai-trip-planner repository.
  3. Configure the Backend Service:
    • Name: Give it a unique name, like my-trip-planner-api.
    • Root Directory: Set this to backend. This tells Render to only look inside the backend folder for this service.
    • Runtime: Render will auto-detect Python. Select Python 3.
    • Build Command: Set this to pip install -r requirements.txt.
    • Start Command: This is important. Use gunicorn backend.main:app. (This is a production-grade server, which is better than the flask or fastapi development server).
    • Instance Type: Choose the Free plan.
  4. Add Environment Variables:
    • Scroll down to the “Environment” section.
    • Click Add Environment Variable.
    • Key: OPENAI_API_KEY
    • Value: Paste in your actual OpenAI API key.
    • Add another environment variable
    • Key: PORT
    • Value: 8000
  5. Deploy!
    • Click Create Web Service. Render will now start building and deploying your backend. It will take a few minutes. You can watch the logs. Once it’s done, you’ll have a live URL for your API (e.g., https://my-trip-planner-api.onrender.com).

Part 2: Deploying the Frontend Application

  1. Create a New “Static Site”:
    • Go back to the Render Dashboard. Click New + and select Static Site.
    • Select the same forked ai-trip-planner repository from GitHub.
  2. Configure the Frontend Service:
    • Name: Give it a unique name, like my-trip-planner-ui.
    • Root Directory: Set this to frontend.
    • Build Command: Set this to npm install && npm run build.
    • Publish Directory: Set this to frontend/build.
  3. Connect the Frontend to the Backend:
    • Go to the “Environment” section for this new frontend service.
    • Click Add Environment Variable.
    • Key: REACT_APP_API_BASE_URL
    • Value: Paste the live URL of your backend API that you just deployed (e.g., https://my-trip-planner-api.onrender.com).
  4. Deploy!
    • Click Create Static Site. Render will build your React app and deploy it.

In a few minutes, your frontend will be live on its own URL. When you visit it, it will now make API calls to your live backend service.

You have now achieved a true prototype-to-production workflow. You have a live, shareable, full-stack AI application that automatically re-deploys every time you push new code to GitHub.

Bonus: Supercharge Cursor with Claude Code

https://docs.anthropic.com/en/docs/claude-code/setup

🧠 Using Claude Code