• 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 Agent with Gateway Tools (JavaScript)

by

LangGraph JS agent exposing Lambda-backed tools through an AgentCore Gateway over MCP.

  1. Bedrock AgentCore: LangGraph Agent with Gateway Tools (JavaScript)

LangGraph Gateway Example

A LangGraph JavaScript agent with Lambda-backed tools exposed via an AgentCore Gateway using MCP protocol.

Features

  • Gateway Tools: Lambda functions exposed as agent tools via MCP
  • SigV4 Authentication: Secure AWS IAM authentication for gateway access
  • Tool Discovery: Automatic tool discovery from gateway endpoint
  • LangGraph JS: StateGraph with ToolNode and conditional routing

How It Works

  1. Lambda function (calculatorFunction) is deployed as a standard AWS Lambda
  2. The Serverless Framework creates a Gateway with the tool schema
  3. The agent discovers tools at runtime via BEDROCK_AGENTCORE_GATEWAY_URL
  4. MCP protocol is used to invoke tools through the gateway

Quick Start

Deploy

npm install
sls deploy

Test

RUNTIME_ARN=<your-runtime-arn> node test-invoke.js

Remove

sls remove

Related Examples

  • langgraph-multi-gateway - Multiple gateways with different auth
  • ../python/langgraph-gateway - Python version

Contents

  • LangGraph Gateway Example
  • Features
  • How It Works
  • Quick Start
  • Deploy
  • Test
  • Remove
  • Related Examples

Related

GuidesPluginsExamplesSlack CommunitySupport