• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
project logo

templates

openai-agents

Template to use the OpenAI Agents SDK
Public
Like
1
openai-agents
Home
Code
3
README.md
H
main.ts
test.ts
Connections
Environment variables
1
Branches
4
Pull requests
Remixes
1
History
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
11/21/2025
Viewing readonly version of sentiment-analysis-weekly-report branch: v1
View latest version
README.md

Sentiment Analysis Agent

A Val Town template for analyzing sentiment around topics or names using the OpenAI Agents SDK. This agent searches news articles, social media, and web content from the last week to provide structured sentiment analysis.

Get Started

  1. Remix this val

  2. Set the OPENAI_API_KEY environment variable. Get your OpenAI API key here: https://platform.openai.com/api-keys

  3. Use your agent:

    Send POST requests to your val endpoint:

    curl -X POST https://openai-agents.val.run \ -H "Content-Type: application/json" \ -d '{"message": "Analyze the sentiment around OpenAI in the last week"}'

Output Format

The agent returns a plain text summary that includes:

  • Overall sentiment (positive, negative, neutral, or mixed)
  • Brief summary of sentiment findings
  • Key themes and topics discovered
  • Specific examples with sources and citations
  • Approximate number of sources analyzed

Customization

Edit the agent configuration in main.ts to:

  • Adjust the time range for analysis
  • Modify the output format
  • Change the model or add custom tools

Learn More

  • OpenAI Agents SDK Documentation
  • OpenAI Agents Quickstart
  • Val Town Documentation
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.