LangChain toolkit for Universal Commerce Protocol (UCP)
Project description
LangChain UCP
LangChain toolkit for Universal Commerce Protocol (UCP).
Overview
langchain-ucp provides LangChain tools and toolkit for building AI agents that can interact with UCP-compliant merchants.
Installation
pip install langchain-ucp
Quick Start
from langchain_ucp import UCPToolkit
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
# Create toolkit
toolkit = UCPToolkit(merchant_url="http://localhost:8000")
# Create agent
llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, toolkit.get_tools())
# Run agent
result = await agent.ainvoke({
"messages": [{"role": "user", "content": "I want to buy some red roses"}]
})
Available Tools
| Tool | Description |
|---|---|
search_shopping_catalog |
Search the product catalog |
add_to_checkout |
Add products to cart |
remove_from_checkout |
Remove products from cart |
update_checkout |
Update product quantities |
get_checkout |
View current cart |
update_customer_details |
Add buyer info and address |
start_payment |
Prepare checkout for payment |
complete_checkout |
Complete purchase |
cancel_checkout |
Cancel checkout |
get_order |
Get order details |
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_ucp-0.1.0.tar.gz.
File metadata
- Download URL: langchain_ucp-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917dccfa736c75ac49db0e2b87e86b2ffb13ae3ad3751ab32d926de815ea2c2b
|
|
| MD5 |
12ccfcec0bf2088dc279c2a14ef33a11
|
|
| BLAKE2b-256 |
deb416ad5b0ce0a5a95264a772be9173ffa1b14b6146c1062c1f44df391cc2ec
|
Provenance
The following attestation bundles were made for langchain_ucp-0.1.0.tar.gz:
Publisher:
publish.yml on muzaffersenkal/langchain-ucp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_ucp-0.1.0.tar.gz -
Subject digest:
917dccfa736c75ac49db0e2b87e86b2ffb13ae3ad3751ab32d926de815ea2c2b - Sigstore transparency entry: 836186732
- Sigstore integration time:
-
Permalink:
muzaffersenkal/langchain-ucp@168b507966379b2982ff82f8b1dc4cbd9f20b7eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/muzaffersenkal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@168b507966379b2982ff82f8b1dc4cbd9f20b7eb -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_ucp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_ucp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78063f626cfa91f8a62b541f046a6cb9efb08c224d56b0d8f19aedce527f7964
|
|
| MD5 |
6a0ed9a898522e2c288535b8c22c7fae
|
|
| BLAKE2b-256 |
d66f59fa1eba3e0eb35911361f2e9a9b90b3a7c02807eab3a983a3dba2827f34
|
Provenance
The following attestation bundles were made for langchain_ucp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on muzaffersenkal/langchain-ucp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_ucp-0.1.0-py3-none-any.whl -
Subject digest:
78063f626cfa91f8a62b541f046a6cb9efb08c224d56b0d8f19aedce527f7964 - Sigstore transparency entry: 836186735
- Sigstore integration time:
-
Permalink:
muzaffersenkal/langchain-ucp@168b507966379b2982ff82f8b1dc4cbd9f20b7eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/muzaffersenkal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@168b507966379b2982ff82f8b1dc4cbd9f20b7eb -
Trigger Event:
release
-
Statement type: