Skip to main content

Coinbase AgentKit LangChain extension

Project description

AgentKit LangChain Extension

LangChain extension of AgentKit. Enables agentic workflows to interact with onchain actions.

Setup

Prerequisites

Installation

pip install coinbase-agentkit coinbase-agentkit-langchain

Environment Setup

Set 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_PRIVATE=<your-cdp-api-key-private>

Usage

Basic Setup

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.

Contributing

See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.

Project details


Release history Release notifications | RSS feed

This version

0.7.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coinbase_agentkit_langchain-0.7.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coinbase_agentkit_langchain-0.7.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file coinbase_agentkit_langchain-0.7.0.tar.gz.

File metadata

File hashes

Hashes for coinbase_agentkit_langchain-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9ace3bf09a683d90d87e24abbbff537ffd9622ead969ce2090b85d7204cf123c
MD5 2bf32bdfe995123e976b07b0c0ef965d
BLAKE2b-256 40485c737adb262a4a2b01b951aa50b64db2b41f818be3e9517498a2e6befe18

See more details on using hashes here.

Provenance

The following attestation bundles were made for coinbase_agentkit_langchain-0.7.0.tar.gz:

Publisher: publish_pypi_coinbase_agentkit_langchain.yml on coinbase/agentkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coinbase_agentkit_langchain-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coinbase_agentkit_langchain-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b55b88fcfec891347dd8aa0a078b9d4816c4ccaf1d8847d0444a2dbb9fb021cc
MD5 1a4f7ef80e0e4339fb8328167199bfaa
BLAKE2b-256 6d2dfb5afe4eb3306b4f2aa05807d8a2cbba667f63ac3734360aa3ab567c13e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for coinbase_agentkit_langchain-0.7.0-py3-none-any.whl:

Publisher: publish_pypi_coinbase_agentkit_langchain.yml on coinbase/agentkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page