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.

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="assistant", route="/assistant")
6 self.set_prompt_text("You are a helpful assistant.")
7 self.add_skill("joke", {
8 "api_key": "YOUR_API_NINJAS_KEY"
9 })
10
11agent = MyAgent()
12agent.serve()