Skip to main content
Hexr wraps your AI agent in production-grade infrastructure automatically. When you write @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:
The trust root. Every process in the cluster gets a cryptographic identity before it can communicate with anything else.
ComponentPurpose
SPIRE serverCertificate authority. Issues X.509 and JWT SVIDs.
SPIRE agentRuns on every node. Handles workload attestation and SVID rotation.
Auto-RegistrarWatches for pods with hexr.io/* labels and creates a SPIRE registration entry per agent process.
OIDC discoveryJWKS endpoint for federated auth with AWS STS, GCP Workload Identity, and Azure AD.
Full telemetry pipeline — traces, metrics, and dashboards for every agent operation, all correlated by SPIFFE identity.
ComponentPurpose
OTel CollectorReceives OTLP traces and metrics from the SDK and Envoy proxies.
PrometheusMetrics storage, scraped from system and tenant namespaces.
JaegerDistributed tracing with cross-agent span correlation.
GrafanaPre-built dashboards for platform overview and agent-to-agent communication.
The runtime services your agents interact with transparently through the SDK.
ComponentPurpose
Hexr VaultSPIFFE-native secrets with AES-256-GCM encryption and OPA-enforced isolation.
Hexr GatewayConverts OpenAPI specs into MCP tools and injects credentials from Vault.
Credential InjectorExchanges SPIFFE JWT-SVIDs for AWS STS, GCP Workload Identity, and Azure tokens with a 3-tier credential cache.
A2A sidecarJSON-RPC 2.0 inter-agent protocol with SSE streaming and task lifecycle management.
SandboxIsolated code execution in Firecracker microVMs with a headless Chromium browser.
LLM GuardPrompt injection detection, secret scanning, and invisible text detection.
Envoy proxymTLS mesh. Loads X.509-SVIDs via SPIRE SDS and handles certificate rotation automatically.
The SDK and CLI that you interact with directly. Everything else is invisible.
ComponentPurpose
Python SDK@hexr_agent, hexr_tool(), hexr_llm(), hexr.vault, hexr.gateway, and all other modules.
CLIhexr build, hexr push, hexr deploy, hexr audit, hexr login.
The dashboard and APIs for monitoring and administering your agents.
ComponentPurpose
DashboardWeb UI for agent inventory, identity graph, compliance, traces, and team management.
Cloud APIREST API for tenant management, HCU metering, and API keys.
Identity graphReal-time visualization of all agents, services, and trust relationships.
Compliance engineSOC 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.

hexr deploy

Applies pod manifests and ConfigMaps to your cluster via kubectl apply.

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:
spiffe://trust-domain/agent/{tenant}/{agent}/{role}

mTLS ready

Envoy loads the SVID via SDS. All inbound and outbound traffic is now mutual TLS. The agent can call other services, exchange cloud credentials, and communicate with other agents.
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.

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.

pid-mapper · hostPID: true

Identity mapper. Reads /proc with host PID namespace access. Maps container PIDs to host PIDs and writes process context for SPIRE workload attestation.

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.