untitled-2503
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ all from the browser, and deployed in milliseconds.
A chat-style AI agent built with the OpenAI Agents SDK and a React frontend.
The agent has 3 custom tools:
| Tool | Description |
|---|---|
| ๐ get_current_time | Get the current time in any IANA timezone |
| ๐งฎ calculator | Evaluate math expressions |
| ๐ฒ random_number | Generate random integers in a range |
Rendering mermaid diagram...
- Set the
OPENAI_API_KEYenvironment variable. Get your key at https://platform.openai.com/api-keys - Open the live URL and start chatting!
main.tsโ Hono HTTP server (entrypoint)agent.tsโ Agent definition with toolsfrontend/index.htmlโ HTML shellfrontend/app.tsxโ React chat UI