• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Serverless, inc.

Bedrock AgentCore: LangGraph Basic Agent, Code Deploy (JavaScript)

by

Minimal LangGraph JS agent built automatically from source with no Dockerfile, deployed to AWS Bedrock AgentCore.

  1. Bedrock AgentCore: LangGraph Basic Agent, Code Deploy (JavaScript)

LangGraph JS Example

A minimal LangGraph JavaScript agent deployed to AWS Bedrock AgentCore without a Dockerfile. The Serverless Framework automatically builds the container image from source code.

Features

  • No Dockerfile needed: Container image is built automatically from source code
  • LangGraph JS: ReAct agent pattern with tool calling
  • Claude Sonnet 5: Powered by Amazon Bedrock
  • Simple Tools: Calculator operations
  • Minimal Configuration: Just ai: { agents: { assistant: {} } } in serverless.yml

How It Works

When no Dockerfile is found in the project directory, the Serverless Framework automatically builds the container image from your source code:

  1. Node.js is detected from package.json
  2. Dependencies are installed automatically via npm install
  3. The image is built for ARM64

Key Files

FilePurpose
package.jsonDeclares dependencies; engines.node specifies Node.js version

Quick Start

Prerequisites

  • Node.js 20+
  • Docker
  • AWS credentials configured
  • Serverless Framework CLI (npm install -g serverless)

Install Dependencies

npm install

Deploy to AWS

sls deploy

Invoke Deployed Agent

# Via Serverless Framework CLI
sls invoke --agent assistant --data '{"prompt":"What is 25 multiplied by 4?"}'

# Plain string is also supported:
# sls invoke --agent assistant -d "What is 25 multiplied by 4?"

Remove

sls remove

Project Structure

langgraph-basic/
├── serverless.yml    # Serverless Framework configuration
├── index.js          # LangGraph JS agent with tools
├── package.json      # npm dependencies
└── README.md         # This file

Related Examples

  • langgraph-basic-dockerfile - Same agent with a Dockerfile
  • mcp-server - JavaScript MCP server

Contents

  • LangGraph JS Example
  • Features
  • How It Works
  • Key Files
  • Quick Start
  • Prerequisites
  • Install Dependencies
  • Deploy to AWS
  • Invoke Deployed Agent
  • Remove
  • Project Structure
  • Related Examples

Related

GuidesPluginsExamplesSlack CommunitySupport