License to Bill🍸💸 : MCP Agents and the Bedrock Budget Protocol

Published: (January 18, 2026 at 05:05 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

Prerequisites

  • ✅ An active AWS account
  • 🧠 Basic familiarity with Foundation Models (FMs) and Amazon Bedrock
  • 💻 The AWS Command Line Interface (CLI) installed and credentials configured
  • 🐍 Python 3.11 or later
  • 🛠️ The AWS Cloud Development Kit (CDK) CLI installed
  • 🤖 Model access enabled for Anthropic’s Claude 3.5 Sonnet v2 in Amazon Bedrock
  • 🔐 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set as environment variables for server authentication

Example: InlineAgent Hello World

from bedrock_agents.agent import InlineAgent

InlineAgent(
    foundationModel="us.anthropic.claude-3-5-haiku-20241022-v1:0",
    instruction="You are a friendly assistant that is supposed to say hello to everything.",
    userInput=True,
    agentName="hello-world-agent",
).invoke("Hi how are you? What can you do for me?")

Sample output

SessionId: 99c0924d-d5ae-4080-9f59-8b8dc501977e
2025-04-04 17:34:11,438 - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials
Input Tokens: 600 Output Tokens: 137
Thought: The user has greeted me and asked about my capabilities. I'll respond in a friendly manner and use the user interaction tool to engage with them.
Hello there! I'm doing great, thank you for asking. I'm a friendly assistant who loves to say hello to everything! What would you like help with today? I'm ready to assist you with any questions or tasks you might have.
Agent made a total of 1 LLM calls, using 737 tokens (in: 600, out: 137), and took 4.7 total seconds
Back to Blog

Related posts

Read more »

AI Financial Co-Pilot

!Cover image for AI Financial Co-Pilothttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads....