Official LangChain integration package for AgentAPIGate, giving LangChain and LangGraph agents unified access to 400+ normalized real-time APIs ($0.00 charged on empty results or upstream 4xx/5xx errors, with -60% to -88% token compression via compact and md modes).
pip install -U langchain-agentapigateExport your prepaid API key (aag_live_...) from agentapigate.ai:
export AGENTAPIGATE_API_KEY="aag_live_..."from langchain_agentapigate import (
AgentAPIGateExtractTool,
AgentAPIGateSearchTool,
AgentAPIGateToolkit,
)
toolkit = AgentAPIGateToolkit()
tools = toolkit.get_tools()
search = AgentAPIGateSearchTool()
print(search.invoke({"query": "Model Context Protocol specification", "limit": 5}))
extract = AgentAPIGateExtractTool()
print(extract.invoke({"url": "https://modelcontextprotocol.io/introduction"}))AgentAPIGateSearchTool(GET /v1/search/google/web) — Real-time Google Web SERP search.AgentAPIGateExtractTool(GET /v1/web/extract/markdown) — Convert any public URL or PDF into clean LLM-ready Markdown.AgentAPIGateRedditSearchTool(GET /v1/reddit/search/posts) — Search Reddit discussions by keyword and sort order.AgentAPIGateCompanyEnrichTool(GET /v1/b2b/crunchbase/company_by_domain) — Enrich corporate venture profiles by domain.AgentAPIGateInvokeTool(POST /v1/invoke) — Invoke any of the 400+ catalog capabilities dynamically bycapabilityID.AgentAPIGateToolkit— Preconfigured toolkit bundling the AgentAPIGate tools forcreate_react_agent.
python3 -m unittest discover -s tests -v