Step 1 - Reviewing the Agent's Code

Let's open Visual Studio Code up. If you're still in the demo-1 folder, let's switch to the demo-2 folder. We do that by running two command:

cd ..

cd demo-2

This puts us into the demo-2 folder.

All the files are the same as in demo-1. The changes are in the main.py.

Like in demo-1, we need to have two endpoints exposed for our agent to work. The first one is /health GET (path can be anything) and /chat POST (the path can be anything).

When chatting with this agent, it will ask us if we want to want to run cat sample.txt to view the contents of the file. Before we run the command, we can edit the file's contents. Let's see this in action.

Last updated