Agent Telemetry Protocol
Technical specification for the Arden telemetry event format.Protocol Overview
Arden uses a minimal, language-agnostic JSON protocol for logging AI agent telemetry events. It follows syslog semantics with no server-side deduplication.Event Schema
Required Fields
| Field | Type | Format | Description |
|---|---|---|---|
agent | string | ^(?:[aAsS]-)?[0-9a-fA-F]{1,8}$ | Agent identifier (case-insensitive hex) |
bid | integer | Micro-cents | Usage cost (6 decimal places implicit) |
time | integer | Epoch milliseconds UTC | Event timestamp |
data | object/string | ≤1KB | Metadata payload or base64 string |
Optional Fields
| Field | Type | Format | Description |
|---|---|---|---|
user | string | ULID (26 chars) | User identifier (auto-filled from token) |
mult | integer | - | Reserved multiplier for future pricing |
Server-Generated Fields
| Field | Type | Description |
|---|---|---|
event_id | string | UUID-7 assigned by server |
Agent ID Format
Agent IDs support optional prefixes:A-ora-= Real agentS-ors-= Simulated agent- No prefix = Bare hex string accepted
A-1234abcd(real agent)s-5678ef90(simulated agent)deadbeef(bare hex)
Data Payload
Thedata field accepts two formats:
1. Object Format (Recommended)
- Flat key-value pairs only
- Total JSON size ≤ 1KB
- Values must be strings or integers
2. Base64 Format
- Base64-encoded string
- Decoded size ≤ 1KB
- For arbitrary binary data
Complete Event Example
Validation Rules
Agent Validation
- Must exist in the system database
- Case-insensitive matching
- Hex characters only (0-9, A-F, a-f)
- Length: 1-8 characters (excluding prefix)
User Validation
- Must be valid ULID format (26 characters)
- Auto-filled from Bearer token if missing
- Required if no valid token provided
Time Validation
- Must be valid epoch milliseconds
- UTC timezone assumed
- Future timestamps accepted
Bid Validation
- Non-negative integer
- Represents micro-cents (1000 = $0.01)
- Default: 0 if not specified
Data Validation
- Total size limit: 1KB
- Object format: flat key-value pairs only
- String format: valid base64 encoding
Error Responses
Validation Errors
Common Error Codes
unknown_agent- Agent not registeredinvalid_user- User ULID invalid/missingmissing_required_field- Required field absentbad_data_size- Data exceeds 1KB limitvalidation_error- Schema validation failed
Batch Processing
Send up to 100 events in a single request:- Maximum 100 events per request
- Each event validated independently
- Partial success returns 207 status
- Event IDs returned in order (accepted events only)
Security Requirements
- Transport: HTTPS required (TLS 1.3)
- Authentication: Optional Bearer token
- Validation: Server-side schema validation
- Rate limiting: Applied per IP/token
Protocol Versioning
- Current version: v1
- Endpoint:
/api/events - Breaking changes will increment version
- Backward compatibility maintained when possible
Implementation Notes
Timestamps
Always use current timestamp when sending events:Error Handling
Always check response status and handle errors:Deduplication
The protocol intentionally does not perform deduplication. Each event is treated as unique, even if identical to previous events.Testing
Use the CLI to validate event format:Migration from Legacy Formats
If migrating from other telemetry systems, ensure:- Agent IDs match the hex format requirement
- Timestamps are in epoch milliseconds
- Data payloads are flattened to key-value pairs
- File sizes are under 1KB per event