Skip to main content
Simple agent that generates jokes on demand.

Code

How It Works

Instructions
  • Defines agent personality as joke teller
  • Specifies joke types: puns, dad jokes, tech jokes
  • Sets tone: light, playful, human-like
  • Allows topic-specific jokes
Tools
  • DuckDuckGoTools(): Search for trending jokes
  • Optional but adds topical humor capability
Model
  • openai/gpt-oss-120b: Advanced reasoning for humor
  • Via OpenRouter API
  • Sometimes it can generate offensive or inappropriate jokes :P

Dependencies

Environment Setup

Create .env file:

Run

Try: “Tell me a joke about Python programming”

Example API Calls

Frontend Setup

Open http://localhost:5173 and try to chat with joke generator