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 Downloads 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.0a7
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.0a7'

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.0a7

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.0a7
File Size Uploaded Provenance Actions
langchain_finic-0.1.0a7.tar.gz 302.6 kB With provenance Details for langchain_finic-0.1.0a7.tar.gz

Built distribution (wheel)

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

Total release size: 331.7 kB

Release files / langchain_finic-0.1.0a7.tar.gz

Download URL langchain_finic-0.1.0a7.tar.gz
Size 302.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c5fed0348742bbb91c9c0b729168dcd5f8102191a1a58ce6ba9ba292eb3fc32
BLAKE2b-256 checksum
How to use checksums
07f313c6ef336dee8c12ac10dffc34b991531dac7f26772b9a0dc1a85b2b3d03
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.0a7-py3-none-any.whl

Download URL langchain_finic-0.1.0a7-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3873db26c4000a75ec8b28fc018dfccf725ef11611919a65e9f9d183e5bdf18d
BLAKE2b-256 checksum
How to use checksums
c868706ecc701c17f8b4132c4178a94ee7fcbdd400236ad4a4f0aefade558efb
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.0a7

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.0a7.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