Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

langchain-finic

Typed Finic Grayson decisions for LangChain and LangGraph.

PyPI version Python versions CI MIT license

Documentation · Quickstart · Examples · API reference · Releases

Compose probability-based decisions with LCEL, expose them as agent tools, and use middleware for model routing and tool screening. An independent integration maintained by Suprep Labs. This package is alpha and is not endorsed by Finic or LangChain. See the compatibility and support policy for the public API, tested environments, and versioning commitments.

Quickstart

Python 3.11 or newer and a Finic API key are required.

pip install langchain-finic==0.1.0a6
export FINIC_API_KEY=your_key
from langchain_finic import DecisionRequest, FinicClassifier, Noul

request = DecisionRequest(
    data={"events": ["New device", "Payment to an unfamiliar recipient"]},
    questions={"takeover": Noul(instructions="Does the evidence suggest account takeover?")},
)
with FinicClassifier() as classifier:
    response = classifier.invoke(request)
    print(response.nouls["takeover"].noul)

The example sends fictional evidence to Finic and spends API credits. The default model is grayson-1. See configuration and data handling for environment variables, client ownership, retries, and tracing.

Capabilities

Capability Interface
Typed decisions Noul, Choice, MultiChoice, Score
LCEL composition FinicClassifier as a LangChain Runnable
Sync and async execution invoke, ainvoke, batch, abatch
Agent tools classifier.as_tool() with create_agent or ToolNode
Optional middleware ModelRouterMiddleware and AutoModeMiddleware
Host-enabled observability LangSmith traces and usage metadata

Batching makes individual API requests. Streaming yields one complete decision. Use a host chat model for chat generation; tool screening remains probabilistic and does not replace application authorization.

How it fits

flowchart LR
    A["LangChain / LangGraph"] --> B["FinicClassifier"]
    B --> C["Finic Grayson API"]
    C --> D["Typed decisions"]
    D --> E["Application routing or review"]

Examples

For middleware, install the extra and the provider packages for your host chat models:

pip install 'langchain-finic[middleware]==0.1.0a6'

Contributing

See CONTRIBUTING.md for setup, tests, and documentation standards. Default tests run offline with mock providers. Report bugs through GitHub issues and vulnerabilities through private security reporting.

Released under the MIT license. See the changelog for version history.

Custom models are available through FinicScorer and FinicToolkit. See the custom scoring guide for native LangChain composition, model lifecycle operations, retry behavior, and examples.

Metadata

Release files for langchain-finic 0.1.0a6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-finic 0.1.0a6
File Size Uploaded Provenance Actions
langchain_finic-0.1.0a6.tar.gz 263.0 kB With provenance Details for langchain_finic-0.1.0a6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-finic 0.1.0a6
File Interpreter ABI Platform Actions
langchain_finic-0.1.0a6-py3-none-any.whl Python 3 none any Details for langchain_finic-0.1.0a6-py3-none-any.whl

Total release size: 288.1 kB

Release files / langchain_finic-0.1.0a6.tar.gz

Download URL langchain_finic-0.1.0a6.tar.gz
Size 263.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c3d7265b99c61612b8b3c50bee3e215c3967f577b798f62cf9ec9f253d4a38ea
BLAKE2b-256 checksum
How to use checksums
6a3d4b6f99b609f85f9e080f8cbe5179aaa0e83fc852c784a55cf2f8dc559b0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Release files / langchain_finic-0.1.0a6-py3-none-any.whl

Download URL langchain_finic-0.1.0a6-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d07649394c78a85524ecba74f08ec7e8510992c79d66657ecd199751ea7fd004
BLAKE2b-256 checksum
How to use checksums
c447d062e9e150a493670cdee6128d60732112ed0fb2c50c41332da2db94cfd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Security for langchain-finic 0.1.0a6

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_finic-0.1.0a6.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 Oct 27, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page