AI Powered Software Development
November 17, 2026 2 min read

Giving Instructions to AI Agents

HS
HEMANT SINGH
Technical Writer & Educator

Objective: Learn how to give instructions to AI agents so they can plan, execute, test and complete development tasks with minimal manual intervention.


What is an AI Agent?

An AI Agent is an AI-powered system that can understand a goal, make decisions, use tools and perform actions to achieve that goal.

For example, imagine you want to create a student registration module in Laravel.


You tell an AI agent:

Create a student registration module
in my existing Laravel project.

An AI agent can potentially:

  1. Inspect your existing project.
  2. Understand the database structure.
  3. Prepare an implementation plan.
  4. Create migrations and models.
  5. Develop the registration form.
  6. Implement validation.
  7. Run tests.
  8. Fix identified errors.


You provide the goal, and the agent works through the required steps.



How Is Giving Instructions to an Agent Different?


Compare these two instructions.

Normal AI Prompt:

Write Laravel code for student registration.

AI primarily responds with code or an explanation.


Agent Instruction:

Develop a student registration module
in my existing Laravel project.

First inspect the project structure.

Understand the existing database
relationships and coding conventions.

Create an implementation plan.

After the plan, implement the module,
run tests and fix any errors.

Finally, provide a summary of
the files modified.

The second instruction describes a complete workflow, not just a code-generation task.


What Should You Never Do When Instructing Agents?

AI agents can make mistakes. They can modify files, run commands or make assumptions that you did not intend.

Use these precautions:


Avoid

Better instruction

Modify anything necessary

Modify only relevant files

Delete old files if needed

Ask before deleting existing files

Change the database

Review migrations before execution

Install any package

Explain why a package is necessary

Deploy the application

Ask for approval before deployment

Change existing behaviour

Preserve existing behaviour unless requested


Important: Be especially careful with database migrations, production data, credentials, deployment and destructive terminal commands. Review these operations and require approval where appropriate.


What Are Completion Criteria?

This is a very important concept.

Completion Criteria define exactly what must be true before an agent considers its task finished.

For example:

Task:
Create a student registration module.

Completion Criteria:

1. Student registration works.
2. Duplicate email addresses are rejected.
3. Required fields are validated.
4. Student records are saved correctly.
5. Student listing displays saved records.
6. Relevant automated tests pass.

Without completion criteria, an agent might finish writing code even though some required functionality is missing.