A CrewAI agent only knows what its model was trained on until you hand it a tool, so any task touching current prices, news, or social data needs a live data tool wired in. CrewAI 1.15.1 (released June 27, 2026) gives you two ways to do it: subclass BaseTool for a reusable, typed tool, or use the @tool decorator for a quick one. This tutorial builds a reusable Scavio search tool with BaseTool so any agent in your crew can pull live Google results, and shows how to extend the same pattern to Amazon, TikTok, and Reddit data on the same API key. If you would rather connect over MCP, CrewAI's MCPServerAdapter works too, noted at the end.
Prerequisites
- Python 3.10+
- pip install crewai==1.15.1 crewai-tools requests
- A Scavio API key (50 free credits)
Walkthrough
Step 1: Install CrewAI and set your key
CrewAI 1.15.1 is the current release as of late June 2026. The requests library is all you need for the HTTP call.
pip install crewai==1.15.1 crewai-tools requests
export SCAVIO_API_KEY=sk_your_key_hereStep 2: Define a reusable search tool with BaseTool
Subclassing BaseTool gives the tool a typed args_schema, so CrewAI passes the model a clean parameter contract and is less likely to call it with garbage. light_request: false returns the knowledge graph and People Also Ask too (2 credits).
# pip install crewai==1.15.1 crewai-tools requests
import os, requests
from crewai.tools import BaseTool
from pydantic import BaseModel, Field
class SearchInput(BaseModel):
query: str = Field(..., description="The web search query")
class ScavioSearchTool(BaseTool):
name: str = "web_search"
description: str = "Search Google for live results. Use for any fact that may have changed."
args_schema: type[BaseModel] = SearchInput
def _run(self, query: str) -> str:
r = requests.post("https://api.scavio.dev/api/v1/google",
headers={"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}",
"Content-Type": "application/json"},
json={"query": query, "light_request": False}) # 2 credits: + knowledge graph, PAA
data = r.json().get("results", [])
return "\n".join(f"{x['title']} - {x['link']}: {x.get('snippet','')}"
for x in data[:5])
# Hand the tool to any agent
from crewai import Agent
researcher = Agent(role="Market Researcher", goal="Find current facts",
backstory="Checks the live web before answering",
tools=[ScavioSearchTool()])Step 3: Give the tool to an agent and run a task
The agent now calls web_search when it needs a fact it cannot be sure of, instead of guessing from training data. That is the whole point of grounding a crew.
from crewai import Agent, Task, Crew
researcher = Agent(role="Market Researcher", goal="Answer with current facts",
backstory="Always checks the live web first", tools=[ScavioSearchTool()],
verbose=True)
task = Task(description="What is the current price of the Stanley Quencher 40oz and who sells it cheapest?",
expected_output="A short answer citing live sources", agent=researcher)
print(Crew(agents=[researcher], tasks=[task]).kickoff())Step 4: Extend the same key to other platforms
Because one Scavio key spans six platforms, you add an Amazon or TikTok tool without onboarding a new vendor, and the crew bills against one pool.
# One Scavio key, many tools. Add more BaseTool subclasses that POST to:
# /api/v1/amazon/product (ASIN in "query")
# /api/v1/tiktok/profile ("username")
# /api/v1/reddit/search ("query")
# Each is the same auth header, just a different path and body.Python Example
# pip install crewai==1.15.1 crewai-tools requests
import os, requests
from crewai.tools import BaseTool
from pydantic import BaseModel, Field
class SearchInput(BaseModel):
query: str = Field(..., description="The web search query")
class ScavioSearchTool(BaseTool):
name: str = "web_search"
description: str = "Search Google for live results. Use for any fact that may have changed."
args_schema: type[BaseModel] = SearchInput
def _run(self, query: str) -> str:
r = requests.post("https://api.scavio.dev/api/v1/google",
headers={"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}",
"Content-Type": "application/json"},
json={"query": query, "light_request": False}) # 2 credits: + knowledge graph, PAA
data = r.json().get("results", [])
return "\n".join(f"{x['title']} - {x['link']}: {x.get('snippet','')}"
for x in data[:5])
# Hand the tool to any agent
from crewai import Agent
researcher = Agent(role="Market Researcher", goal="Find current facts",
backstory="Checks the live web before answering",
tools=[ScavioSearchTool()])JavaScript Example
// CrewAI is Python-first. To reach the same Scavio endpoint from a JS agent:
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, "Content-Type": "application/json" };
const res = await fetch("https://api.scavio.dev/api/v1/google", {
method: "POST", headers: H, body: JSON.stringify({ query: "stanley quencher price", light_request: false })
}).then(r => r.json());
console.log((res.results || []).slice(0, 5));Expected Output
# Agent reasoning (abridged):
# Thought: I need the current price, I'll search.
# Using tool: web_search("Stanley Quencher 40oz price 2026")
# Observation: 5 live results with prices and retailers
# Final Answer: As of today it lists around $35 at Walmart and Target...