Product Specifications
Browse technical specifications and schemas
File Tree
Transport Profile Specification
Overview
The Transport Profile defines how AI agents identify themselves and communicate their Open Agent Passport (OAP) credentials across different transport mechanisms. This specification ensures consistent agent identification regardless of the underlying communication protocol.
Transport Mechanisms
HTTP/HTTPS
The primary transport mechanism for web-based agent interactions.
Headers
Agents must include the following headers in HTTP requests:
X-Agent-Passport: ap_a2d10232c6534523812423eec8a1425c
X-Agent-Signature: ed25519:abc123def456...
X-Agent-Timestamp: 1640995200
X-Agent-Nonce: nonce_123456789
Header Definitions
- X-Agent-Passport: The agent's passport ID
- X-Agent-Signature: Ed25519 signature of the request
- X-Agent-Timestamp: Unix timestamp of the request
- X-Agent-Nonce: Unique nonce for replay protection
WebSocket
For real-time agent communications.
Connection Handshake
{
"type": "agent_handshake",
"passport_id": "ap_a2d10232c6534523812423eec8a1425c",
"signature": "ed25519:abc123def456...",
"timestamp": 1640995200,
"nonce": "nonce_123456789",
"capabilities": ["finance.payment.refund", "data.export"]
}
Message Format
{
"type": "agent_message",
"passport_id": "ap_a2d10232c6534523812423eec8a1425c",
"message_id": "msg_123456789",
"payload": {
// Message content
},
"signature": "ed25519:xyz789...",
"timestamp": 1640995200
}
gRPC
For high-performance agent-to-agent communication.
Service Definition
service AgentService {
rpc Identify(AgentIdentity) returns (AgentResponse);
rpc Execute(AgentRequest) returns (AgentResponse);
rpc Verify(VerificationRequest) returns (VerificationResponse);
}
message AgentIdentity {
string passport_id = 1;
string signature = 2;
int64 timestamp = 3;
string nonce = 4;
repeated string capabilities = 5;
}
Message Queues
For asynchronous agent communication.
Message Structure
{
"headers": {
"x-agent-passport": "ap_a2d10232c6534523812423eec8a1425c",
"x-agent-signature": "ed25519:abc123def456...",
"x-agent-timestamp": "1640995200",
"x-agent-nonce": "nonce_123456789"
},
"body": {
// Message payload
}
}
Agent Identification
Passport ID Format
Agent passport IDs follow this format:
ap_[a-zA-Z0-9]{8,16}
Examples:
ap_a2d10232c6534523812423eec8a1425cap_abc123def456ap_myagent001
Signature Generation
All agent communications must be signed using Ed25519:
const crypto = require('crypto');
function signRequest(passportId, privateKey, timestamp, nonce, payload) {
const message = `${passportId}:${timestamp}:${nonce}:${JSON.stringify(payload)}`;
const signature = crypto
.createSign('ed25519')
.update(message)
.sign(privateKey);
return `ed25519:${signature.toString('hex')}`;
}
Timestamp Validation
Timestamps must be:
- Current: Within 5 minutes of current time
- Monotonic: Never decrease for the same agent
- Format: Unix timestamp in seconds
Nonce Requirements
Nonces must be:
- Unique: Never reused for the same agent
- Random: Cryptographically secure random generation
- Format:
nonce_[a-zA-Z0-9]{16,32}
Transport Security
TLS Requirements
All agent communications must use TLS 1.3 or higher:
- Minimum Version: TLS 1.3
- Cipher Suites: Only approved cipher suites
- Certificate Validation: Full certificate chain validation
- Perfect Forward Secrecy: Required for all connections
Signature Verification
Receiving systems must verify agent signatures:
function verifySignature(passportId, signature, publicKey, timestamp, nonce, payload) {
const message = `${passportId}:${timestamp}:${nonce}:${JSON.stringify(payload)}`;
const sig = signature.replace('ed25519:', '');
return crypto
.createVerify('ed25519')
.update(message)
.verify(publicKey, Buffer.from(sig, 'hex'));
}
Replay Protection
Implement replay protection using:
- Nonce Tracking: Store used nonces for 24 hours
- Timestamp Windows: Reject requests outside time window
- Sequence Numbers: Optional sequence number validation
Agent Discovery
Service Discovery
Agents can discover other agents through:
DNS SRV Records
_agent._tcp.example.com. 300 IN SRV 10 5 443 agent1.example.com.
_agent._tcp.example.com. 300 IN SRV 20 5 443 agent2.example.com.
mDNS/Bonjour
_agent._tcp.local. PTR agent1._agent._tcp.local.
agent1._agent._tcp.local. SRV 0 0 443 agent1.local.
agent1._agent._tcp.local. TXT "passport=ap_a2d10232c6534523812423eec8a1425c"
Agent Registry
Centralized agent discovery service:
{
"agents": [
{
"passport_id": "ap_a2d10232c6534523812423eec8a1425c",
"name": "Acme Support Bot",
"endpoint": "https://agent1.example.com",
"capabilities": ["finance.payment.refund", "data.export"],
"status": "active",
"last_seen": "2025-01-16T10:30:00Z"
}
]
}
Error Handling
Transport Errors
| Error Code | Description | Action |
|---|---|---|
TRANSPORT_ERROR
|
Connection failed | Retry with backoff |
SIGNATURE_INVALID
|
Invalid signature | Reject request |
TIMESTAMP_EXPIRED
|
Timestamp too old | Reject request |
NONCE_REUSED
|
Nonce already used | Reject request |
PASSPORT_INVALID
|
Invalid passport ID | Reject request |
Error Response Format
{
"error": {
"code": "SIGNATURE_INVALID",
"message": "Invalid agent signature",
"details": {
"passport_id": "ap_a2d10232c6534523812423eec8a1425c",
"expected": "ed25519:abc123...",
"received": "ed25519:xyz789..."
}
},
"timestamp": "2025-01-16T10:30:00Z"
}
Implementation Guidelines
Client Libraries
Transport profile implementations should provide:
- Automatic Signing: Sign all outgoing requests
- Signature Verification: Verify incoming requests
- Nonce Management: Generate and track nonces
- Error Handling: Handle transport errors gracefully
- Retry Logic: Implement exponential backoff
Server Implementation
Receiving systems should:
- Validate Signatures: Verify all agent signatures
- Check Timestamps: Validate timestamp freshness
- Track Nonces: Prevent replay attacks
- Rate Limiting: Implement per-agent rate limiting
- Logging: Log all agent interactions
Testing
Test Vectors
Standard test vectors for signature verification:
{
"passport_id": "ap_test123",
"timestamp": 1640995200,
"nonce": "nonce_test123",
"payload": {"action": "test"},
"private_key": "test_private_key",
"expected_signature": "ed25519:test_signature"
}
Conformance Testing
Use the OAP conformance test suite to verify transport profile implementation:
npm run test:transport-profile
Best Practices
Security
- Key Management: Store private keys securely
- Key Rotation: Implement regular key rotation
- Audit Logging: Log all agent communications
- Monitoring: Monitor for suspicious activity
Performance
- Connection Pooling: Reuse connections when possible
- Async Processing: Process requests asynchronously
- Caching: Cache passport data appropriately
- Load Balancing: Distribute agent load
Reliability
- Circuit Breakers: Implement circuit breaker patterns
- Health Checks: Regular health check endpoints
- Graceful Degradation: Handle partial failures
- Monitoring: Comprehensive monitoring and alerting