See What Your Agent Sees

In the last exercise, you sorted an agent’s requests by what each one could reach. The other side of reach is what the agent can find out. In the video, you heard that output in another terminal window isn’t part of the agent’s request unless a tool returns it or you provide it. It slips your mind when something breaks on your own screen.

In this lesson, you’ll report a problem to your agent the way most people first do and see what it works from. Then you’ll be able to predict what your agent has to go on at any point in a session and what it still has to read or be told. Start by running your agent’s script yourself.

Report a Problem From Your Terminal

Most problems you hand an agent start on your screen, such as an error in your terminal, a page that looks wrong, or a failing test. How you report them determines what the agent has to work with.

Your agent ran list-sounds.js in the last lesson, but the game group will run it without one, so try it yourself. Open a new window of your terminal app, not the terminal inside your editor, and run node list-sounds.js.

On many systems, Node.js prints an error instead of the sound groups. The line that matters is in the middle, with your own path in it:

Language: Text
...
Error: Cannot find module '/home/kofi/list-sounds.js'
    ...

If yours printed the sound groups, your terminal starts in the warm-up folder, but a group member’s may start in their home folder. Run cd ~ and then the same command to see what they’ll hit.

Leave that window as it is. Now tell your agent about the problem in your own words, the way you’d first report it to anyone. If your agent isn’t running, start it in the warm-up folder as before.

Before you press Enter, predict what your agent has to work from and what it will do first. Then send your report, answer its requests as in the last lesson, and compare what happened with your prediction:

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.