Giphy
GiphyTools enables an Agent to search for GIFs on GIPHY.
Prerequisites
1export GIPHY_API_KEY=***Example
The following agent will search GIPHY for a GIF appropriate for a birthday message.
1from kern.agent import Agent2from kern.models.openai import OpenAIResponses3from kern.tools.giphy import GiphyTools45gif_agent = Agent(6 name="Gif Generator Agent",7 model=OpenAIResponses(id="gpt-5.2"),8 tools=[GiphyTools()],9 description="You are an AI agent that can generate gifs using Giphy.",10)1112gif_agent.print_response("I want a gif to send to a friend for their birthday.")Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | None | If you want to manually supply the GIPHY API key. |
limit | int | 1 | The number of GIFs to return in a search. |
enable_search_gifs | bool | True | Enable the search_gifs functionality. |
all | bool | False | Enable all functionality. |
Toolkit Functions
| Function | Description |
|---|---|
search_gifs | Searches GIPHY for a GIF based on the query string. |
Developer Resources
- View Tools