Skip to main content

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

Optional Fields

Server-Generated Fields

Agent ID Format

Agent IDs support optional prefixes:
  • A- or a- = Real agent
  • S- or s- = Simulated agent
  • No prefix = Bare hex string accepted
Examples:
  • A-1234abcd (real agent)
  • s-5678ef90 (simulated agent)
  • deadbeef (bare hex)

Data Payload

The data field accepts two formats:
Constraints:
  • Flat key-value pairs only
  • Total JSON size ≤ 1KB
  • Values must be strings or integers

2. Base64 Format

Constraints:
  • 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 registered
  • invalid_user - User ULID invalid/missing
  • missing_required_field - Required field absent
  • bad_data_size - Data exceeds 1KB limit
  • validation_error - Schema validation failed

Batch Processing

Send up to 100 events in a single request:
Batch Rules:
  • 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