wavespeed_tools.py
"""
WaveSpeed Tools
=============================
Demonstrates WaveSpeed tools.
"""
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.wavespeed import WaveSpeedTools
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
wavespeed_agent = Agent(
name="WaveSpeed Media Generator Agent",
model=OpenAIResponses(id="gpt-5.5"),
tools=[
WaveSpeedTools(
image_model="bytedance/seedream-v5.0-pro",
video_model="bytedance/seedance-2.5/text-to-video",
)
],
description="You are an AI agent that can generate images and videos using the WaveSpeed API.",
instructions=[
"When the user asks you to create an image, use the `generate_image` tool.",
"When the user asks you to create a video, use the `generate_video` tool.",
"Return the URL as raw to the user.",
"Don't convert the media URL to markdown or anything else.",
],
markdown=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
wavespeed_agent.print_response(
"Generate an image of a lighthouse on a stormy coast"
)
Run the Example
1
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
2
Install dependencies
uv pip install -U agno openai wavespeed
3
Export your API keys
export OPENAI_API_KEY="your_openai_api_key_here"
export WAVESPEED_API_KEY="your_wavespeed_api_key_here"
$Env:OPENAI_API_KEY="your_openai_api_key_here"
$Env:WAVESPEED_API_KEY="your_wavespeed_api_key_here"
4
Run the example
Save the code above as
wavespeed_tools.py, then run:python wavespeed_tools.py