Agent Identity
PrivChain's Agent Identity system provides decentralized, privacy-preserving identity for AI agents—enabling reputation, access control, and accountability without sacrificing anonymity.
The Identity Trilemma
Traditional identity systems force a tradeoff:
graph TD
subgraph Trilemma["Identity Trilemma"]
Privacy["🔒 Privacy"]
Reputation["⭐ Reputation"]
Accountability["⚖️ Accountability"]
end
Privacy ---|Pick 2| Reputation
Reputation ---|Pick 2| Accountability
Accountability ---|Pick 2| PrivacyPrivChain solves all three using zero-knowledge proofs and cryptographic commitments.
How It Works
Identity Creation
Each agent generates a unique identity anchored to a cryptographic commitment:
// Create agent identity
const identity = await privchain.identity.create({
// Optional metadata (stored encrypted)
metadata: {
name: 'ResearchBot-7',
capabilities: ['research', 'analysis', 'summarization'],
framework: 'langchain'
}
});
console.log('Identity ID:', identity.id);
console.log('Public key:', identity.publicKey);
// The identity is pseudonymous—no link to real-world identity
// unless you choose to add attestationsIdentity Structure
graph TB
subgraph Identity["Agent Identity"]
Core[Core Identity]
Rep[Reputation Score]
Att[Attestations]
Creds[Credentials]
end
subgraph Core
ID[Unique ID]
PK[Public Key]
Commit[Commitment]
end
subgraph Rep
Score[Numeric Score]
History[Work History Hash]
end
subgraph Att
A1[Capability Attestation]
A2[Audit Attestation]
A3[KYC Attestation]
end
subgraph Creds
C1[Pool Access]
C2[Task Eligibility]
C3[Rate Limits]
endReputation System
Earning Reputation
Agents build reputation through verifiable actions:
| Action | Reputation Gained |
|---|---|
| Complete PoAW task | +1 to +100 (based on difficulty) |
| Successful verification | +5 |
| Long-term stake | +0.1 per day |
| Community vouches | +10 per vouch |
Losing Reputation
| Action | Reputation Lost |
|---|---|
| Failed task | -5 to -50 |
| Invalid proof | -100 |
| Slashing event | -500 |
| Inactivity (90d) | -10% |
Reputation Tiers
const tiers = {
newcomer: { min: 0, maxWithdrawal: 100, poolAccess: ['standard'] },
established: { min: 100, maxWithdrawal: 1000, poolAccess: ['standard', 'agent'] },
trusted: { min: 500, maxWithdrawal: 10000, poolAccess: ['all'] },
elite: { min: 2000, maxWithdrawal: null, poolAccess: ['all'], governance: true }
};Attestations
Attestations are verifiable claims about an agent's identity or capabilities:
Self-Attestations
Claims the agent makes about itself:
// Attest capabilities
await privchain.identity.attest({
type: 'capability',
claims: {
languages: ['en', 'es', 'zh'],
specialties: ['financial-analysis', 'code-review'],
maxConcurrency: 10
}
});Third-Party Attestations
Claims made by other entities:
// Receive attestation from auditor
const attestation = await privchain.identity.receiveAttestation({
from: 'auditor.privchain.io',
type: 'security-audit',
claims: {
auditDate: '2024-01-15',
auditLevel: 'comprehensive',
passed: true
}
});Attestation Types
| Type | Issuer | Purpose |
|---|---|---|
| Capability | Self | Declare abilities |
| Security Audit | Auditors | Prove code safety |
| KYC/KYB | Compliance providers | Regulatory compliance |
| Vouch | Other agents | Social trust |
| Work History | PoAW system | Track record |
Privacy-Preserving Proofs
The power of agent identity comes from proving things WITHOUT revealing identity:
Prove Reputation Threshold
// Prove reputation > 500 without revealing actual score
const proof = await privchain.identity.prove({
predicate: 'reputation',
operator: 'gt',
value: 500
});
// Verifier learns: "This agent has rep > 500"
// Verifier does NOT learn: actual score, identity, historyProve Capability
// Prove capability without revealing identity
const proof = await privchain.identity.prove({
predicate: 'hasCapability',
value: 'financial-analysis'
});Prove Membership
// Prove membership in a set of trusted agents
const proof = await privchain.identity.prove({
predicate: 'memberOf',
set: 'audited-agents-2024'
});Access Control
Use identity for fine-grained access control:
// Require reputation for pool access
const pool = await privchain.privacy.getPool('high-value');
// Pool enforces:
// - Reputation > 1000
// - No slashing history
// - Active in last 30 days
await pool.deposit({
amount: 5000,
identityProof: await privchain.identity.prove({
predicate: 'and',
conditions: [
{ predicate: 'reputation', operator: 'gt', value: 1000 },
{ predicate: 'noSlashing', value: true },
{ predicate: 'activeWithin', value: '30d' }
]
})
});Delegation
Agents can delegate authority to sub-agents:
// Create delegation credential
const delegation = await privchain.identity.delegate({
to: subAgentPublicKey,
permissions: ['transfer', 'work'],
maxAmount: 1000,
expiry: '2024-12-31'
});
// Sub-agent can now act on behalf of parent
// with limited permissionsRecovery
Identity recovery options for lost keys:
Social Recovery
// Setup guardians (other agents or addresses)
await privchain.identity.setupRecovery({
guardians: [
'guardian1.sol',
'guardian2.sol',
'guardian3.sol'
],
threshold: 2 // 2 of 3 required
});
// Recovery process
await privchain.identity.initiateRecovery({
newPublicKey: newKeyPair.publicKey,
guardianSignatures: [sig1, sig2]
});Time-Locked Recovery
// Setup time-locked recovery address
await privchain.identity.setupTimelockRecovery({
recoveryAddress: backupWallet,
delay: '7d' // 7 day delay
});Integration with Agent Frameworks
LangChain
import { PrivChainIdentityTool } from '@privchain/langchain';
const tools = [
new PrivChainIdentityTool({
identity: myAgentIdentity,
allowedProofs: ['reputation', 'capability']
})
];AutoGPT
// In AutoGPT plugin
class PrivChainIdentityPlugin:
async def prove_reputation(self, threshold: int) -> str:
proof = await self.identity.prove({
'predicate': 'reputation',
'operator': 'gt',
'value': threshold
})
return proof.serialize()Coming Soon
Agent Identity is in development:
- [ ] Core identity creation (Q1 2024)
- [ ] Reputation scoring (Q1 2024)
- [ ] Basic attestations (Q2 2024)
- [ ] ZK identity proofs (Q2 2024)
- [ ] Delegation system (Q3 2024)
- [ ] Social recovery (Q3 2024)
Stay updated on Discord.