Learnings and Findings from Building an AI Coding Agent - The Mini Cursor

Table of contents

In my recent project, I built an AI Coding Agent that acts like a “Mini Cursor” - a smart assistant that sits right inside your terminal or coding environment and helps you build software step by step, just like a human coding partner. This experience was eye - opening and gave me deep insights into how AI can seamlessly improve the developer experience.
What is an AI agent ?
Imagine you have a helpful assistant who listens to what you want and then takes action for you - like booking your tickets, finding the fastest route home, or even helping you write an email. An AI agent is just like that, but inside a computer.
Key Learnings -
- Interactive Coding - Just like collaborating with a human teammate
Instead of just asking the AI to generate a block of code once and done, I realized how powerful it is to have a back & forth conversation with it. The agent can ask clarifying questions, break down big tasks, and improve the code step by step based on feedback.
- Planning and Structure Matter
The AI agent works best when you treat it like a project partner who needs clear instructions. Breaking down your project into smaller, manageable tasks — like “build this React component” or “write this API endpoint” — helps the agent stay focused and deliver accurate results. Without good structure, the code can get messy or incomplete. So, being a project manager for your AI assistant is key.
When you ask the AI Agent to “Create a TODO app in React,” it doesn’t jump straight to code. It thinks step-by-step:
First, it plans:
{"step": "plan", "content": "User wants a TODO app in React"}
{"step": "plan", "content": "Ask user to choose a UI theme"}
Then, it takes action:
{"step": "action", "function": "select_theme"}
Then, it observes the result:
{"step": "observe", "output": "User selected 'PurpleLight'"}
And then the final output:
{"step": "output", "content": "React Todo app has been created with the PurpleLight theme and is running at http://localhost:5173. You can now access it in your browser."}
This structured loop - plan → action → observe - ensures that the Agent builds the project logically, one decision at a time, just like a human developer would.
Example -
Subscribe to my newsletter
Read articles from Lakshay Jain directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
