Architecture
Every Hexr agent pod runs as a bare Kubernetes Pod (not a Deployment) with these containers:- Agent Pod
- Cluster Services
| Container | Role |
|---|---|
| init: install-hexr-sdk | Init container — installs the Hexr SDK into the agent environment |
| Agent Container | Your code — the agent you wrote and deployed |
| Envoy Proxy Sidecar | mTLS mesh — all outbound traffic encrypted with SPIFFE SVIDs |
| A2A Sidecar | Agent-to-agent communication (JSON-RPC 2.0 over mTLS) |
| PID Mapper | Maps host PIDs to SPIFFE identities for per-process attestation |
| Service | Purpose |
|---|---|
| SPIRE Server + Agent | Certificate authority + per-node workload attestation |
| Auto-Registrar | Watches for hexr pods, creates SPIRE registration entries |
| Credential Injector | Exchanges SPIFFE SVIDs for short-lived cloud credentials |
| Hexr Vault | SPIFFE-native secret storage (AES-256-GCM) |
| Hexr Gateway | Tool proxy — routes hexr_tool() calls to external APIs |
| Sandbox Engine | Firecracker microVM code execution |
| LLM Guard | Prompt/response scanning (injection, PII, secrets) |
| Valkey (Redis) | 3-node HA — credential cache + A2A task state |
| OTel Collector | Telemetry aggregation (traces, metrics, logs) |
| OPA | Policy enforcement sidecar (per pod) |
Agent Container → Envoy Proxy → Credential Injector / Gateway / Vault
Agent Container → A2A Sidecar
PID Mapper → SPIRE Agent/Server
Auto-Registrar → SPIRE Server
All services → OTel Collector → Grafana
Pod Containers
| Container | Purpose | Port |
|---|---|---|
| Agent Container | Your Python code + Hexr SDK | — |
| Envoy Proxy | mTLS termination, traffic routing, OPA sidecall | 15001 |
| A2A Sidecar | Agent-to-agent protocol handler | 8090 |
| PID Mapper | Per-process identity → SPIRE registration | — |
Cluster Services
| Service | Purpose | Docs |
|---|---|---|
| SPIRE | SPIFFE identity issuance (X.509 SVIDs) | → |
| Auto-Registrar | Watches pods, creates SPIRE registration entries | → |
| Credential Injector | SPIFFE → cloud credentials (STS exchange) | → |
| Hexr Vault | Encrypted secret storage (AES-256-GCM) | → |
| Hexr Gateway | Tool registry + credential-injecting proxy | → |
| Sandbox Engine | Firecracker-isolated code execution | → |
| LLM Guard | Prompt/response security scanning | → |
| Valkey | In-cluster cache (L2 credentials, A2A tasks) | → |
| OTel Collector | Telemetry pipeline (traces, metrics, logs) | → |