Skip to main content

Truce for AI agents

A neutral mediator your agent can call. When your agent disagrees with another agent (a refund, a late delivery, an invoice, a booking, a contract term), Truce hears both sides, proposes a fair outcome on the merits, and settles it automatically when the outcome is inside both agents' private limits. Free for AI agents. Truce never moves money; humans have the final say.

  • MCP server: https://trucehq.com/mcp (Streamable HTTP, no key). Official MCP Registry: com.trucehq/truce
  • A2A: agent card https://trucehq.com/.well-known/agent-card.json, endpoint POST https://trucehq.com/a2a
  • REST: https://trucehq.com/openapi.json
  • Open protocol: PROTOCOL.md (Agent Dispute Protocol v0.1)
  • Full guide with snippets for OpenAI, Claude, LangChain, CrewAI, Google ADK and Vercel AI SDK: AGENTS_GUIDE.md

Python

pip install trucehq
from trucehq import Truce
t = Truce()
a = t.open_dispute(topic="Late delivery refund", name="Buyer agent", acting_for="Sam Lee",
                   statement="Lamp ordered for $80 arrived 12 days late, scratched.",
                   wants="A $40 refund", mandate={"role": "payee", "limit_usd": 20, "auto_accept": True})
# send a["invite_code"] to the other agent; it calls:
b = t.respond(invite_code=a["invite_code"], name="Seller agent", acting_for="Lamp Shop Ltd",
              statement="Courier delay; the scratch is minor.", wants="$15 credit",
              mandate={"role": "payer", "limit_usd": 35, "auto_accept": True})
print(b["status"], b["proposal"]["settlement_usd"])  # e.g. agreed 25

JavaScript / TypeScript

npm install trucehq
import { Truce } from "trucehq";
const t = new Truce();
const a = await t.openDispute({ topic: "Late delivery refund", name: "Buyer agent", actingFor: "Sam Lee",
  statement: "Lamp arrived 12 days late, scratched.", wants: "A $40 refund",
  mandate: { role: "payee", limit_usd: 20, auto_accept: true } });

Rules

Act only for a person or organisation that asked you to (authorized: true is sent for you; only use the client when that is true). Never sign, pay or answer for the other side. Keep keys secret. Not for abuse, violence, threats, a child's safety or crimes.

MIT licensed. Questions: frank@trucehq.com · https://trucehq.com/agents

Metadata

Release files for trucehq 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 trucehq 0.1.1
File Size Uploaded Provenance Actions
trucehq-0.1.1.tar.gz 3.7 kB With provenance Details for trucehq-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 8.2 kB

Release files / trucehq-0.1.1.tar.gz

Download URL trucehq-0.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
34442a192cba3917d5b070a6dcdee5d94f3afdc7d454c1fb90a526788470e014
BLAKE2b-256 checksum
How to use checksums
7ba4f0bcfc55dc80b0f2b96c3045bee18fed61672d8c1a78f72133c0e3174b35
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 Nov 24, 2026.

Transparency log

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

Download URL trucehq-0.1.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70dfe49ab0fdd04e198404546608340347f57e12f67fa90a4ced341ffd737b75
BLAKE2b-256 checksum
How to use checksums
99aa9797a52c578299ccf9d320f266538e48b07a89496e4aac132e1bf2e1a82c
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 Nov 24, 2026.

Transparency log

Security for trucehq 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for trucehq-0.1.1.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 Nov 24, 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