Skip to content

feat: skip MCP client generation for VPC agents#450

Open
tejaskash wants to merge 1 commit intomainfrom
feature/vpc-template-conditionals
Open

feat: skip MCP client generation for VPC agents#450
tejaskash wants to merge 1 commit intomainfrom
feature/vpc-template-conditionals

Conversation

@tejaskash
Copy link
Contributor

Summary

  • Adds isVpc flag to AgentRenderConfig and template rendering pipeline
  • Skips mcp_client/ directory rendering when agent uses VPC network mode (via skipDirs in copyAndRenderDir)
  • Wraps MCP imports and tool initialization in {{#unless isVpc}} Handlebars conditionals in all 5 framework main.py templates (Strands, LangChain, GoogleADK, OpenAIAgents, AutoGen)
  • VPC agents may not have public internet, so Exa AI MCP server should not be included

Test plan

  • npm run build compiles
  • npm test passes (snapshot tests updated)
  • Generate projects with VPC mode — verify mcp_client/ absent, main.py has no MCP imports
  • Generate projects with PUBLIC mode — verify mcp_client/ present, main.py has MCP imports

VPC agents may not have public internet access, so Exa AI MCP
server should not be included in generated code. Adds isVpc flag
to template rendering and conditionally excludes mcp_client/
directory and MCP imports in main.py for all frameworks.
@tejaskash tejaskash requested a review from a team February 25, 2026 19:18
@github-actions github-actions bot added the size/s PR size: S label Feb 25, 2026
from autogen_core.tools import FunctionTool
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from model.load import load_model
{{#unless isVpc}}
from langchain.tools import tool
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from model.load import load_model
{{#unless isVpc}}
from agents import Agent, Runner, function_tool
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from model.load import load_model
{{#unless isVpc}}
@github-actions
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.06% 2989 / 6783
🔵 Statements 43.65% 3147 / 7209
🔵 Functions 45.73% 617 / 1349
🔵 Branches 48.76% 1959 / 4017
Generated in workflow #710 for commit 3d60f9b by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant