langchain-strale
Strale tools as LangChain tools: company registry lookups, VAT and IBAN checks, sanctions and PEP screening, web page reading, and more, each paid per call. Built on langchain-core 1.x (BaseTool, BaseToolkit).
Install
pip install langchain-strale
Quick start: two meta-tools
The model gets strale_search (find a tool and its input schema) and strale_execute (run it by slug), the same pattern as the Strale MCP server. This keeps the prompt small however large the catalogue grows.
from langchain.agents import create_agent
from langchain_strale import StraleToolkit
toolkit = StraleToolkit(api_key="sk_live_...") # or set STRALE_API_KEY
agent = create_agent(
"openai:gpt-4o",
toolkit.get_meta_tools(), # strale_search, strale_execute, strale_balance
system_prompt="Use strale_search to find a Strale tool, then strale_execute to run it.",
)
result = agent.invoke({"messages": [{"role": "user", "content": "Is SE556703748501 a valid VAT number?"}]})
create_agent comes from the langchain package (1.x). "openai:gpt-4o" needs langchain-openai installed; any chat model with tool calling works, with its own provider package. The tools are ordinary LangChain tools, so model.bind_tools(toolkit.get_meta_tools()) works too.
strale_execute returns JSON with ok, output, price_cents, provenance and transaction_id. With an API key, each call is charged to your wallet and capped by max_price_cents (default 200, i.e. €2.00; set it on the toolkit, from 1 to 2000).
One tool per capability
tools = toolkit.get_tools() # one tool per capability, plus the meta-tools
tools = toolkit.get_tools(categories=["finance", "compliance"])
Each capability becomes a BaseTool named by its slug (e.g. vat-validate), with the price in its description and an args_schema generated from the capability's input schema. This loads the whole catalogue into the prompt; prefer the meta-tools for large toolsets.
Bundled solutions
Solutions (for example kyb-essentials-se) show up in strale_search results with "type": "solution"; the model passes that type to strale_execute.
Without an API key
Search works without a key, and some tools are free without one (for example iban-validate, email-validate, dns-lookup). The current free list is free_tier_slugs at https://api.strale.io/v1/platform/facts. A paid tool called without a key returns ok: false with instructions on how to pay (from a per-capability tool, as a tool error).
Get a key at strale.io.
x402 pay-per-use access
Eligible Strale tools are also sold per request over x402 with USDC on Base, no signup needed. This package uses API keys; for x402, call the HTTP endpoints directly.
- Catalog: https://api.strale.io/x402/catalog?src=pypi-readme
- Discovery: https://api.strale.io/.well-known/x402.json
Resources
Metadata
Release files for langchain-strale 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_strale-0.2.0.tar.gz | 15.6 kB | With provenance | Details for langchain_strale-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_strale-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_strale-0.2.0-py3-none-any.whl |
Total release size: 26.8 kB
Release files / langchain_strale-0.2.0.tar.gz
| Download URL | langchain_strale-0.2.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed3aee95db76d2c83dc70e632c34512635cb0d72eb98b7bef5c5a90ca81fbda4
|
|
BLAKE2b-256 checksum How to use checksums |
513db6f105a08148671e1d48ba151286332f6212f88b375b691e0fa8f6a0221c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / langchain_strale-0.2.0-py3-none-any.whl
| Download URL | langchain_strale-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ce5ab0b96a76533026cb45299ee2b64a223c02d0175658f96db967848bad892
|
|
BLAKE2b-256 checksum How to use checksums |
da48f0b744097adad1248dd440248d6c8c94dcc65dc7e3a469ba846e0646ebe1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for langchain-strale 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for langchain_strale-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.