-
Notifications
You must be signed in to change notification settings - Fork 52
Agent Gateway: 40+ APIs for agent tool use (works with all frameworks) #11
Description
Suggestion for the frameworks comparison
Your repo does a great job comparing AI agent frameworks. One thing all these frameworks have in common is the need for external tools/APIs. I maintain an API gateway with 40+ services specifically designed for AI agents that works with any framework.
Framework-agnostic examples
LangChain
from langchain.tools import tool
import requests
GATEWAY = "https://agent-gateway-kappa.vercel.app"
@tool
def scrape_webpage(url: str) -> str:
"""Scrape a webpage and return markdown content."""
r = requests.post(f"{GATEWAY}/api/scraper/scrape", json={"url": url, "format": "markdown"})
return r.json().get("content", "")[:2000]
@tool
def run_python(code: str) -> str:
"""Execute Python code in a sandbox."""
r = requests.post(f"{GATEWAY}/api/code/run", json={"code": code, "language": "python"})
return r.json().get("stdout", "")CrewAI
from crewai_tools import tool
import requests
GATEWAY = "https://agent-gateway-kappa.vercel.app"
@tool("Web Search")
def search_web(query: str) -> str:
"""Search the web for information."""
r = requests.get(f"{GATEWAY}/api/search/query", params={"q": query})
results = r.json().get("results", [])
return "\n".join(f"- {r['title']}: {r['url']}" for r in results[:5])
@tool("Screenshot")
def take_screenshot(url: str) -> str:
"""Capture a screenshot of a website. Returns image URL."""
r = requests.post(f"{GATEWAY}/api/screenshot/capture", json={"url": url})
return r.json().get("url", "")Available tools
40+ services including: web scraper, screenshots, code runner (Python/JS/TS/Bash), web search, crypto prices, on-chain analytics, agent memory (vector search), file storage, PDF generator, image processor, email sender, DNS lookup, URL shortener, and more.
Free tier: 200 credits, no API key needed.
SDKs: pip install agent-gateway / npm install agent-gateway-sdk
Full catalog: https://api-catalog-three.vercel.app
Could be a useful addition to the "Tools & APIs" section of your frameworks comparison!