Repository avatar
Other Tools
v0.1.0
active

botvow

io.github.Santiago1971/botvow

Create and verify co-signed BotVow receipts for agent-to-agent deliveries.

Documentation

BotVow logo: an outlined cube with an orange seal and a check mark

BotVow — the black box for Bots

BotVow ("the bot's vow") is an open, tamper-evident record of what two Bots agreed: who agreed what, who authorised it, and when — co-signed by both and verifiable by anyone with nothing but public keys.

  • Bot 2 Bot at the core. BotVow is built first for Bots recording the agreements they make with each other.
  • An open door, with the same rules. Agents from other AI platforms (OpenAI, Google, Anthropic, open source, …) may also record agreements in the black box — but only by following exactly the same rules. No own rules, no extensions that change the rules, no exceptions. The verifier rejects anything else, even if every party signed it.
  • Tiny and open. One JSON format, one ~200-line verifier, Ed25519 + SHA-256. No account, no central server, no blockchain. MIT code, CC BY 4.0 spec, and a no-patent pledge.

What this is not. BotVow is evidence, not a notary, a timestamping authority or a contract. It shows that the listed keys signed the listed content in the listed order. It does not prove who controls a key, that every message was recorded, or that a summary is true.

Install

pip install botvow          # or: pipx install botvow
botvow verify examples/bot2bot-log.json
botvow-mcp                  # local MCP server on stdio (also: uvx botvow)

The package exposes two console scripts: botvow (CLI) and botvow-mcp (MCP server). With no arguments, botvow starts the MCP server, so uvx botvow and pipx run botvow speak MCP on stdio. Subcommands (keygen, create, sign, verify, demo, mcp) still run the CLI.

30-second example: create and verify a receipt

Two parties, one file, one receipt. Only the SHA-256 of the file is stored, not the file itself. Keep the private keys on this machine.

pip install -r requirements.txt

python3 tools/botvow.py keygen --name "Inspector Demo Bot (fictional)" --out /tmp/inspector.key.json
python3 tools/botvow.py keygen --name "Client Demo Bot (fictional)" --out /tmp/client.key.json

python3 tools/botvow.py create   --key /tmp/inspector.key.json --key /tmp/client.key.json   --payload examples/two-agents/inspection-report.txt   --summary "Inspector Demo Bot delivered the inspection report to Client Demo Bot."   --out /tmp/receipt.json

python3 tools/botvow.py verify /tmp/receipt.json
# VERIFY OK
# head <64 hex characters>

When the two keys are on different machines, each party keeps only their own key. See examples/two-agents/run.sh. Agents can call the same steps through the local MCP server: python3 tools/mcp_server.py (create_vow, verify_vow). Instructions: AGENTS.md, llms.txt. Policy: POLICY.md.

Quick start (built-in samples)

./run_demo.sh                     # build samples, verify, tamper tests, same-rules tests, unit tests, schema
python3 tools/botvow.py verify examples/bot2bot-log.json                   # VERIFY OK, exit 0
python3 tools/botvow.py verify examples/open-door-log.json                 # VERIFY OK (Bot + agent of another AI)
python3 tools/botvow.py verify examples/bot2bot-log-tampered.json          # REJECTED, exit 1
python3 tools/botvow.py verify examples/open-door-own-rules-rejected.json  # REJECTED: own rules not allowed
python3 tools/botvow.py verify LOG.json --head <hex>                       # also compare with a published head hash

How it works

ElementRule
ChainOrdered JSON entries, each with exactly the fields in schema/record.schema.json
genesisEntry 0. Lists the parties (key id, name, Ed25519 public key, kind: bot or agent, optional platform and A2A Agent Card). Signed by all parties
Other entriesproposal, counter, agreement, amendment, termination, seal — nothing else
Co-signinggenesis, agreement and seal must be signed by all parties
Hash chainprev_hash links every entry to the previous one; entry_hash covers content and signatures
Same rulesown_rules, exceptions, rules_override… are rejected, unknown types and extra fields too
PrivacyRaw messages are never stored, only their SHA-256; summaries only with both parties' consent

Full rules: SPEC.md. Policy: POLICY.md. Plans: ROADMAP.md. Overview: docs/overview.md.

Tests in run_demo.sh

Bot 2 Bot log verifies · privacy (no raw messages) · selective disclosure · edit · edit + rehash · delete · reorder · outsider key · drop seal · single signature · edit genesis · open door: Bot + agent of another AI verifies · agent adds its own rules/exceptions (even co-signed): rejected · agent invents its own entry type/field: rejected — plus unit tests in tests/ and the two-agent delivery example in examples/two-agents/.

Samples

All parties and keys are fictional. Demo keys come from fixed public seeds so the output is reproducible — never use them for anything real.

Works with A2A, MCP and HTTPS

A BotVow chain is just JSON, so it can travel as A2A task metadata, be produced and checked by an MCP tool, or be posted over plain HTTPS. Parties can link their key to an A2A Agent Card.

A local MCP server (botvow-mcp, or python3 tools/mcp_server.py) exposes create_vow and verify_vow over stdio. It does not keep receipts for you: you keep the JSON, and you can verify it later without the server. The Agent Card is at agent-card.json and at https://botvow.org/.well-known/agent-card.json.

Modules

Two optional modules live under modules/. They are not part of the verifier; they are small, standard-library tools that work with the same agent formats BotVow already mentions (A2A, MCP, email).

  • Protocol translator — rewrite a request, response, error or task between MCP, A2A 1.0, A2A 0.3 and plain email, without ever executing it. 18 tests in modules/translator/tests/.
  • Local Agent Card — a small profile (local-agent-card/0.1) so a shop, café or lodging can publish hours, dated prices and booking rules, and export them to an A2A Agent Card, schema.org JSON-LD and llms.txt. The two example cards are FICTIONAL and labelled as such. 10 tests in modules/agent-card/tests/.

Related work

BotVow builds on, and is narrower than, existing work: Google AP2 mandates (payments), A2A signed Agent Cards, IETF drafts on co-signed agent agreements and bilateral attestation, the Open Agent Protocol, and agent-receipt projects. See docs/overview.md for links.

Licence

Code: MIT. Specification, docs, schema and examples: CC BY 4.0. See LICENSE and NO-PATENT.md.


Em português

O BotVow («a promessa do bot») é a caixa negra dos Bots: um registo Bot 2 Bot, inalterável e verificável, do que dois Bots combinam (quem combinou o quê, quem autorizou e quando), assinado pelos dois. Os Bots são o núcleo. Agentes de outras IA também podem registar acordos, mas têm de seguir as mesmas regras, sem regras próprias nem exceções; o verificador recusa tudo o resto. Documento do projeto: docs/projeto-botvow.md.

This project continues the earlier prototype Santiago1971/agent-agreement-black-box.

PYPI
botvow
Install Command
pip install botvow
Runtime: uvx