Machine Learning

3 Strategies for Effectively Using AI Agents for Coding

I changed the way I plan. When I started learning to code back in 2019, I wrote all the code, character by character. Looking back, I am grateful for this experience, because of the problem-solving skills it taught me.

However, with AI agents, I believe I am at least 10 times more efficient as a developer than before. This is because I use AI agents to perform many repetitive, mundane tasks that I used to do. Previously, you had to:

  • Find your own indentation error in Python
  • Do some extensive Googling to find the answers
  • Do major refactors all by hand

And a long list of other activities that I don't spend much time doing now. Some would say you shouldn't let AI do all the work for you, because it makes you code worse. I can resist AI doing only repetitive work, while I can do more mind-numbing tasks, planning and organizing AI agents.

This infographic highlights the main content of this article. I will discuss how to become a more effective developer by acting as an orchestrator, rather than an implementer. I will discuss the three main techniques I use for editing with AI agents: Editing mode, browser actions, and checking logs with AI agents. Photo by Gemini.

In this article, I'll detail the three most important techniques I use to successfully use AI agents in coding. I believe these methods both make me more efficient as a developer, and increase the potential of AI agents.

I'm always looking for ways to be a better developer, so if you have any suggestions, I'd really appreciate any feedback!

Throughout the article, I will refer to both Cursor and Claude Code. I am not sponsored by any of them, and they are the tools I use for coding the agent.

Why you should use AI agents to code

First I want to start with why you should use AIs when coding. The main argument is that you can do more in less time.

AI agents let you do more, in less time

Features that used to take 5 hours to implement can now be practically implemented and tested in 15 minutes.

Bugs that took you an hour to identify and 30 minutes to resolve can now be resolved by your agent in 5 minutes. With Linear MCP, you can simply copy the URL of the issue and ask your agent to read the request, find the error, implement a solution, and create a ready-made PR for you.


This is simply amazing. You can read reports on how AI increases efficiency by 5% of usage. However, once you start using the agent coding tools and techniques I present in this article, I'm sure you'll see a noticeable change in your productivity.

I'm pushing code like never before, without a noticeable increase in bugs. That's the literal definition of what makes a great planner.

Method 1: Cursor editing mode

The first and probably most important method I use is edit mode whenever I use a new feature. Editing mode is available in all popular agent coding tools, such as Claude Code and Cursor. In Cursor, you can select it by pressing Shift-Tab while telling your agent.

Planning mode enables the agent to create an implementation plan, be it for a new feature, a bug report, or anything you want to do in your codebase. This process is done by the agent reading your request and the end code to find the best way to solve your request.

Edit mode then writes the program to a Markdown file, and may ask you some questions about how to implement your application:

  • What language do you want to launch in? Python or TypeScript?
  • Should implementation be backward compatible?
  • Monolith architecture, or microservices?

Programming mode works best because natural language is inherently unconstrained

This is the reason we came up with a programming language: A piece of code is deterministic, and always produces the same output, given the same input. There is no ambiguity in a piece of Python code, for example.

However, we are now back to coding in natural language, because agents use code instead. However, we need a way to eliminate ambiguity, which is where program mode comes in handy.

Trick 2: Browser Cursor Actions

Browser cursor actions are another very useful method that I started using recently. Cursor browser actions allow your Cursor agent to perform actions while working on your application. These actions can be:

  • Open the URL
  • Press the button
  • Read the console logs

This is an amazing tool to help the agent solve problems in one shot, by itself, instead of you manually checking the usage in the browser and copying the console logs containing the errors.

Browser Cursor Actions
This image highlights the repetitive, time-consuming loop when using a new feature in a browser application. First you use the feature. Then you should open the browser and check if the feature is working. Usually, it doesn't work on the first try, so you need to read the console logs and copy them to your AI agent, which will run again. Then this loop continues until the solution works. Instead of doing this time-consuming loop, you can ask the Cursor to perform browser actions, which will automatically open the browser, click, and read the console logs to make sure everything is working as intended. Otherwise, Cursor automatically reads the logs and iterates over the feature until it works. All this without requiring manual intervention, copying console logs. Picture of Gemini.

Instead, you can simply ask the Cursor to open the URL, click, and verify that there are no problems with the implementation. You actually have the Cursor do the end-to-end testing for you, which is very effective at finding challenges in your implementation.

It saves a lot of time to tell the Cursor to open the browser, click around, and check the browser logs every time I add a new implementation.

Method 3: Check logs with Claude Code

Another useful method that I use a lot is to check logs with Claude Code or Cursor.

I use Claude Code to check the logs for relevance to the application I'm working on. For example, if the document is suddenly stuck in the processing pipeline, unless I changed anything in the relevant code recently.

I use Cursor often to check logs whenever I'm working on an application. I can, for example, tell Cursor to send a test event to a Lambda function, and check the CloudWatch logs to make sure everything was processed as expected.

Previously I spent a lot of time in the AWS console, navigating to the right log group and searching for the log group, which takes a long time. So, I started informing my coding agents to check the logs for me instead, which saves me 10-60 minutes a day: a very efficient profit.

Checking the logs of agents is very important, and there is almost no harm. Inspecting logs is usually an easy job to do. It's not intellectually challenging or something you want to spend time on. Therefore, using agents to scan logs is a very important issue for using encryption agents.

Checking logs is a simple and repetitive task: the perfect job to have coding agents do, while you do more important work.

If you use agents to search your logs, it is important to provide your agent with a lot of background information:

  • What are log groups called?
  • What are the names of the table
  • What are the S3 bucket names and prefixes

This saves you a lot of time and money, because your agent doesn't have to code your entire infrastructure and find the right service for you. I talked about this concept in my article on successfully using AGENTS.md.

The conclusion

In this article, I've discussed the three main methods I use to successfully use coding agents. I believe that the use of coding agents and these techniques has made me at least 10 times more efficient as a developer, from an overall perspective. It has changed the way I work, and saves me a lot of time in my daily work. I believe that mastery in using AI tools will be incredibly important for the programmers of the future.

👉 My Free Resources

🚀 10x Your Engineering with LLMs (Free 3-Day Email Course)

📚 Get my free ebook Vision Language Models

💻 My webinar on Vision Language Models

👉 Find me on social media:

📩 Subscribe to my newsletter

🧑‍💻 Contact

🔗 LinkedIn

🐦 X / Twitter

✍️ In the middle

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button