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.

Quickstart

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

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

request = DecisionRequest(
    state={"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.0a5'

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.

Metadata

Release files for langchain-finic 0.1.0a5

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.0a5
File Size Uploaded Provenance
langchain_finic-0.1.0a5.tar.gz 225.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 241.6 kB

Release files / langchain_finic-0.1.0a5.tar.gz

Download URL langchain_finic-0.1.0a5.tar.gz
Size 225.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5125d43e9d658e4d0c88e85acecc014537da456d74e7ac2a285884fec5ed34a0
BLAKE2b-256 checksum
How to use checksums
79148644fcf64b2c138d446060f7fe161418d41b7863ed6efd61d631753c3f43
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 26, 2026.

Transparency log

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

Download URL langchain_finic-0.1.0a5-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
336dcf91a64b9719b07da667c5d088bf56ffff4d59a0f2414f69a20bc8c9f5f2
BLAKE2b-256 checksum
How to use checksums
6966859401b3aad783b1a19980d20f6355cfafa4e3fbac3cfaa28a0a2c3bae13
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 26, 2026.

Transparency log

Security for langchain-finic 0.1.0a5

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.0a5.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 26, 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