Public
Remixed
Template to use the OpenAI Agents SDK
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.

OpenAI Agents Template

A Val Town template for building AI agents using the OpenAI Agents SDK.

Want model flexibility? Check out the Vercel AI SDK Agent template — same agent pattern, but you can swap in Anthropic, Google, or any other provider by changing one line.

What is an Agent?

An agent is inference in a loop with tools: an LLM receives a system prompt, reads from and writes to an environment through tools, and loops until it decides it's done.

Rendering mermaid diagram...

Get Started

  1. Fork this val
  2. Set the OPENAI_API_KEY environment variable. Get your OpenAI API key here: https://platform.openai.com/api-keys
  3. Customize your agent: Edit the agent configuration in main.ts. You can provide custom instructions, choose a different model, or add custom tools.
  4. Use your agent: Click Run on main.ts

Learn More