OpenAI Agents SDK 통합
Scavio는 OpenAI Agents SDK의 툴 패키지로 Python과 TypeScript 모두에서 제공됩니다. openai-agents-scavio를 설치하고 도구를 Agent에 넘겨주기만 하면 Google, YouTube, Amazon, Walmart, Reddit, TikTok, Instagram 전반에서 실시간 검색 기능을 사용할 수 있습니다 — 패키지 하나, API 키 하나로 가능합니다.
전제 조건
- OpenAI Agents SDK:
openai-agents(Python 3.10 이상) 또는@openai/agents(Node 22 이상). - dashboard.scavio.dev에서 발급받은 Scavio API 키(신규 계정은 신용카드 없이 무료 크레딧을 받습니다).
설치
# Python
pip install openai-agents-scavio
# TypeScript
npm install openai-agents-scavio @openai/agents zodAPI 키 설정
export SCAVIO_API_KEY=sk_live_your_key도구는 환경 변수에서 SCAVIO_API_KEY를 읽으며, 팩토리에 api_key / { apiKey }를 전달할 수도 있습니다.
빠른 시작 (Python)
from agents import Agent, Runner
from openai_agents_scavio import get_scavio_tools
agent = Agent(
name="Search Assistant",
instructions="Search the web, shopping sites, and social platforms with Scavio.",
tools=get_scavio_tools(), # reads SCAVIO_API_KEY
)
result = Runner.run_sync(agent, "Find the top budget laptops on Amazon")
print(result.final_output)빠른 시작 (TypeScript)
import { Agent, run } from "@openai/agents";
import { buildScavioTools } from "openai-agents-scavio";
const agent = new Agent({
name: "Search Assistant",
instructions: "Search the web, shopping sites, and social platforms with Scavio.",
tools: buildScavioTools(), // reads SCAVIO_API_KEY
});
const result = await run(agent, "Find the top budget laptops on Amazon");
console.log(result.finalOutput);필요한 제공자만 활성화
# Python
tools = get_scavio_tools(
enable_google=True,
enable_reddit=True,
enable_amazon=False,
enable_walmart=False,
enable_youtube=False,
enable_tiktok=False,
enable_instagram=False,
)// TypeScript
const tools = buildScavioTools({
enableGoogle: true,
enableReddit: true,
enableAmazon: false,
enableWalmart: false,
enableYoutube: false,
enableTiktok: false,
enableInstagram: false,
});개별 플래그와 상관없이 모든 도구를 등록하려면 all=True(Python) 또는 { all: true }(TypeScript)를 전달하세요.
사용 가능한 도구
두 패키지 모두 Scavio 엔드포인트마다 하나씩 총 32개의 도구를 노출하며, 이름은 scavio_<provider>_<action> 형식입니다(예: scavio_google_search, scavio_amazon_product, scavio_reddit_post). 각 도구는 구조화된 Scavio JSON 응답을 반환합니다.
| 제공자 | 도구 |
|---|---|
scavio_google_search | |
| Amazon | scavio_amazon_search, scavio_amazon_product |
| Walmart | scavio_walmart_search, scavio_walmart_product |
| YouTube | scavio_youtube_search, scavio_youtube_metadata |
scavio_reddit_search, scavio_reddit_post | |
| TikTok | 11개 도구(profile, posts, video, comments, search, hashtag, followers, ...) |
| 12개 도구(profile, posts, reels, stories, post, comments, search, followers, ...) |
MCP를 통해 모든 엔드포인트 사용
설치 없이 전체 Scavio API를 사용하려면, Agents SDK를 호스팅된 MCP 서버로 연결하세요:
# Python
from agents import Agent
from agents.mcp.server import MCPServerStreamableHttp
server = MCPServerStreamableHttp(
name="scavio",
params={"url": "https://mcp.scavio.dev/mcp", "headers": {"x-api-key": "sk_live_..."}},
)
agent = Agent(name="Search Assistant", mcp_servers=[server])// TypeScript
import { Agent, MCPServerStreamableHttp } from "@openai/agents";
const server = new MCPServerStreamableHttp({
url: "https://mcp.scavio.dev/mcp",
name: "scavio",
requestInit: { headers: { "x-api-key": process.env.SCAVIO_API_KEY! } },
});
const agent = new Agent({ name: "Search Assistant", mcpServers: [server] });크레딧 비용
대부분의 호출은 1 크레딧이 소요됩니다. Reddit과 Instagram은 2 크레딧, Google은 light_request가 설정되지 않은 경우 2 크레딧이 소요됩니다. 요금제 한도는 속도 제한 참조를, 재시도 지침은 오류 참조를 확인하세요.