---
title: "Under the hood of a deploy-agent API that works across any runtime environment"
description: "xpander.ai unified agent deployment for its managed cloud and customer-hosted Kubernetes clusters behind a single deploy-agent API that routes by tenant type."
url: "https://swe.quest/articles/under-the-hood-of-a-deploy-agent-api-that-works-across-any-runtime-environment-060a097c2022a1f1"
canonical: "https://neon.com/blog/deploy-agent-api-xpander"
source: "Neon"
published: "2025-10-27"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["deployment","kubernetes","ai-agents","multi-tenancy","api-design"]
---

# Under the hood of a deploy-agent API that works across any runtime environment

A post on [Neon](https://swe.quest/sources/neon.md), published 2025-10-27, 5 min read, Case study. Original: [https://neon.com/blog/deploy-agent-api-xpander](https://neon.com/blog/deploy-agent-api-xpander)

## Summary

xpander.ai unified agent deployment for its managed cloud and customer-hosted Kubernetes clusters behind a single deploy-agent API that routes by tenant type. Cloud tenants get presigned S3 uploads streamed into ECR via skopeo with no Docker daemon or disk writes. Self-deployed tenants upload tarballs that are decompressed and pushed with skopeo into a local registry, with TLS verification disabled for air-gapped setups. Both paths converge on the same Kubernetes Job launch using per-request base64 kubeconfig contexts and org-scoped secrets, and a threaded log streamer bridges the blocking Kubernetes Python client to FastAPI over SSE.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- Kubernetes Jobs ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- container registries
- Python asyncio ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

xpander.ai, skopeo, Amazon ECR, Amazon S3, FastAPI, Server-Sent Events, Helm

## Related posts

- [How Hugging Face Scaled Secrets Management for AI Infrastructure](https://swe.quest/articles/how-hugging-face-scaled-secrets-management-for-ai-infrastructure-9737f7d559f7a125.md): Hugging Face · 2025-03-31 · Medium · 5 min read · Security, Kubernetes, Identity & auth, Infrastructure as code, CI/CD
  Hugging Face moved secrets management to Infisical as its infrastructure grew from AWS-only to multi-cloud (Azure, GCP), choosing it over HashiCorp Vault for developer workflows and multi-cloud abstraction.
- [Build and Distribute AI Agents and Workflows with cagent](https://swe.quest/articles/build-and-distribute-ai-agents-and-workflows-with-cagent-f30c9f0bbad13e54.md): Docker · 2025-09-18 · Medium · 7 min read · AI agents, Developer tools, Containers, Open source
  cagent is Docker's open-source command-line runtime that defines AI agents (model, instructions, persona and MCP tools) in a single YAML file and distributes them through OCI registries such as Docker Hub.
- [Agentic infrastructure with clickhousectl: a distributed ClickStack across three continents](https://swe.quest/articles/agentic-infrastructure-with-clickhousectl-a-distributed-clickstack-across-three-d01a61602ef37a05.md): ClickHouse · 2026-07-22 · Medium · 7 min read · Observability, AI agents, Analytics & OLAP, Developer tools, Cloud platforms
  A coding agent using the clickhousectl CLI stood up three ClickHouse Cloud services in us-east-1, eu-west-1 and ap-northeast-1, each ingesting OpenTelemetry logs, traces and metrics locally, with a federated global view in Europe for the ClickStack UI.
- [Breaking Free From AI Vendor Lock-in: Integrating GitHub Models with Docker cagent](https://swe.quest/articles/breaking-free-from-ai-vendor-lock-in-integrating-github-models-with-docker-8fc971be1201fa24.md): Docker · 2025-12-11 · Medium · 7 min read · AI agents, LLMs, Containers
  Docker cagent, an open-source multi-agent runtime driven by declarative YAML, can use GitHub Models as a custom OpenAI-compatible provider.
- [Kafka App? There’s a Skill for That](https://swe.quest/articles/kafka-app-there-s-a-skill-for-that-db613ac72530c591.md): Etsy Code as Craft · 2026-07-31 · Medium · 6 min read · AI agents, AI for coding, Stream processing, Developer productivity, Queues & messaging
  Etsy's streaming platform team built Agent Skills that let coding agents like Claude scaffold, validate, run locally and open PRs for Kafka streaming apps that produce ML features and embeddings.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
