
Spellguard
Secure, auditable agent-to-agent communication framework. Agents communicate
through a Verifier that logs all interactions for auditability while
maintaining forward secrecy.
Supports pluggable backends for logging and archival โ transparency logs for
tamper-evident commitments, S3 for encrypted message storage. Message content
is encrypted with a server public key before archiving, enabling on-demand
decryption for post-mortem incident analysis.
Why Spellguard?
As AI agents become more autonomous and interact with each other, we need:
- Auditability โ A verifiable record of what agents communicated.
- Security โ Protection against compromised agents and MITM attacks.
- Simplicity โ Developers shouldn't need to understand cryptography to
build secure agents.
- Interoperability โ Communicate with agents that don't use Spellguard.
How It Works
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Agent A โ โ @spellguard/client โ โ Verifier โ โ @spellguard/client โ โ Agent B โ
โ โ โ (A's middleware) โ โ (proxy) โ โ (B's middleware) โ โ โ
โโโโโโโโฌโโโโโโโ โโโโโโโโโโโโฌโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโโโโโฌโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ
โ โ โ โ โ
โ generateText(...) โ โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโ>โ โ โ โ
โ โ 1. Discover Agent B โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ>โ โ โ
โ โ 2. Establish channel โ โ โ
โ โ<โโโโโโโโโโโโโโโโโโโโโ>โ<โโโโโโโโโโโโโโโโโโโโโ>โ โ
โ โ 3. Send message โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโ->โ โ โ
โ โ โ 4. Policy checks โ โ
โ โ โ 5. Log commitment โ โ
โ โ โ 6. Archive message โ โ
โ โ โ 7. Forward to Agent Bโ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโ->โโโโโโโโโโโโโโโโโโโโโโ->โ
โ โ โ โ<โโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ<โโโโโโโโโโโโโโโโโโโโโโโ response โ
โ โ<โโโโโโโโโโโโโโโโโโโโโโโ result โ โ
Key insight: Agents never communicate directly. All messages flow through the Verifier, which handles discovery, verification, and logging automatically.
Deployment
โ๏ธ Managed Service (Recommended)
The fastest way to deploy Spellguard at your organization. Full dashboard, enterprise support, and zero infrastructure management.
Request a demo at spellguard.ai โ
๐ ๏ธ Self-Hosted
This repository contains the open source implementation โ ideal for development, testing, or custom integrations. Run everything locally with pnpm run dev, configure policies via packages/verifier/bindings.json, and build a production image from packages/verifier/Dockerfile. See Development below to get started.
Packages
TypeScript