NewWe just added 1,500 new sounds to the library
Sound Effects for AI Agents: Giving LLMs Audio Capabilities
|3 min read|lotsofsounds team

Sound Effects for AI Agents: Giving LLMs Audio Capabilities

AI agents are getting better at interacting with the real world — browsing the web, writing code, managing files. But most agents are still silent. What if your AI agent could find and use sound effects?

The Lotsofsounds API is built for exactly this. The search endpoint accepts natural language queries, making it a natural fit for LLM tool calling.

Why sound effects for AI agents?

  • App builders: Agents that build apps can add audio feedback automatically
  • Game designers: AI-assisted game development with contextual sound selection
  • Accessibility: Agents that enhance interfaces with audio cues
  • Content creation: Automated video/podcast production with sound design
  • Prototyping: Rapidly prototype audio experiences without manual asset hunting

Setting up as an LLM tool

Here's how to define the Lotsofsounds API as a tool for an LLM agent.

Tool definition (OpenAI function calling format)

Tool Definition (OpenAI format)
{
  "name": "search_sounds",
  "description": "Search for royalty-free sound effects and music tracks. Returns matching sounds with metadata like duration, tags, and ratings.",
  "parameters": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "description": "Natural language description of the sound (e.g. 'gentle notification chime', 'thunderstorm ambient')"
      },
      "tags": {
        "type": "string",
        "description": "Comma-separated tags to filter by (e.g. 'nature,weather')"
      },
      "max_duration": {
        "type": "number",
        "description": "Maximum duration in seconds"
      }
    },
    "required": ["query"]
  }
}

Tool implementation

tools/sounds.js
async function searchSounds({ query, tags, max_duration }) {
  const params = new URLSearchParams({ q: query, limit: "5" });
  if (tags) params.set("tags", tags);
  if (max_duration) params.set("max_duration", String(max_duration));

  const res = await fetch(
    `https://api.lotsofsounds.com/api/v1/sounds?${params}`,
    { headers: { "x-api-key": process.env.LOS_API_KEY } }
  );
  return res.json();
}

async function downloadSound({ sound_id }) {
  const res = await fetch(
    `https://api.lotsofsounds.com/api/v1/sounds/${sound_id}/download`,
    { headers: { "x-api-key": process.env.LOS_API_KEY } }
  );
  return res.json();
}
tools/sounds.py
import requests
import os

def search_sounds(query, tags=None, max_duration=None):
    params = {"q": query, "limit": 5}
    if tags:
        params["tags"] = tags
    if max_duration:
        params["max_duration"] = max_duration

    res = requests.get(
        "https://api.lotsofsounds.com/api/v1/sounds",
        params=params,
        headers={"x-api-key": os.environ["LOS_API_KEY"]},
    )
    return res.json()

def download_sound(sound_id):
    res = requests.get(
        f"https://api.lotsofsounds.com/api/v1/sounds/{sound_id}/download",
        headers={"x-api-key": os.environ["LOS_API_KEY"]},
    )
    return res.json()

Example agent prompt

System Prompt
You are a helpful assistant that can find and download sound effects.
When the user asks for a sound, use the search_sounds tool to find
matching sounds, then present the results. If they want to download
one, use the download_sound tool.

Example conversation

User: I need a short notification sound for my app, something gentle and not too long.

Agent (calls search_sounds):

Tool Call
{ "query": "gentle notification chime", "max_duration": 3 }

Agent: I found 5 notification sounds. Here are the top results:

  1. "Notification Ding" (0.8s) — rated 4.7
  2. "Soft Chime Alert" (1.2s) — rated 4.5
  3. "Bell Notification" (1.5s) — rated 4.3

Would you like me to download one of these?

MCP server integration

Model Context Protocol

If you're building with MCP, you can wrap the Lotsofsounds API as an MCP tool server. The search and download endpoints map directly to MCP tool calls.

Rate limits for agent workflows

Keep daily request limits in mind when running agents in loops. Enterprise gives you 50,000 requests/day — suitable for production agent workflows. Downloads are unlimited on all paid plans.

PlanRequests/dayDownloads
Pro2,500Unlimited
Enterprise50,000Unlimited

Monitor usage via X-RateLimit-Remaining response headers.

Get started

Sign up and subscribe to a plan

Generate an API key from your dashboard

Add the tool definitions to your agent framework

Start searching for sounds with natural language

Check out the full API reference for all available endpoints and parameters.