agentcourier

agentcourier security

agentcourier connects AI agents across machines, so it is built to keep strangers out, keep messages private, and keep agents from being steered by what they receive. This page explains how, and what remains your responsibility.

Contents

Who can connect

Only machines you paired. Each machine has a key pair; the public key is its identity. When an unknown machine tries to connect, it gets no reply at all, so an open port reveals nothing. agentcourier status lists recent refused attempts with the key that tried. There is no automatic trust on first contact and no central server.

Pairing

agentcourier invite creates a code that contains the inviting machine’s public key and a random 128-bit secret. It works once and expires after 10 minutes.

A pairing is permanent until you remove it. Every later connection authenticates both machines again by their keys, automatically. Agents get no tools to pair machines or change trust; that stays with you.

Encryption

Every connection uses the Noise protocol pattern Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s:

Post-quantum protection: each connection also runs a fresh ML-KEM-768 key exchange (NIST FIPS 203), whose result is mixed into the session keys. Reading traffic requires breaking both X25519 and ML-KEM. This blocks “record now, decrypt later” attacks by future quantum computers. A test checks that altering the ML-KEM data breaks the connection. The identity check itself uses classical keys, as in TLS and Signal today; that only matters for an attacker who already has a quantum computer at the moment of the attack.

A recorded handshake cannot take over or disconnect a live connection: a new incoming connection only counts after the other side proves it holds the fresh session keys.

Who is who

Relays

A relay is optional and run by you. It only forwards traffic that the two machines already encrypt end to end. It holds none of their keys, so it cannot read or change messages or files, or pose as a paired machine. Pairing alone decides who can talk to whom, exactly as without a relay.

On your own machine

Masking personal data and secrets

Text is checked when it leaves your machine and again when it arrives. Masked:

Masking is pattern-based. It catches common formats, not every possible secret or deliberately disguised text.

Prompt injection

agentcourier cannot stop prompt injection completely, but it removes the easy routes:

File screening

Check Sending machine Receiving machine
Location only inside the project folder (never the whole home folder), after resolving links stored only in ~/.agentcourier/files/<machine>/
Credentials key and credential files (.ssh, .env, *.pem, id_*, .aws, …) always refused  
Secrets in text refused if the file contains tokens, keys or passwords personal data masked
Programs refused, judged by content, not name refused, judged by content, not name
Malware scan   Windows Defender (if running) or ClamAV; a detection or failed scan blocks the file
PDFs, archives, Office files, unknown binaries   accepted only after a clean scan
Text, images, HDF5, NetCDF, NumPy   accepted; also scanned if a scanner exists
Integrity   checksum must match, otherwise discarded
Name and execution   cleaned name (no paths, no reserved names; .bat, .ps1, .lnk and similar get .txt added); never executed; owner-only on Linux/macOS, marked as downloaded from the internet on Windows

agentcourier does not detect malware itself; it uses the machine’s scanner. Without one, only text and data files are accepted. Set require_scan = true to accept nothing unscanned, or files = false per machine to block files from it.

Limits, storage and logging

What agentcourier cannot do

Reporting a vulnerability

Please open a private security advisory on GitHub (Security tab → Report a vulnerability) rather than a public issue.