You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PraisonAI agents could benefit from a set of ready-made external tools. I maintain an API gateway with 40+ services designed for AI agents — web scraping, screenshots, code execution, crypto data, vector memory, and more.
Since PraisonAI supports custom tools via the @tool decorator, integration is straightforward:
Example
frompraisonaiagentsimportAgent, Task, PraisonAIAgentsfrompraisonaiagentsimporttoolimportrequestsGATEWAY="https://agent-gateway-kappa.vercel.app"@tool("Scrape a webpage and return markdown content")defscrape_url(url: str) ->str:
r=requests.post(f"{GATEWAY}/api/scraper/scrape", json={"url": url, "format": "markdown"})
returnr.json().get("content", "")[:3000]
@tool("Execute Python code in a sandbox")defrun_code(code: str) ->str:
r=requests.post(f"{GATEWAY}/api/code/run", json={"code": code, "language": "python"})
data=r.json()
returndata.get("stdout", "") +data.get("stderr", "")
@tool("Search the web")defweb_search(query: str) ->str:
r=requests.get(f"{GATEWAY}/api/search/query", params={"q": query})
results=r.json().get("results", [])
return"\n".join(f"- {item[title]}: {item[url]}"foriteminresults[:5])
@tool("Get real-time crypto price")defcrypto_price(symbol: str) ->str:
r=requests.get(f"{GATEWAY}/api/crypto/price/{symbol}")
returnstr(r.json())
# Research agent with web + code capabilitiesresearcher=Agent(
name="Researcher",
role="Research Analyst",
goal="Research topics using web scraping and data analysis",
tools=[scrape_url, run_code, web_search, crypto_price]
)
task=Task(
description="Research the current state of DeFi on Solana. Scrape top protocols, analyze TVL data.",
agent=researcher
)
agents=PraisonAIAgents(agents=[researcher], tasks=[task])
agents.start()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
PraisonAI agents could benefit from a set of ready-made external tools. I maintain an API gateway with 40+ services designed for AI agents — web scraping, screenshots, code execution, crypto data, vector memory, and more.
Since PraisonAI supports custom tools via the
@tooldecorator, integration is straightforward:Example
Available services (40+)
Free tier: 200 credits, no API key needed.
Python SDK:
pip install agent-gatewayFull catalog: https://api-catalog-three.vercel.app
Would a pre-built tool pack for PraisonAI be useful? Happy to create one if there is interest.
Beta Was this translation helpful? Give feedback.
All reactions