@hexr_agent and run hexr deploy, your single Python file becomes a fully instrumented Kubernetes workload with cryptographic identity, mutual TLS networking, authenticated cloud credentials, distributed tracing, and agent-to-agent communication — all without any configuration on your part.
This page explains how the platform is structured so you can reason about what Hexr does on your behalf.
Five-layer platform stack
Every Hexr deployment — cloud or self-hosted — consists of five layers, each building on the one below:Layer 1: Identity foundation
Layer 1: Identity foundation
The trust root. Every process in the cluster gets a cryptographic identity before it can communicate with anything else.
| Component | Purpose |
|---|---|
| SPIRE server | Certificate authority. Issues X.509 and JWT SVIDs. |
| SPIRE agent | Runs on every node. Handles workload attestation and SVID rotation. |
| Auto-Registrar | Watches for pods with hexr.io/* labels and creates a SPIRE registration entry per agent process. |
| OIDC discovery | JWKS endpoint for federated auth with AWS STS, GCP Workload Identity, and Azure AD. |
Layer 2: Observability
Layer 2: Observability
Full telemetry pipeline — traces, metrics, and dashboards for every agent operation, all correlated by SPIFFE identity.
| Component | Purpose |
|---|---|
| OTel Collector | Receives OTLP traces and metrics from the SDK and Envoy proxies. |
| Prometheus | Metrics storage, scraped from system and tenant namespaces. |
| Jaeger | Distributed tracing with cross-agent span correlation. |
| Grafana | Pre-built dashboards for platform overview and agent-to-agent communication. |
Layer 3: Platform services
Layer 3: Platform services
The runtime services your agents interact with transparently through the SDK.
| Component | Purpose |
|---|---|
| Hexr Vault | SPIFFE-native secrets with AES-256-GCM encryption and OPA-enforced isolation. |
| Hexr Gateway | Converts OpenAPI specs into MCP tools and injects credentials from Vault. |
| Credential Injector | Exchanges SPIFFE JWT-SVIDs for AWS STS, GCP Workload Identity, and Azure tokens with a 3-tier credential cache. |
| A2A sidecar | JSON-RPC 2.0 inter-agent protocol with SSE streaming and task lifecycle management. |
| Sandbox | Isolated code execution in Firecracker microVMs with a headless Chromium browser. |
| LLM Guard | Prompt injection detection, secret scanning, and invisible text detection. |
| Envoy proxy | mTLS mesh. Loads X.509-SVIDs via SPIRE SDS and handles certificate rotation automatically. |
Layer 4: Developer experience
Layer 4: Developer experience
The SDK and CLI that you interact with directly. Everything else is invisible.
| Component | Purpose |
|---|---|
| Python SDK | @hexr_agent, hexr_tool(), hexr_llm(), hexr.vault, hexr.gateway, and all other modules. |
| CLI | hexr build, hexr push, hexr deploy, hexr audit, hexr login. |
Layer 5: Management
Layer 5: Management
The dashboard and APIs for monitoring and administering your agents.
| Component | Purpose |
|---|---|
| Dashboard | Web UI for agent inventory, identity graph, compliance, traces, and team management. |
| Cloud API | REST API for tenant management, HCU metering, and API keys. |
| Identity graph | Real-time visualization of all agents, services, and trust relationships. |
| Compliance engine | SOC 2, NIST, ISO 27001, PCI-DSS, and EU AI Act mapped to OPA policies. |
How identity flows
From decorator to production-ready mTLS, Hexr establishes identity through six automatic stages:hexr build
The CLI performs AST analysis on your Python source. It discovers every
@hexr_agent, hexr_tool(), and hexr_llm() call, then generates a Dockerfile, Kubernetes manifests, and per-process context files.Auto-Registrar detects the pod
The Auto-Registrar watches for pods with
hexr.io/* labels. When your pod appears, it reads the process context ConfigMaps and creates a SPIRE registration entry for each discovered agent process role.Pod starts (4 containers)
An init container installs the SDK. Then your agent, the Envoy sidecar, the A2A sidecar, and the pid-mapper all start together.
SVID issued
The agent process calls the SPIRE Workload API. SPIRE matches the workload against its registration entry and issues an X.509-SVID with a per-process SPIFFE ID:
Hexr assigns SPIFFE identities to individual agent processes, not just pods or containers. This enables precise identity attribution for multi-agent frameworks where multiple agents share a single process tree.
Agent pod architecture
Every deployed agent runs as a Kubernetes Pod with one init container and three runtime containers, connected by shared volumes.- Containers
- Network flow
Init: install-hexr-sdk
Pulls the Hexr SDK from the private PyPI registry into a shared volume. Runs once before any runtime container starts.
agent container
Your Python code. Runs your
@hexr_agent-decorated function. Handles inbound A2A bridge calls.envoy-sidecar
mTLS proxy. Handles all inbound and outbound TLS. Loads X.509-SVIDs via SPIRE. Zero-code mesh encryption.
a2a-sidecar
Agent communication. JSON-RPC 2.0 dispatch with SSE streaming for real-time updates. Task state persisted externally.
Next steps
Per-process identity
Deep dive into how SPIFFE IDs are assigned to individual agent processes.
Credential exchange
How the 3-tier cache delivers sub-millisecond cloud credentials.