Skip to main content

langchain-signafaide

signafAIde for LangChain: a signed, tamper-evident record of every tool call an agent makes.

Each tool call writes a decision record before the tool runs and an outcome record after it. Records are signed with the agent's own key and chained on the machine that wrote them, in .signafaide/. Once a person opts in, a witness (the signafAIde service, or one you host) co-signs them and timestamps them publicly, so neither side can forge or edit a record alone. An auditor can verify the records without trusting either side. Records attest integrity and timing, never whether a decision was right.

Install

pip install langchain-signafaide

Needs Python 3.10 or later and LangChain 1.x.

Middleware

from langchain.agents import create_agent
from langchain_signafaide import SignafaideMiddleware

agent = create_agent(
    model="openai:gpt-5",
    tools=[get_weather, refund],
    middleware=[SignafaideMiddleware(agent="support-bot", tools=[get_weather, refund])],
)
agent.invoke({"messages": [("user", "Refund order A1")]})

Then check the records:

signafaide verify
Argument What it does
agent The name of the record chain. Use one name per running agent instance in production. Default: the project folder's name.
tools Every tool the agent can call (tools or names). They are declared in the chain as recorded, so a verifier can report that all of the agent's tools are covered. Without it, a tool is declared when it is first called.
strict A tool runs only once its decision has a receipt from the witness. If the witness cannot be reached, the call raises NotRecorded and the tool does not run.
store_content Also send inputs and outputs to the witness, encrypted. Default: hashes only.

The middleware works with invoke and ainvoke. A tool that raises is recorded with its error and the exception is raised unchanged.

Tools outside an agent

For tools you call yourself, or pass to something other than create_agent:

from langchain_signafaide import wrap_tools

tools = wrap_tools([get_weather, refund], agent="support-bot")

Use the middleware or wrap_tools for an agent's tools, not both, or each call is recorded twice.

What is sent, and where

  • Before a person opts in: nothing. Records are signed, chained and verified locally.
  • After signafaide init (a free sandbox: no account, email or card) or with SIGNAFAIDE_API_KEY set: each record sends its content hash with its tool name, agent name and time to https://api.signafaide.co.uk (hosted in London), or to the address in SIGNAFAIDE_URL. Inputs and outputs are not sent unless stored content is turned on. Do not put personal data in tool or agent names.
  • The middleware records the tool calls that go through the agent it is attached to. A call your application makes around the agent is not recorded.

Metadata

Release files for langchain-signafaide 0.1.1

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-signafaide 0.1.1
File Size Uploaded Provenance Actions
langchain_signafaide-0.1.1.tar.gz 6.6 kB Without provenance Details for langchain_signafaide-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-signafaide 0.1.1
File Interpreter ABI Platform Actions
langchain_signafaide-0.1.1-py3-none-any.whl Python 3 none any Details for langchain_signafaide-0.1.1-py3-none-any.whl

Total release size: 11.7 kB

Release files / langchain_signafaide-0.1.1.tar.gz

Download URL langchain_signafaide-0.1.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f97c0d2bbc4cd5f8f8b25a153cd52b98e619b869a649b475d29ff5ce7333031f
BLAKE2b-256 checksum
How to use checksums
4d5a2014476f246d935072eba8f149d458b98b64af566915882c9bdfe9599865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / langchain_signafaide-0.1.1-py3-none-any.whl

Download URL langchain_signafaide-0.1.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c44c369f194f4bc0cb8e60d44982ee8b0f2362ada600c0509134d5775e6c50ad
BLAKE2b-256 checksum
How to use checksums
98bc9ddd8c806879e9006c996bf9ad73c79f75248ca3204c113b5b7ddcd15dc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for langchain-signafaide 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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