@agenttrustvault/core
v0.1.0
Published
ATV — Agent Trust Vault: The Trust Layer for AI. Secure collaboration for humans, AI agents, and automated workflows without exposing secrets.
Maintainers
Readme
ATV — Agent Trust Vault
The Trust Intelligence Platform for AI
ATV transforms AI collaboration from a security challenge into a trust-driven partnership. Instead of giving agents access to sensitive information, ATV intelligently evaluates trust, issues time-bound capabilities, and audits every interaction.
ATV allows humans, AI agents, and automated workflows to securely collaborate using protected information without exposing secrets.
No secrets. No copy/paste. Complete governance. Explainable trust.
Why ATV?
Most AI systems force organizations to choose between:
- Giving AI access to sensitive information, or
- Preventing AI from performing valuable work
ATV introduces a third option:
✓ Trust-driven access - Decisions based on behavior, not just rules
✓ Explainable decisions - See exactly why access was approved or denied
✓ Ephemeral execution - Credentials exist only during execution, then destroyed
✓ Zero trust architecture - Verify everything, trust nothing by default
✓ Complete audit trail - Every decision, signal, and action is logged
✓ Platform agnostic - Works with Buzz, Claude Desktop, VS Code, MCP, CLI, and more
Architecture
Human/Agent
↓
Trust Intelligence Platform
├─ Runtime Attestation (verify execution environment)
├─ Adaptive Trust Engine (behavior-based scoring)
├─ Trust Decision Service (explainable decisions)
├─ Policy Simulation (what-if testing)
├─ Trust Timeline (visual lifecycle tracking)
└─ Platform Adapter (decouple from Buzz)
↓
Capability Token v2
├─ Cryptographic signing
├─ Runtime attestation
└─ Trust score snapshot
↓
Execution Gateway
├─ Secret injection
└─ Context cleanup
↓
Audit & Compliance
├─ Trust timeline
├─ Trust replay
└─ Compliance reportingThe ATV Trust Intelligence Platform orchestrates secure collaboration through:
- Trust Intelligence - Adaptive trust scoring based on observed behavior
- Explainable Decisions - Clear reasoning for all approvals and denials
- Runtime Attestation - Verify SDK, capability, principal, and execution gateway
- Capability Token v2 - Ed25519-signed tokens with embedded trust context
- Adaptive Trust Engine - Learns from successful operations to improve future decisions
- Platform Adapter - Abstract interface supporting multiple platforms
- Trust Timeline - Visual, interactive lifecycle of artifacts and decisions
- Policy Simulation - Test what-if scenarios before policies go live
- Trust Replay - Audit historical decisions against current policies
Installation
npm install @agenttrustvault/coreSDK packages:
npm install @agenttrustvault/sdk
npm install @agenttrustvault/buzzQuick Start
Protect Information
import { AgentTrustVault } from '@agenttrustvault/core';
const atv = new AgentTrustVault();
const protected = await atv.protect({
data: '{"api_key": "sk_live_..."}',
classification: 'secret',
policy: {
allowedPrincipals: ['agent-1', 'user-123'],
requiresApproval: false
}
});Authorize Work
const capability = await atv.authorize({
principal: 'agent-1',
resource: protected.id,
action: 'execute',
duration: '1h'
});Execute with Protection
const result = await atv.execute({
capability: capability.token,
context: { agent: 'agent-1' }
});
// The secret is injected into the execution context
// and destroyed immediately after useCore Features
Automatic Sensitive Data Detection
Automatically detects and protects:
- PII: SSN, phone numbers, emails, dates of birth
- Financial Data: Credit card numbers, account numbers, routing numbers, IBANs
- Medical Data: Patient IDs, diagnosis, treatment information
- Cryptographic Credentials: Passwords, API keys, tokens, private keys
- Proprietary Information: Customer data, contracts, confidential markings
- Database Content: SQL queries, database keywords
Client-Side Encryption
- AES-256-GCM - Military-grade encryption for all protected content
- Per-Artifact Keys - Each protected item can have its own encryption key
- Secure Key Management - Automatic key generation, storage, and rotation
Policy-Based Access Control
- Room-Aware Permissions - Collaboration context-aware access rules
- Identity-Based Control - Three access levels: Room Members, Specific People, Require Approval
- Agent Permissions - Fine-grained control over AI agent access (Allow, Metadata Only, Denied)
Audit Trail
- Complete Logging - Every access attempt, approval, and modification is recorded
- Compliance Ready - Full audit trail for regulatory requirements
- Trust Timeline - Historical view of all trust events
Project Structure
src/
├── types/ # TypeScript type definitions
├── services/ # Core services
│ ├── EncryptionService.ts
│ ├── SensitiveDetectionService.ts
│ ├── PolicyEngine.ts
│ ├── ArtifactService.ts
│ └── AuditService.ts
├── db/ # Database layer
├── api/ # REST API
└── buzz-capabilities/ # Buzz integrationConfiguration
Set environment variables:
PORT- Server port (default: 3000)DB_PATH- SQLite database path (default: :memory:)
Development
Build
npm run buildTest
npm test
npm run test:watch
npm run test:coverageRun
npm run dev # Development mode
npm run build && npm start # ProductionAPI Endpoints
Artifact Management
POST /api/artifacts/create- Protect information using ATVPOST /api/artifacts/create-with-detection- Protect with automatic detectionGET /api/artifacts/:id- Get protected item metadataPOST /api/artifacts/:id/access- Request access with authorizationPOST /api/artifacts/:id/revoke- Revoke access permissionsPOST /api/artifacts/:id/update-policy- Update trust policyGET /api/artifacts/:id/audit- Get trust timeline
Room Management
GET /api/rooms/:roomId/artifacts- List protected items in collaboration spacePOST /api/rooms/:roomId/policy- Set room trust policy
Health
GET /api/health- Health check
Data Models
Protected Item
{
id: string
name: string
ownerId: string
roomId: string
ciphertext: Buffer // Encrypted content
metadata: ItemMetadata
accessLevel: AccessLevel
allowedUserIds?: string[]
agentPermissions?: Record<string, AgentPermission>
expiresAt?: Date
isRevoked: boolean
createdAt: Date
updatedAt: Date
}Access Levels
ROOM_MEMBERS- All collaboration members can accessSPECIFIC_PEOPLE- Only specified identities can accessREQUIRE_APPROVAL- Requires explicit approval for each access
Agent Permissions
ALLOW- Full access to protected contentMETADATA_ONLY- Access to metadata only, no decryptionDENIED- No access
Security Considerations
- Never Store Plaintext - Only encrypted content is persisted
- Ephemeral Execution - Protected information exists only in memory during use, then is destroyed
- Per-Item Encryption - Each protected item can have its own encryption key
- Automatic Expiration - Protected items can be configured to expire automatically
- Revocation - Access can be revoked immediately at any time
- Complete Audit Trail - All access is logged for compliance and investigation
Use Cases
Secure AI Agent Workflows
Agents perform valuable work with access to sensitive information through ATV, without ever holding credentials or seeing plaintext secrets.
Cross-Organization Collaboration
Share protected information with trusted partners, agents, and automated workflows with fine-grained access control and complete audit trails.
Compliance and Governance
Maintain complete control over sensitive data in AI-powered workflows while meeting regulatory requirements.
Automated Secret Injection
Credentials, API keys, and confidential data are automatically injected into execution contexts where needed and destroyed immediately after use.
Future Enhancements
- Hardware-backed key storage (TPM, HSM, Secure Enclave)
- Data residency controls (EU/US separation)
- Advanced ML-based sensitivity detection
- Marketplace integration
- External sharing workflows
- Fine-grained agent capability negotiation
Contributing
Contributions are welcome. Please see CONTRIBUTING.md for guidelines.
License
ISC
