import os
from bindu.penguin.bindufy import bindufy
from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.models.openrouter import OpenRouter
from dotenv import load_dotenv
load_dotenv()
agent = Agent(
instructions=(
"You are a witty joke-telling agent. "
"Your job is to entertain users with clever, clean, and funny jokes. "
"You can tell puns, dad jokes, tech jokes, and situational humor. "
"Keep the tone light, playful, and human-like. "
"If a topic is given, tailor the joke to that topic."
),
model=OpenRouter(
id="openai/gpt-oss-120b",
api_key=os.getenv("OPENROUTER_API_KEY")
),
tools=[DuckDuckGoTools()],
)
config = {
"author": "[email protected]",
"name": "joke_agent",
"description": "A research assistant agent",
"deployment": {
"url": "http://localhost:3773",
"expose": True,
"cors_origins": ["http://localhost:5173"]
},
"skills": ["skills/question-answering", "skills/pdf-processing"],
}
def handler(messages: list[dict[str, str]]):
result = agent.run(input=messages)
return result
bindufy(config, handler)
#bindufy(config, handler, launch=True)
# This will create a tunnel to your agent and expose it on port 3773