# apifare for LangGraph One prepaid, capped key for every API your agent needs, under hard caps and a kill switch. 1. Get a token: https://apifare.com/start?origin=page:integrations-langgraph (shown once). 2. In LangGraph v1, the prebuilt agent is create_agent from langchain.agents, which runs on LangGraph and replaces create_react_agent. Load apifare's tools with LangChain's MCPAdapter and pass them in: the agent you get back is a compiled LangGraph graph. ``` pip install "langchain[mcp]" ``` ``` import asyncio, os from fastmcp.client import Client from langchain.agents import create_agent from langchain.mcp import MCPAdapter async def main(): client = Client("https://apifare.com/mcp", auth=os.environ["APIPAY_TOKEN"]) async with MCPAdapter(client) as adapter: tools = await adapter.list_tools() agent = create_agent("claude-sonnet-5", tools) result = await agent.ainvoke( {"messages": [{"role": "user", "content": "What's the weather in London?"}]} ) print(result["messages"][-1].content) asyncio.run(main()) ``` Set APIPAY_TOKEN and your model provider's key, then run it. The token goes in as auth without the word "Bearer": FastMCP adds it. 3. Try it: "search the web for X", then "fetch a URL", then "what's the weather in London". 4. Caps and the kill switch are checked before dispatch. An empty balance returns HTTP 402 with a top-up link (see /errors.md). Prices: https://apifare.com/capabilities. Config checked against https://docs.langchain.com/oss/python/migrate/langgraph-v1 on 2026-09-13.