LangChain extension of AgentKit. Enables agentic workflows to interact with onchain actions.
pip install coinbase-agentkit coinbase-agentkit-langchainSet the following environment variables:
export OPENAI_API_KEY=<your-openai-api-key>
export CDP_API_KEY_ID=<your-cdp-api-key-id>
export CDP_API_KEY_SECRET=<your-cdp-api-key-secret>
export CDP_WALLET_SECRET=<your-cdp-wallet-secret>from coinbase_agentkit import AgentKit
from coinbase_agentkit_langchain import get_langchain_tools
agentKit = AgentKit()
tools = get_langchain_tools(agentKit)
llm = ChatOpenAI(model="gpt-4o-mini")
agent = create_react_agent(
llm=llm,
tools=tools,
)For AgentKit configuration options, see the Coinbase Agentkit README.
For a full example, see the chatbot example.
See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.