Skip to content
Agent roles

How to give AI coding agents clear roles

Give an implementer, tester or reviewer a clear responsibility without rewriting every instruction for every feature. Learn what belongs in shared product background, reusable role instructions and the assignment for the current change.

Ask one AI coding agent to build a feature and another to check it, and they need more than different names. Each needs to know what it is responsible for, what information to use and what to report when it finishes.

You do not need a large group of agents. Start with the work that benefits from a separate check. Give the agents the same product background, but different responsibilities. Keep those role instructions reusable so you do not have to write them again for every feature.

Give the agents different responsibilities

An implementer makes the requested change. It needs to understand the relevant code, follow the app's conventions and explain what it changed.

A tester checks the result against the requested behavior. It needs to run the relevant checks, investigate failures and say what it could not test. Asking it to check the result gives it a different job from asking the implementer to describe its own work.

For example, suppose you want to add search to a hiking app. The implementer adds the search field and matching behavior. The tester tries partial names, searches with no matches and clearing the field. This is an illustrative example, not a feature we have built or tested.

A separate reviewer can be useful when you also want someone to examine the proposed changes for problems in the code or approach. That differs from checking whether the search field behaves correctly. Choose the roles the work needs rather than adding another agent by default.

Share the background, not every instruction

The implementer and tester both need to understand the app and the behavior you requested. They may also need the same design, accessibility and testing conventions.

Their role instructions should explain the difference in their responsibilities. For an implementer, you might use:

Read the relevant code and follow the existing architecture. Make the requested change, check your work and report what changed, which checks you ran and anything still unresolved.

For a tester:

Check the delivered behavior against the request. Run the relevant tests, describe any failures clearly and report what you could not verify. Do not treat the implementer's completion message as a test result.

These are example instructions you can adapt, not controls that guarantee correct work. The coding tool's permissions and your review still matter.

Our guide to keeping an agent focused covers general working instructions. Role instructions add what a particular agent is responsible for; they do not need to repeat that whole guide.

Keep feature details out of the role template

You may want every tester to report its checks and limitations. You do not want every tester to check trail-name search.

Keep the recurring expectation in the role's saved instructions, often called an agent template. Keep the search requirements in the assignment for that feature. On the next project, the tester can follow the same reporting instructions while checking a different change.

A useful test is to read a sentence and ask whether it would still belong on the next project. If it describes the particular feature, it probably belongs in that project's assignment rather than the reusable role.

Let the orchestrator prepare the assignments

In Giljo HQ, you can tune the available agent templates in the dashboard. Your connected coding agent takes the orchestrator role when it coordinates a project. It chooses the roles the work needs and uses their templates and the project requirements to write the individual assignments.

You do not have to write every agent's job order. You describe the result you want and can adjust the reusable role expectations. Then you review whether the proposed assignments divide the work sensibly.

For search, the tester needs a version it can test. The plan should make that dependency clear. Assigning a tester does not make unfinished implementation ready, and a separate checking agent is not a guarantee that every defect will be found.

Your coding tools run the agents. Giljo HQ holds the instructions and work records; a template does not supply an AI model or subscription.

Improve one recurring expectation

Start with an instruction you have had to repeat. Perhaps agents report that tests passed without saying which tests ran. Add a clear reporting expectation to the relevant role, then read an assignment prepared from it and check the next result.

If the assignment misses the expectation, revise the instructions. If the assignment is clear but the agent still skips the check, investigate that failure rather than assuming a longer template will solve it.

The aim is to make each agent's responsibility clear enough that you can judge its contribution, without rebuilding the instructions for every feature.