Latin: fides = trust, faith, confidence
Decentralized trust and authentication protocol for autonomous AI agents
As AI agents become increasingly autonomous, they face critical challenges in secure communication:
- No verifiable identity β Agents cannot prove who they are without centralized authorities
- No trust mechanism β No standard way to establish trust relationships between agents
- Request tampering β HTTP requests lack cryptographic integrity protection
- Reputation opacity β No way to discover an agent's trustworthiness through network effects
FIDES solves these problems with a decentralized, cryptographically secure trust protocol built specifically for AI agents.
- β‘ Ed25519 Identity β DID-based identities with secure elliptic curve cryptography
- π RFC 9421 HTTP Message Signatures β Standardized request signing and verification
- πΈοΈ Decentralized Trust Graph β Distributed trust attestations with BFS traversal
- π Transitive Trust with Decay β Reputation propagates through the network (0.85 decay/hop)
- π Zero-dependency Crypto β Pure JavaScript cryptography via @noble/ed25519
- π TypeScript-first β End-to-end type safety for robust agent development
npm install @fides/sdkimport { Fides, TrustLevel } from '@fides/sdk'
// Initialize FIDES client
const fides = new Fides({
discoveryUrl: 'http://localhost:3100',
trustUrl: 'http://localhost:3200'
})
// Create agent identity
const { did } = await fides.createIdentity({
name: 'My AI Agent'
})
// Sign a request
const signed = await fides.signRequest({
method: 'POST',
url: 'https://agent-b.example.com/api/task',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ task: 'collaborate' })
})
// Verify incoming request
const result = await fides.verifyRequest(incomingRequest)
if (result.valid) {
// Request is authentic and unmodified
}
// Trust another agent
await fides.trust('did:fides:7nK9fV3h...', TrustLevel.HIGH)
// Check reputation
const score = await fides.getReputation('did:fides:7nK9fV3h...')βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agent β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β @fides/sdk β β
β β β β
β β β’ Identity (Ed25519 keypairs, DIDs) β β
β β β’ Signing (RFC 9421 HTTP signatures) β β
β β β’ Trust (Attestations, verification) β β
β β β’ Discovery (Identity resolution) β β
β ββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββ β
βββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Discovery β β Trust Graph β
β Service β β Service β
β β β β
β β’ Register DIDs β β β’ Attestations β
β β’ Resolve keys β β β’ Reputation β
β β’ .well-known β β β’ BFS graph β
ββββββββββ¬ββββββββββ ββββββββββ¬βββββββββ
β β
ββββββββββββ¬βββββββββββ
βΌ
ββββββββββββββββ
β PostgreSQL β
ββββββββββββββββ
| Function | Description |
|---|---|
generateKeyPair() |
Generate Ed25519 keypair for agent identity |
generateDID(publicKey) |
Create DID from public key (did:fides:base58) |
signRequest(request, privateKey, options) |
Sign HTTP request per RFC 9421 |
verifyRequest(request, publicKey) |
Verify HTTP request signature |
createAttestation(issuerDid, subjectDid, level, privateKey) |
Create signed trust attestation |
verifyAttestation(attestation, publicKey) |
Verify attestation signature |
| Method | Description |
|---|---|
createIdentity(metadata?) |
Create new identity and register with discovery |
signRequest(request) |
Sign request with current identity |
verifyRequest(request) |
Verify request and resolve signer identity |
trust(subjectDid, level) |
Create and submit trust attestation |
getReputation(did) |
Get aggregated reputation score |
resolve(didOrDomain) |
Resolve DID to identity information |
| Class | Description |
|---|---|
MemoryKeyStore |
In-memory key storage (development only) |
FileKeyStore |
AES-256-GCM encrypted file storage |
| Level | Value | Description |
|---|---|---|
NONE |
0 | No trust established |
LOW |
25 | Minimal trust, limited interaction |
MEDIUM |
50 | Moderate trust, standard collaboration |
HIGH |
75 | Strong trust, sensitive operations |
ABSOLUTE |
100 | Complete trust, full delegation |
Note: Trust propagates through the network with 0.85 exponential decay per hop (max 6 hops)
FIDES implements a complete decentralized trust protocol with:
- Identity Layer: Ed25519 keypairs +
did:fides:<base58-pubkey>identifiers - Authentication Layer: RFC 9421 HTTP Message Signatures with ed25519 algorithm
- Trust Layer: Signed attestations stored in distributed trust graph
- Reputation Layer: BFS graph traversal with exponential decay scoring
Full specification: docs/protocol-spec.md
fides/
βββ packages/
β βββ sdk/ # Core protocol implementation
β β βββ identity/ # Keypairs, DIDs, key storage
β β βββ signing/ # RFC 9421 HTTP signatures
β β βββ trust/ # Attestations, verification
β β βββ discovery/ # Identity resolution
β βββ cli/ # Command-line interface
β βββ shared/ # Shared types and constants
βββ services/
β βββ discovery/ # Identity registration service
β βββ trust/ # Trust graph service
βββ docs/
β βββ architecture.md # System design
β βββ protocol-spec.md # Protocol details
β βββ getting-started.md # Tutorial
βββ scripts/
βββ two-agents-demo.ts # Demo script
- Node.js >= 20 (recommend v22)
- pnpm (package manager)
- Docker (for PostgreSQL)
# Clone repository
git clone https://github.com/yourusername/fides.git
cd fides
# Install dependencies
pnpm install
# Start PostgreSQL
docker compose up -d
# Build all packages
pnpm build
# Start development servers
pnpm dev| Command | Description |
|---|---|
pnpm build |
Build all packages |
pnpm test |
Run test suite |
pnpm lint |
Lint codebase |
pnpm typecheck |
Type-check TypeScript |
pnpm dev |
Start services in watch mode |
pnpm clean |
Clean build artifacts |
# Build packages first
pnpm build
# Run two-agent demo
npx tsx scripts/two-agents-demo.tsFIDES uses industry-standard cryptography and security practices:
- Ed25519 signatures β Fast, secure elliptic curve cryptography via @noble/ed25519
- Timing-safe comparisons β Constant-time signature verification prevents timing attacks
- AES-256-GCM encryption β Password-protected private key storage
- PBKDF2 key derivation β 600k iterations with SHA-256
- Replay protection β Timestamp-based signature expiration (300s window)
Security disclosure: Report vulnerabilities to SECURITY.md
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch β
git checkout -b feature/amazing-feature - Make your changes β Follow TypeScript best practices
- Add tests β Ensure
pnpm testpasses - Commit changes β
git commit -m 'Add amazing feature' - Push to branch β
git push origin feature/amazing-feature - Open a Pull Request
Guidelines:
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Follow existing code style
- Ensure CI passes
MIT License - see LICENSE for details
Built with cryptographic trust π
Documentation β’ Architecture β’ Getting Started