Build Your First App: WeatherChecker
In this tutorial we’ll build a simple WeatherChecker app. It has one tool that fetches the current weather for any city using the wttr.in API.Prerequisites:
- Python 3.10+
- Virtual environment activated
- Truffle SDK installed
1. Initialize
Open your terminal in your IDE of choice and run:2. Write your App
Opensrc/app/main.py
and replace its contents with:
System Prompt (Optional)You can define a system prompt for your app by adding a
"system_prompt"
key to the src/config/manifest.json
file. This allows you to provide specific instructions or context to the LLM about how your app should behave. This field is not generated by truffle init
but can be added manually.3. Install Dependencies
Make surerequests
is listed in src/config/requirements.txt
:
4. Build & Upload
Now package and upload your app:truffle build
bundles your code into a deployable.truffle
file.truffle upload
deploys it to your personal cloud instance, or your connected Truffle hardware.
5. Test Your App
Open the Truffle Client, select WeatherChecker, and ask:What’s the weather in New York?The Agent will invoke your
get_weather("New York")
tool and return something like:
New York: 🌤 80°F
You can extend this app with additional tools (e.g. forecasts, alerts) or customize icons and descriptions.