Strandsagent banner
antstackio antstackio

Strandsagent

Development community

Description

Repository containing code for the MCP meetup

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Strands Agent Lambda Stack

A serverless application that deploys AI-powered agent Lambda functions using AWS CDK, featuring weather forecasting and database query capabilities through MCP (Model Context Protocol) handlers.

Architecture Overview

This project deploys two Lambda functions:

  • Weather Agent Function: Provides weather forecasting capabilities using AI agents
  • Query Agent Function: Handles database queries with natural language processing

Both functions are built with Python 3.12, use AWS Bedrock for AI model invocations, and are deployed on ARM64 architecture for better performance and cost efficiency.

Prerequisites

  • Node.js (v18 or later)
  • npm or yarn
  • AWS CLI configured with appropriate credentials
  • AWS CDK CLI (npm install -g aws-cdk)
  • Python 3.12 (for local development)
  • Docker (for building Lambda layers)

Project Structure

strandsagent/
├── AgentLambdaStack.ts      # CDK stack definition
├── bin/                     # CDK app entry point
│   └── app.ts
├── lambda/                  # Lambda function source code
│   ├── query/
│   │   ├── mcp_handler.py
│   │   └── query_agent_handler.py
│   └── weather/
│       ├── mcp_handler.py
│       └── weather_agent_handler.py
├── packaging/               # Deployment packages
│   ├── dependencies.zip    # Lambda layer with dependencies
│   ├── query_app.zip      # Query function package
│   └── weather_app.zip    # Weather function package
├── cdk.json                # CDK configuration
├── package.json            # Node.js dependencies
└── requirements.txt        # Python dependencies

Environment Variables

Create a `.env` file in the project root with the following variables:

# Required for Weather Function
OPENAI_KEY=your-openai-api-key

# Required for Query Function
DB_HOST=your-database-host
DB_PORT=5432
DB_NAME=your-database-name
DB_USER=your-database-user
DB_PASSWORD=your-database-password

Environment Variable Details

  • OPENAI_KEY: Op