# Zero Cold Starts: Serverless AI Agents on Akamai Functions — Thorsten Hans

## Executive summary

This talk introduces a modern, open-standards approach to building and deploying AI agents and MCP (Multi-Component Protocol) servers globally with zero cold starts. The solution leverages WebAssembly (Wasm) on the server side, utilizing the CNCF project Spin and Akamai Functions. By adopting this edge-native stack, developers can focus purely on business logic, achieving fast response times and simplified deployment via a single command, eliminating the need for complex, proprietary, or region-bound infrastructure management.

## Key takeaways

- WebAssembly (Wasm) for Edge Computing: Wasm provides a portable, super tiny, fast, and inherently sandboxed binary format, making it ideal for running server-side applications at the edge.
- Zero Cold Starts with Akamai Functions: Akamai Functions is a globally distributed serverless platform that guarantees zero cold starts, achieving cold start times in less than half a millisecond.
- Simplified Development Workflow: The wasmcp CLI integrates with Spin to abstract away non-functional requirements (like authentication or infrastructure setup), allowing developers to focus only on implementing the core business logic (tools, resources, prompts).
- Global Deployment in Seconds: The entire MCP server can be compiled and deployed worldwide using a single command (`spin akamai deploy`), distributing the workload across all service regions and providing a public URL in approximately 60 seconds.

## Technical details

- The Cold Start Problem: Traditional region-bound architectures or container/VM deployments can suffer from cold start delays ranging from seconds to minutes, especially during rapid scaling, leading to poor global user experience.
- Spin Framework: Spin is a CNCF project that is vendor agnostic. It consists of a CLI, a Wasmtime runtime, and language-specific SDKs, allowing developers to build Wasm applications in languages like Rust, TypeScript, and Python.
- MCP Server Composition: The `wasmcp` CLI simplifies MCP development by handling boilerplate tasks (like OAuth 2.0/OIDC authentication) and allowing developers to compose a full server by focusing on defining tools and resources.
- AI Agent Deployment: For AI agents, the process involves creating a Spin app, defining tools, and pointing the agent to an LLM instance (e.g., on a Linode GPU). The agent's logic is contained within the Wasm application.
- Memory Snapshots: For JavaScript-based applications, compiling and taking a memory snapshot of the interpreter and dependencies at compile time significantly improves cold start performance compared to native JavaScript applications.

## Practical implications

- Build Engineers can achieve global, highly available services without managing underlying infrastructure (no Ops).
- The standardized, open-source nature of Spin and Wasm ensures portability across multiple runtimes.
- The streamlined workflow (scaffold -> compose -> deploy) drastically reduces the time-to-market for complex AI applications.
- The use of a built-in key-value store within Akamai Functions eliminates the need for manual credential management or separate persistence layers.

## Topics

WebAssembly, Serverless Computing, AI Agents, Multi-Component Protocols (MCP), Edge Computing, CI/CD, Cloud Architecture, Spin, Akamai Functions, wasmcp

Source: https://www.youtube.com/watch?v=Zf_e45GiNCE
