Most new AI agent frameworks want to lock you into their platform-as-a-service, but that's rarely a good idea. Here's why:
- AI agent quality heavily depends on easy access to relevant data, typically located on existing platforms.
- Effective AI agents require seamless integration with existing systems using both synchronous (APIs) and asynchronous (events) patterns, which established cloud vendors excel at.
- AI agents benefit from diverse infrastructure services to efficiently support complex workflows and capabilities.
- Major cloud providers like AWS offer unmatched power, flexibility, and cost efficiency.
That's why we're introducing a better solution: Serverless Container Framework v2 (SCF v2) - the ideal way to self-host AI agents on AWS. SCF v2 supports flexible workloads (long-running Agents and short-lived Tools), easy setup of APIs, event subscriptions, and Slack chat integration, and provides an exceptional developer experience.
To get started, watch our video tutorial, check out the example project, and explore the SCF v2 documentation.
Why Choose Serverless Container Framework v2?
AI agents have inherently variable workloads. They can run briefly for simple queries or indefinitely for extensive tasks like software development or complex business automation. They also need additional services for tools and MCP servers. The Serverless Container Framework is the perfect single solution to manage this variability, effortlessly.
Flexible Compute Options
SCF v2 offers a unified development and deployment experience across AWS Lambda and AWS ECS Fargate.
AWS Lambda provides auto-scaling, cost efficiency (pay-only-when-used), and simplicity—perfect for short tasks like tools or MCP Servers. While AWS ECS Fargate provides a traditional server model without timeouts, ideal for extended workloads like AI agents themselves. SCF allows you to seamlessly combine and migrate across these compute types with zero downtime, to build extraordinarily powerful agents.
Easy Integrations for Productivity
SCF provides a production-ready API out-of-the-box, ideal for building AI agent backends powering custom chat interfaces.
SCF v2 introduces instant Slack integration, enabling effortless deployment of internal AI agents in Slack for tasks like customer research, answering support queries, or triggering automations that used to exist as ad-hoc scripts.
Further, SCF v2 makes integration with AWS EventBridge straightforward, allowing AI agents to process asynchronous events from numerous sources (AWS S3, Zendesk, Salesforce, MongoDB Atlas, New Relic). We see AI agents increasingly serving as versatile event buses.
Scheduled tasks are also easy to configure with SCF v2. AI agents can now regularly perform tasks like generating morning business reports and posting them in Slack.
With just a few lines of YAML, here's how simple it is to integrate an AI agent with Slack:
containers:
support-agent:
src: ./
compute:
type: awsFargate
awsFargateEcs:
cpu: 1024
memory: 2048
routing:
pathPattern: "/*"
pathHealthCheck: "/health"
integrations:
slack-support:
type: slack
name: MySlackAgent
Advanced Operational Capabilities
SCF v2 allows streaming responses from both ECS Fargate and Lambda, overcoming previous payload limitations in SCF v1. It also features built-in caching with AWS CloudFront, automatic custom domain and SSL setup, powerful monitoring with AWS CloudWatch, and a developer-friendly local mode compatible with live integrations (e.g., Slack).
Optimized for Mastra and Other AI Agent Frameworks
SCF v2 has been tested and optimized for Mastra, the popular TypeScript-based AI agent framework, and other AI agent frameworks. If your AI agent framework runs in a container, SCF can handle it effortlessly.
This detailed example project and video tutorial demonstrate SCF v2 with Mastra.
Get Started
Explore these resources to begin: