WeatherLogger
agent. This agent can check the current weather and log the info to a human-readable format.
You can play around with this example at Jupyter notebook.
WeatherLogger
class
This is a straightforward implementation of the Tool
class, designed to perform two primary operations: checking the weather (observation) and logging the information (action).
Communication with LLM
The interesting part though is not really the ability to use weather API and write to files, but to use this class to give an LLM a new skill. All we have to do is get the schema of the tool actions and observations and give them to our LLM like this:schema
object lists all actions we have with their parameters and descriptions.
Now that we have this info, we can implement a simple scenario:
- We inform the AI about the tools (in our case,
weather
andlog
) that it can use. - We give it a task to check and describe weather in a given city.
- Update the list of messages
- Ask the AI for the next step
- Execute the next step
- Repeat
- …
- Profit!
weather.txt
:
What’s next?
- Play around with this example at Jupyter notebook.
- Look at more realistic example of a SeleniumBrowser tool implementation.
- Dive into an elaborated implentation of the Desktop tool from the AgentDesk project, which adds the
Tool
sause on top of the Agentd-powered VMs.