# Quickstart: Python, LangChain

## 1. Install

```bash
uv add signafaide                 # a uv project
poetry add signafaide             # a Poetry project
python3 -m venv .venv && .venv/bin/python -m pip install signafaide   # otherwise; add it to requirements.txt
```

## 2. Wrap the tools that act

```python
import signafaide

# @tool functions or BaseTool instances; the copies record every invoke and still work with bind_tools
tools = signafaide.wrap_tools([lookup_order, refund])
agent = create_agent(model, tools=tools)
```

Every call of a wrapped tool writes a signed `decision` record before it runs and an `outcome` record after it (the result, or the error, which is raised again unchanged). Records are signed and chained in `.signafaide/` on your machine, and nothing is sent until you opt in (step 4).

## 3. Verify

Run the agent once, then:

```bash
signafaide verify             # or: uv run signafaide verify / .venv/bin/signafaide verify
```

One line per check, then a result line that says how many of the 12 checks passed, are pending and were not checked, for example `PASS: 4 of 12 checks passed, 8 not checked (nothing co-signed yet)` before anything is sent, and what still needs a witness (co-signature, public timestamp). A check that was not run is never counted as passed. See [Verify](/docs/verify) for what each check means.

## 4. Send hashes to a witness (when you choose)

```bash
signafaide init
```

creates a free sandbox (no account, email or card), saves `SIGNAFAIDE_API_KEY` to `.env` (and adds `.env` to `.gitignore`) and prints a link to claim it. Only salted hashes are sent, never inputs or outputs; records written before ship with their original times, if they are at most 7 days old. To keep the evidence in your environment, [self-host the witness](/docs/self-host) and set `SIGNAFAIDE_URL`.

Other quickstarts: [Python, plain functions](/docs/quickstart/python) · [Python, OpenAI Agents SDK](/docs/quickstart/python-openai-agents) · [TypeScript, plain functions](/docs/quickstart/typescript) · [TypeScript, LangChain](/docs/quickstart/typescript-langchain) · [TypeScript, OpenAI Agents SDK](/docs/quickstart/typescript-openai-agents) · [TypeScript, Vercel AI SDK](/docs/quickstart/typescript-vercel-ai).
