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

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.0
File Size Uploaded Provenance Actions
langchain_signafaide-0.1.0.tar.gz 5.4 kB Without provenance Details for langchain_signafaide-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.4 kB

Release files / langchain_signafaide-0.1.0.tar.gz

Download URL langchain_signafaide-0.1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
900c4cbaa9f0dccea0372d5368b814be12f72a04e9ae8fc15d8453c544567223
BLAKE2b-256 checksum
How to use checksums
2d61eb34b7c3e47b7c5aa677e68c461c1266ce1e79dcf64cc1b1f587159d568f
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.0-py3-none-any.whl

Download URL langchain_signafaide-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d3d8f9bbc7e927c3a9db94cd756301f159c19500257adf037fc414b3b2413c7
BLAKE2b-256 checksum
How to use checksums
84f2f26b02254c7a4c931516cbff9597f68e8e3a13abcf92eb76e02b0ed2412b
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.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.

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