Langchain KeeperHub

LangChain plugin for KeeperHub: enable web3 functionality to agents without setting up infra

Langchain KeeperHub

Created At

Open Agents

Project Description

langchain-keeperhub connects LangChain/LangGraph agents to KeeperHub so agents can transfer tokens, call contracts, conditionally execute, resolve ENS, and track txs via LangChain tools—using only a KeeperHub API key, with no private keys in app code (signing via KeeperHub / Turnkey TEE). Includes safety options, optional execution history, direct client usage, and MCP workflows. Open-source Python SDK on PyPI for agentic Web3 without key management in the agent stack.

How it's Made

I used Python, httpx for async HTTP to KeeperHub’s API, and pydantic + langchain-core so everything fits normal LangChain / LangGraph apps. The toolkit is the agent-facing layer; KeeperHubClient is the same API in a direct, script-friendly form (async async with style) so I’m not forcing everyone to run an agent.

ENS I kept on public JSON-RPC with simple eth_call patterns so I could skip web3.py. For the sync tool surface vs async client, I added a small async bridge (asyncio.run, or a thread when a loop is already running in notebooks or web apps).

For KeeperHub MCP, I load their hosted server when workflows are enabled, rename colliding tools (e.g. with a workflow_ prefix) so names stay clear, and strip noisy JSON Schema metadata so model providers like Gemini bind tools cleanly.

The ideas I cared about most: no write auto-retries (avoid double sends), guardrails before the network, and one codebase that works for “agent with tools” and “small Python automation with the client.”

background image mobile

Join the mailing list

Get the latest news and updates

Langchain KeeperHub | ETHGlobal