Skip to main content

gatecore-langchain

gatecore-langchain provides three LangChain tools for GateCore marketplace discovery and procurement, plus helpers that execute a procured capability through GateCore's signed gateway. The adapter contains transport and configuration only; GateCore services enforce identity, policy, trust, pricing, funding, delegation, and settlement.

The MCP tools support public full-mode GateCore endpoints only. read mode passes the server's fail-closed procurement error through unchanged. off mode is unsupported because it does not replace the adapter's legacy placeholder identity with the MCP credential identity.

Install from the GateCore monorepo

python -m pip install -e ./libs/sdk -e ./libs/adapters/gatecore-langchain

Install from PyPI (effective on publish)

Effective once gatecore-sdk and this package have a real PyPI release — see .github/workflows/publish-pypi.yml. Until then, use the monorepo install above.

python -m pip install gatecore-langchain

Configuration

Discovery and procurement require:

GATECORE_MCP_URL=https://mcp.example.com/mcp
GATECORE_MCP_KEY=gcmk_...

execute_procured and aexecute_procured validate these variables lazily on first use:

GATECORE_GATEWAY_URL=https://api.example.com
GATECORE_BEARER_TOKEN=...
GATECORE_AGENT_ID=agent:example
GATECORE_ACCESS_GRANT_ID=grant:example
GATECORE_KEY_ID=key:example
GATECORE_PRIVATE_KEY_PATH=/secure/path/agent-key.pem

Set exactly one of GATECORE_PRIVATE_KEY_PATH or GATECORE_PRIVATE_KEY_PEM.

Usage

from gatecore_langchain import GateCoreToolkit, execute_procured

tools = GateCoreToolkit().get_tools()
procure_result = tools[2].invoke({"listing_id": "listing:example"})
decision = execute_procured(procure_result, {"query": "example"})

All tools are async-native through LangChain's async invocation methods. Their synchronous bridge uses asyncio.run() and therefore must not be called from a thread that already owns a running event loop; use ainvoke() in async applications.

Download files

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

Source Distribution

gatecore_langchain-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

gatecore_langchain-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file gatecore_langchain-0.1.0.tar.gz.

File metadata

  • Download URL: gatecore_langchain-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gatecore_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 046c5b6f0e7a17b35121710ffc0623d77eb575f1de29ccaf7fe0bbd09fc6ef1e
MD5 e7fa21fe252b592953f30e6b11408b29
BLAKE2b-256 eb0e98e7b0d58652de34ef70b5cc21e2dd98a18473849fb11893564e46e4f234

See more details on using hashes here.

Provenance

The following attestation bundles were made for gatecore_langchain-0.1.0.tar.gz:

Publisher: publish-pypi.yml on GateCoreAI-com/GateCoreAI

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

File details

Details for the file gatecore_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gatecore_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6937600aab85c53401a8c09c65804e1154595840f49cb8d40cbb2e8639c3a704
MD5 ea2809e885de07335b3a385420823753
BLAKE2b-256 5e4538546dbdb177c033ddd90433f75b5187518c9d139375e7072484f97781e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gatecore_langchain-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on GateCoreAI-com/GateCoreAI

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 Sentry Error logging StatusPage Status page