AgentsSkills

joke

View as MarkdownOpen in Claude

Tell jokes using the API Ninjas joke API. Uses a DataMap for serverless execution.

Tools: get_joke (default, customizable via tool_name)

Requirements: API Ninjas API key

api_key
strRequired

API Ninjas API key for the joke service. Can also be set via the API_NINJAS_KEY environment variable.

tool_name
strDefaults to get_joke

Custom function name.

from signalwire import AgentBase
class MyAgent(AgentBase):
def __init__(self):
super().__init__(name="assistant", route="/assistant")
self.set_prompt_text("You are a helpful assistant.")
self.add_skill("joke", {
"api_key": "YOUR_API_NINJAS_KEY"
})
agent = MyAgent()
agent.serve()