yaalalabs/agent-kernel/ak-cloud-deploy
Claude Code and agent skill by yaalalabs/agent-kernel
- community
Checking that the SKILL.md file is still in the repository.
Deploy an Agent Kernel project to AWS, Azure, or GCP using Terraform modules, or to any Kubernetes cluster (on-prem, baremetal, EKS) using the official Helm chart. Supports serverless and containerized modes for all three clouds. AWS supports execution modes (rest_sync, rest_async, async) with a reply message_type (complete, delta), queue-based scalable processing, custom API Gateway authorizers, EventBridge Scheduler for scheduled tasks, and SSM Parameter Store secret resolution (`ssm_enabled`). GCP supports Cloud Run serverless (scale-to-zero) and containerized (always-on) with Redis or Firestore session backends. Kubernetes runs the queue pipeline over NATS JetStream, Kafka, or SQS with KEDA autoscaling, an optional WebSocket gateway tier, and Kubernetes Secrets mounted for secret resolution (`secretStore`).
Install
npx vskill@latest install yaalalabs/agent-kernel/ak-cloud-deploySKILL.md
Deploy to Cloud
Use this skill to deploy your Agent Kernel project to AWS, Azure, or GCP.
Instructions for the Agent
When the user wants cloud deployment, follow this workflow.
Step 1: Identify the Project
Check for:
pyproject.tomlwithagentkerneldependency- agent entry file (
app.py,lambda.py, or similar) config.yaml
If missing, suggest ak-init first.
Step 2: Ask Deployment Questions
- Target platform: AWS, Azure, GCP, or Kubernetes (on-prem / baremetal / EKS via the Helm chart; see the On-Prem / Kubernetes section)?
- Runtime mode:
- Serverless
- Containerized
- Execution pattern (AWS only):
- Synchronous HTTP (
rest_sync, supports standard or queue/scalable mode; AWS serverless or containerized) - Asynchronous REST (
rest_async, queue/scalable mode; AWS serverless or containerized) - WebSocket full-response (
asyncwithmessage_typeunset orcomplete, works with or without queue mode —queue_mode = falseruns the agent inline,queue_mode = trueenqueues to a separately-scalable Agent Runner) — AWS serverless or AWS containerized/ECS - WebSocket token streaming (
asyncwithmessage_type = "delta", works with or without queue mode, same asasyncabove) — AWS serverless or AWS containerized/ECS; also available via SSE (POST /api/v1/chatwithexecution.mode: rest_syncandexecution.message_type: delta, no Terraform changes required) wherever the built-in FastAPI REST server runs: local/self-hosted, AWS ECS single-container (non-queue) REST, Azure Container Apps, GCP Cloud Run — not on AWS Lambda or ECS queue mode (both refuserest_sync+deltaat startup; useasync+deltathere) or Azure Functions. The oldstreammode was removed:execution_mode = "stream"fails atterraform planandexecution.mode: streamfails at config load
- Scalability (AWS serverless only): standard or queue/scalable mode?
- Session store: Redis, Valkey (AWS only), DynamoDB (AWS), Cosmos DB (Azure), Firestore (GCP)?
- Security: custom authorizer required (AWS serverless only)?
- Resource naming: a single
prefixapplied to every resource name (e.g.myapp-dev-chat).
Step 3: Choose the Correct Terraform Module
Use official modules:
- AWS serverless:
yaalalabs/ak-serverless/aws - AWS containerized:
yaalalabs/ak-containerized/aws - Azure serverless:
yaalalabs/ak-serverless/azurerm - Azure containerized:
yaalalabs/ak-containerized/azurerm - GCP serverless:
yaalalabs/ak-serverless/google - GCP containerized:
yaalalabs/ak-containerized/google
Use current module version (0.9.5) unless user requests another.
Kubernetes does not use Terraform: the Helm chart lives at ak-deployment/ak-k8s/chart in the Agent Kernel repository and is published as an OCI artifact (oci://ghcr.io/yaalalabs/charts/agent-kernel, versioned with each release). Install the published chart, as in the Kubernetes section below, not a repository checkout.
All modules are provider-agnostic: they declare required_providers but do not configure them internally. Configure each provider (aws/docker, azurerm, or google/google-beta/docker) in the root module and pass it explicitly via the module's providers = { ... } argument, as shown in the examples below. Azure's containerized module builds and pushes its image via a nested submodule with its own internal docker provider, so no docker provider needs to be configured or passed by the caller there.
AWS-only features in this skill:
execution_mode/message_type(Terraform inputs;execution.message_typeitself is plain Agent Kernel config)queue_modeauthorizer
Azure examples use the provider module's standard top-level inputs (function_name, package_path, container_port, publisher_email) rather than AWS serverless execution modes.
GCP modules use Cloud Run for both serverless (scale-to-zero, min_instance_count=0) and containerized (always-on, min_instance_count≥1) modes. Both use agentkernel.gcp.CloudRun as the entry point.
Step 4: Align App Dependencies and Session Config
When the user selects a session store, always update both app dependencies and config.yaml.
Redis sessions
- Dependency extras: include
redis - Typical dependency example:
config.yamlsession block:
Valkey sessions (AWS)
Valkey is the open-source, Linux Foundation-governed fork of Redis. It is wire-compatible with Redis and available on AWS ElastiCache at a lower price point than the Redis OSS engine. Agent Kernel treats it as a first-class session and response store backend on AWS.
- Dependency extras: include
valkey - Typical dependency example:
config.yamlsession block:
- Terraform provisions the cluster with
create_valkey_cluster = true(serverless and
containerized) and injects AK_SESSION__VALKEY__URL — session.type: valkey must still be set in config.yaml since the type itself is never injected.
- For queue-mode response storage, set
create_valkey_response_store = true(serverless only) and
execution.response_store.type: valkey in config.yaml.
DynamoDB sessions (AWS)
- Dependency extras: include
aws - Typical dependency example:
config.yamlsession block:
Cosmos DB sessions (Azure)
- Dependency extras: include
azure - Typical dependency example:
config.yamlsession block:
Firestore sessions (GCP)
- Dependency extras: include
gcp - Typical dependency example:
config.yamlsession block:
- The Terraform module injects
AK_SESSION__TYPE=firestoreandAK_SESSION__FIRESTORE__COLLECTION_NAMEautomatically when Firestore is enabled. - A TTL policy must be set on the Firestore collection pointing to the
expiry_timefield for automatic document expiry.
If the Terraform module creates the backing store (for example create_redis_cluster = true, create_valkey_cluster = true, or create_dynamodb_memory_table = true), make sure output values are wired to the app environment variables used by config.yaml.
Deploying Conversation Thread Storage
Conversation threads (ak-add-capabilities) deploy the same way sessions do: the app mounts AgentThreadRequestHandler (which is what enables the feature; the self-hosted REST API is the only surface that records threads — queue-mode runners and the other deployment adapters do not) and declares thread.type in config.yaml, and Terraform provisions the backend, injecting only the connection detail. Terraform never sets AK_THREAD__TYPE itself.
- AWS (serverless + containerized):
create_dynamodb_thread_table = trueprovisions a DynamoDB
table (partition session_id, sort sk, TTL on expiry_time) and injects AK_THREAD__DYNAMODB__TABLE_NAME.
- GCP (serverless + containerized):
create_firestore_thread_collection = truerequires
create_firestore_database = true, reuses that database, and injects AK_THREAD__FIRESTORE__COLLECTION_NAME, __PROJECT_ID, and __DATABASE_ID. No new resource is provisioned — the collection is created on first write.
- Redis / Valkey: no dedicated Terraform flag — reuse whatever
create_redis_cluster/
create_valkey_cluster already provisions and declare thread: {type: redis} (or valkey) with the cluster URL in config.yaml.
Setting the Terraform flag without declaring thread.type in config.yaml silently leaves threads on the non-durable in-memory backend (any AK_THREAD__* var materialises AKConfig.thread, but type still defaults to in_memory) — always pair the flag with the matching thread.type.
Deploying Scheduled Tasks
Scheduled tasks (ak-add-capabilities) deploy on the same two-step split: the app declares schedule.provider.type and schedule.store.type in config.yaml, and Terraform provisions the backends, injecting only the coordinates. Terraform never sets AK_SCHEDULE__PROVIDER__TYPE or AK_SCHEDULE__STORE__TYPE.
Scheduling requires queue mode — occurrences are delivered into the input queue, so queue_mode = true is mandatory on AWS. enable_scheduling without it is rejected.
- AWS (serverless + containerized):
enable_scheduling = trueprovisions an EventBridge Scheduler
schedule group and the execution role Scheduler assumes to deliver triggers to the input queue, grants both the request/REST role and the agent-runner role scheduler:CreateSchedule|UpdateSchedule|DeleteSchedule|GetSchedule plus iam:PassRole on that role, and injects AK_SCHEDULE__PROVIDER__EVENTBRIDGE__GROUP_NAME, __ROLE_ARN and __QUEUE_ARN. It also flips the input queue to content-based deduplication, because Scheduler cannot set a MessageDeduplicationId (application senders are unaffected — their explicit id takes precedence).
- AWS (serverless + containerized):
create_dynamodb_schedule_table = trueprovisions a DynamoDB
table (partition task_id, no sort key, no GSI, TTL on expiry_time) and injects AK_SCHEDULE__STORE__DYNAMODB__TABLE_NAME.
- Redis / Valkey task store: no dedicated Terraform flag — reuse whatever
create_redis_cluster/
create_valkey_cluster already provisions and declare schedule: {store: {type: redis}} (or valkey) with the cluster URL in config.yaml.
- Azure / GCP: no scheduling provider ships for these clouds yet. The
localprovider only works
in a single always-on process with the in_memory transport and store, which no cloud deployment mode gives you.
Setting the Terraform flags without declaring both types in config.yaml silently leaves scheduling on the in-process local provider and in_memory store (any AK_SCHEDULE__* var materialises AKConfig.schedule, but the types still default), while the provisioned group and table sit unused — always pair the flags with the matching types. The reverse is safe: declaring the types without the flags fails at startup with an AKConfigError on the missing group_name / role_arn / queue_arn.
The blocks above enable deferring and the agent tools. The /api/v1/schedules management routes are not mounted from config — on ECS queue mode, pass the handler to the IO container's entrypoint, where it is served alongside the queue-producing chat route:
Remember to list the schedule paths in gateway_endpoints — the gateway only proxies paths it is told about.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingak-py/src/agentkernel/skills/ak-cloud-deploy/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yaalalabs/agent-kernel/ak-cloud-deploy)