Build AI Agents from Scratch

Hey everyone, I’m Nick. As a self-taught AI enthusiast, I’ve found a straightforward way to build powerful models using AI agents. My CV optimization app is a great example of this process. It’s all about breaking down a complex problem into simple, manageable steps.

I’m sharing a CV optimizing agent I build with no code, steps on how to replicate it, and a recording (bottom of this article) of us building an agent together from scratch to help you follow along.

Step 1: Ideation and Prompt Engineering

First, I start with an idea. My goal was to create a tool that could optimize a CV for a specific job. To get a head start, I used ChatGPT to flesh out the concept. My prompt was simple: “I want to build a CV optimization workflow for N8N. It should take a CV and a job description and produce an improved CV and a cover letter. What are the key stages and what AI agents would I need?”

This gives me the building blocks and helps me define the roles for each AI agent I’ll create later.


Step 2: Workflow Creation

Next, I take those ideas to Claude. Claude is great because it can generate a complete workflow for N8N as a JSON file. I gave it a prompt like this: “Based on the idea of a CV optimization app with the following agents—ATS scoring system, Senior Recruiter, Hiring Manager, Career Coach, and Cover Letter Coach—please create a basic N8N workflow skeleton in JSON format.”

I then copy the entire JSON code Claude provides and paste it directly into my N8N workspace. This instantly creates the nodes and structure for my workflow.


Step 3: Configuring the AI Agents

This is where I turn the generic nodes into powerful AI agents. Each agent is a separate HTTP request node with a specific prompt. For each one, I set the following parameters:

  1. Method: Set to POST.
  2. URL: I use the API endpoint for my chosen Large Language Model (LLM), like OpenAI or Claude.
  3. Body: I select the JSON format and insert my agent’s specific prompt. For example, for the recruiter agent, I include the prompt: “You are a Senior Recruiter with 15 years of experience. Analyze this CV against the job description, focusing on crucial role fit, matches, and career progression.”
  4. Data Flow: I connect the nodes so that the output from one agent becomes the input for the next. The CV and job description pass through the agents, collecting feedback and scores.

Step 4: Building the Iteration Loop

This is the core logic of the model. I create a loop to ensure the CV improves.

  1. After the Career Coach agent creates a new CV, I use a conditional node to check its score.
  2. If the score is not at least 10% higher than the original, I send the workflow back to the Career Coach to rewrite the CV again.
  3. If the new CV meets the score requirement, the workflow moves forward to the Cover Letter Coach.

Step 5: Finalizing and Troubleshooting

Once the workflow is complete, I connect the output to a front-end or another node that can deliver the final, optimized CV and cover letter.

I’ll then run the workflow manually with a test CV and job description. If it breaks or gives a bad result, I copy the entire JSON code of the broken workflow from N8N and paste it back into Claude with a prompt like, “This N8N workflow is failing. Please diagnose the issue and provide the corrected JSON.” Claude helps me fix the code, and I repeat this process until the workflow runs perfectly.

What’s next for a learner?

Here are some ways to continue your journey after building your first workflow:


  • Lovable: Build a real front end for your app.
  • Databases: Connect your workflow to a database to save data.
  • Custom Code: Add advanced functions to your agents.
  • Monetization: Offer your app as a service.
  • Community: Share your templates to get feedback and new ideas.

Nick is a seasoned entrepreneur with over 16 years of experience in product development and business scaling. He is the founder of two innovative tech companies, Switch2VR and Switch2VU, specializing in virtual reality and SaaS platforms for the real estate industry. His expertise spans from leading agile teams and managing cross-functional projects to a deep knowledge of 3D, VR, and AR technologies.

arالعربية