• 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 Multi-Gateway Agents (JavaScript)

by

LangGraph JS agents using separate public and private AgentCore Gateways with different authorization levels.

  1. Bedrock AgentCore: LangGraph Multi-Gateway Agents (JavaScript)

LangGraph Multi-Gateway Example

A multi-agent setup with public and private gateways, each with different authorization levels.

Features

  • Multiple Gateways: Public (NONE) and Private (AWS_IAM) gateways
  • Two Agents: Each agent connects to its own gateway
  • SigV4 Authentication: Private agent uses AWS SigV4 for gateway access
  • Lambda Tools: Calculator (public) and user lookup (private) as Lambda functions
  • Dockerfiles: Each agent has its own Dockerfile for deployment

Architecture

                    +-----------------+
                    |   Calculator    |  (Lambda - nodejs20.x)
                    |   Function      |
                    +--------+--------+
                             |
                    +--------v--------+
   User Request --> | Public Gateway  |  (NONE auth)
   (calculator)     | (MCP protocol)  |
                    +--------+--------+
                             |
                    +--------v--------+
                    |  Public Agent   |  (Dockerfile.public)
                    | (LangGraph JS)  |
                    +-----------------+

                    +-----------------+
                    | Internal Lookup |  (Lambda - nodejs20.x)
                    |   Function      |
                    +--------+--------+
                             |
                    +--------v--------+
   User Request --> | Private Gateway |  (AWS_IAM auth)
   (user lookup)    | (MCP + SigV4)   |
                    +--------+--------+
                             |
                    +--------v--------+
                    | Private Agent   |  (Dockerfile.private)
                    | (LangGraph JS)  |
                    +-----------------+

Quick Start

Deploy

npm install
sls deploy

Test

# Test both agents
PUBLIC_RUNTIME_ARN=<public-arn> PRIVATE_RUNTIME_ARN=<private-arn> node test-invoke.js

# Test individual agents
RUNTIME_ARN=<public-arn> AGENT_TYPE=public node test-invoke.js
RUNTIME_ARN=<private-arn> AGENT_TYPE=private node test-invoke.js

Remove

sls remove

Related Examples

  • langgraph-gateway - Single gateway example
  • ../python/langgraph-multi-gateway - Python version

Contents

  • LangGraph Multi-Gateway Example
  • Features
  • Architecture
  • Quick Start
  • Deploy
  • Test
  • Remove
  • Related Examples

Related

GuidesPluginsExamplesSlack CommunitySupport