{"slug": "infrastructure-required-to-deploy-ai-agents-in-the-enterprise", "title": "Infrastructure Required to Deploy AI Agents in the Enterprise", "summary": "A developer published a seven-point infrastructure checklist for running AI agents in production, packaged as a YAML manifest and a Python preflight script that fails CI when an agent lacks required controls. The manifest covers per-agent identity with short-lived credentials, a tool gateway with scoped permissions, a swappable model gateway, an egress allowlist, checkpointed state, per-run and per-day spending caps, and OpenTelemetry tracing. The preflight script, which needs only PyYAML, prints one FAIL line per missing requirement and exits with code 1 so any CI system can block the merge.", "body_md": "Most agent demos run on a laptop with one API key and a lucky prompt. Production is different. An enterprise agent needs an identity, a controlled path to its tools, a model it can swap, a network boundary, saved state and a spending cap.\n\nTogether these form the AI agent infrastructure requirements that decide whether a release survives its first week.\n\nThis post turns those seven requirements into a short YAML manifest and a Python preflight script. You can run the script in CI and block any agent that misses one. The code is small, but each rule maps to a failure that platform teams really hit.\n\nEvery agent that reaches production needs the same seven things, whatever framework it uses. These [AI agent infrastructure requirements](https://www.xccelera.ai/blogs/agentic-ai-architecture) are boring on purpose. Each one answers a question that your security and operations teams will ask before launch.\n\nNotice that none of these items mention prompts or model quality. The infrastructure around the agent decides whether it is safe to run, and a manifest can describe all of it.\n\n| **Quick check:** Which requirement stops an agent from reaching a host nobody approved?the egress allowlist. | \n\nA manifest turns your AI agent infrastructure requirements into something a machine can read. Keep it in the same repository as the agent, so every change goes through code review. The file below describes a hypothetical invoice-triage agent. Hosts and names are placeholders, so swap in your own.\n\n```\nagent: invoice-triage\nowner: finance-platform-team\nenvironment: production\n\nidentity:\n  principal: spiffe://corp.example/agents/invoice-triage\n  credential_ttl_minutes: 15\n  shared_credentials: false\n\ntools:\n  gateway: https://tools.corp.example/mcp\n  token_audience: https://tools.corp.example/mcp\n  allowed:\n    - name: erp.read_invoice\n      scopes: [invoices:read]\n    - name: erp.update_status\n      scopes: [invoices:write]\n\nmodels:\n  gateway: https://models.corp.example\n  primary: model-a\n  fallback: model-b\n\nnetwork:\n  egress_allowlist:\n    - tools.corp.example\n    - models.corp.example\n    - otel.corp.example\n\nstate:\n  store: postgres\n  checkpoint_every_step: true\n\nbudget:\n  max_usd_per_run: 2.50\n  max_usd_per_day: 150\n  on_exceed: pause\n\nobservability:\n  trace_endpoint: https://otel.corp.example:4318\n\nrollback:\n  previous_release: invoice-triage@1.4.2\n```\n\nEach block maps to one requirement. The identity block names the owner and sets a fifteen-minute credential lifetime.\n\nThe tools block pins a gateway and lists only two tools, each with explicit scopes. The network block names three hosts, and nothing else is reachable.\n\nThe budget block caps each run at $2.50 and pauses the agent when it overflows. A reviewer can read this file in two minutes. That speed is the point.\n\nA manifest only helps if something enforces it. The script below loads the file and checks every rule. It prints one FAIL line per problem and exits with code 1, so any CI system can treat it as a failed gate. It needs only PyYAML. Think of it as a unit test for your AI agent infrastructure requirements.\n\n``` bash\n#!/usr/bin/env python3\n\"\"\"Fail the merge when an agent manifest misses an infrastructure requirement.\n\nUsage: python preflight.py agent-infra.yaml\nNeeds: pip install pyyaml\n\"\"\"\nimport sys\nfrom urllib.parse import urlparse\n\nimport yaml\n\ndef host(url):\n    return urlparse(url).hostname or \"\"\n\ndef check(m):\n    errors = []\n\n    def need(ok, msg):\n        if not ok:\n            errors.append(msg)\n\n    ident = m.get(\"identity\", {})\n    need(m.get(\"owner\"), \"identity: owner team is missing\")\n    need(ident.get(\"principal\"), \"identity: no per-agent principal\")\n    need(ident.get(\"shared_credentials\") is False, \"identity: shared credentials are not allowed\")\n    need(0 < ident.get(\"credential_ttl_minutes\", 0) <= 60, \"identity: credential TTL must be 1-60 minutes\")\n\n    tools = m.get(\"tools\", {})\n    gateway = tools.get(\"gateway\", \"\")\n    need(gateway.startswith(\"https://\"), \"tools: gateway must be an https URL\")\n    need(tools.get(\"token_audience\") == gateway, \"tools: token audience must equal the gateway URL\")\n    allowed = tools.get(\"allowed\", [])\n    need(allowed, \"tools: allow-list is empty\")\n    for t in allowed:\n        scopes = t.get(\"scopes\", [])\n        need(scopes and \"*\" not in scopes, f\"tools: {t.get('name')} needs explicit, non-wildcard scopes\")\n\n    models = m.get(\"models\", {})\n    need(models.get(\"gateway\"), \"models: no model gateway\")\n    need(models.get(\"fallback\") and models.get(\"fallback\") != models.get(\"primary\"),\n         \"models: fallback must exist and differ from primary\")\n\n    allow = m.get(\"network\", {}).get(\"egress_allowlist\", [])\n    need(allow and \"*\" not in allow, \"network: egress allow-list missing or wildcard\")\n    for url in (gateway, models.get(\"gateway\", \"\"), m.get(\"observability\", {}).get(\"trace_endpoint\", \"\")):\n        need(host(url) in allow, f\"network: {host(url) or 'endpoint'} is not on the egress allow-list\")\n\n    state = m.get(\"state\", {})\n    need(state.get(\"store\"), \"state: no durable store\")\n    need(state.get(\"checkpoint_every_step\") is True, \"state: checkpoint every step\")\n\n    budget = m.get(\"budget\", {})\n    need(budget.get(\"max_usd_per_run\", 0) > 0, \"budget: per-run cap missing\")\n    need(budget.get(\"on_exceed\") in (\"pause\", \"stop\"), \"budget: on_exceed must be pause or stop\")\n\n    need(m.get(\"observability\", {}).get(\"trace_endpoint\"), \"observability: no trace endpoint\")\n    need(m.get(\"rollback\", {}).get(\"previous_release\"), \"rollback: previous release not pinned\")\n    return errors\n\nif __name__ == \"__main__\":\n    with open(sys.argv[1]) as f:\n        problems = check(yaml.safe_load(f))\n    for p in problems:\n        print(\"FAIL\", p)\n    print(\"preflight:\", \"blocked\" if problems else \"passed\")\n    sys.exit(1 if problems else 0)\n```\n\nRun it against the manifest above and it passes. Break a few rules on purpose and it blocks the merge:\n\n``` bash\n$ python preflight.py agent-infra.yaml\npreflight: passed\n\n$ python preflight.py bad.yaml\nFAIL identity: shared credentials are not allowed\nFAIL tools: token audience must equal the gateway URL\nFAIL models: fallback must exist and differ from primary\nFAIL network: models.corp.example is not on the egress allow-list\nFAIL budget: on_exceed must be pause or stop\npreflight: blocked\n```\n\nAdd the script as a required check on your main branch. After that, no agent reaches production with a wildcard scope or a missing fallback.\n\n| **Quick check:** Which exit code makes CI block the merge?any non-zero code. The script returns 1 when a rule fails. | \n\nThe table below pairs every requirement with the probe in the script and the failure it prevents. Read it as a short risk register for your agent platform.\n\n| Requirement | Preflight probe | Failure it prevents | \n|---|---|---|\n| Identity | Per-agent principal, no shared credentials, TTL of 60 minutes or less | A leaked key that works everywhere | \n| Tool gateway | HTTPS gateway, token audience equals gateway, no wildcard scopes | One agent token replayed against other services | \n| Model gateway | Gateway set, fallback differs from primary | A provider outage that halts every workflow | \n| Egress allowlist | No wildcard, every gateway host listed | Data leaving through an unreviewed host | \n| Durable state | Store set, checkpoint on every step | A crash that restarts a long task from zero | \n| Cost budget | Per-run cap, pause or stop on overflow | A retry loop that burns the monthly budget overnight | \n| Telemetry and rollback | Trace endpoint set, previous release pinned | A bad release nobody can see or undo | \n\nIn a well-built [agentic AI architecture](https://www.xccelera.ai/orchestrator), every tool call passes through one gateway. The MCP authorization spec dated 2026-07-28 sets clear rules for that path. \n\nClients must send a resource parameter, defined by RFC 8707, in both authorization and token requests. Servers must check that each token was issued for them, and they must refuse tokens meant for anyone else.\n\nThat blocks token passthrough, where one stolen token opens several systems. The preflight rule mirrors this: the token audience must equal the gateway URL.\n\n| **Quick check:** Which manifest value must equal the gateway URL?The token audience. | \n\nVentureBeat's October 2026 VB Pulse survey reached 100 qualified respondents.\n\nAmong those who had swapped the AI model in a production app, 69% said it took weeks of engineering.\n\nA model gateway shrinks that cost.\n\nAgents call one endpoint, and routing rules decide which model answers. The fallback entry in the manifest means a provider outage degrades service instead of stopping it.\n\nTreat the fallback like any other release, and test it before you need it.\n\nRetry loops are the classic cost bug. An agent that calls a failing tool and retries forever can spend a month of budget overnight. Count cost after each model call. When the per-run total crosses the cap, pause the run and save its checkpoint.\n\nA human can then raise the cap or stop the task. Pausing beats killing, because durable state lets the run resume without repeating finished steps. Export one trace per run through the OpenTelemetry GenAI conventions, and attach the cost figure to it.\n\n| **Quick check:** What should an agent do when it crosses its per-run budget?Pause and keep its checkpoint, so a human can decide. | \n\nStart with one low-risk agent, such as a read-mostly triage helper. Write its manifest before you write its prompt.\n\nMake the preflight script a required check, then treat every FAIL line as a ticket instead of a suggestion.\n\nExpect the first run to fail, because that is the script doing its job. Once one agent passes, copy the manifest for the next one and change only the names and scopes.\n\nReview the rules each quarter, since specs and providers keep changing.\n\nThe authorization text you read today may gain new requirements in the next revision, and your checks should follow.\n\nFinally, keep your AI agent infrastructure requirements in version control, not in a wiki.\n\nIf an agent needs a new tool or a wider scope, change the file in the same pull request, so the record always matches reality. Small, boring releases build the trust that bigger agents will need later.", "url": "https://wpnews.pro/news/infrastructure-required-to-deploy-ai-agents-in-the-enterprise", "canonical_source": "https://dev.to/samamderson/infrastructure-required-to-deploy-ai-agents-in-the-enterprise-4ofi", "published_at": "2026-11-24 06:38:44+00:00", "updated_at": "2026-11-24 06:43:07.745597+00:00", "lang": "en", "topics": ["ai-agents", "mlops", "ai-infrastructure", "developer-tools"], "entities": ["PyYAML", "OpenTelemetry", "SPIFFE", "PostgreSQL"], "also_reported_by": [], "takeaway": "Encode each agent's identity, scoped tools, model gateway, egress allowlist, state store, budget cap and trace endpoint in a repo-committed YAML manifest, then gate merges with a preflight script that exits 1 on any missing requirement.", "recommendation": {"advice": "Keep an agent manifest in the same repo as the agent and run a CI preflight that fails the build when identity, tool scopes, egress allowlist, state checkpointing or budget caps are missing.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/infrastructure-required-to-deploy-ai-agents-in-the-enterprise", "markdown": "https://wpnews.pro/news/infrastructure-required-to-deploy-ai-agents-in-the-enterprise.md", "text": "https://wpnews.pro/news/infrastructure-required-to-deploy-ai-agents-in-the-enterprise.txt", "jsonld": "https://wpnews.pro/news/infrastructure-required-to-deploy-ai-agents-in-the-enterprise.jsonld"}}