DEV Community

Ramandeep Singh
Ramandeep Singh

Posted on

⚡️Effortless API Calls in TypeScript with Strands Agent SDK's HTTP Request Tool

I recently built a weather forecaster web app for US cities using the newly released Strands Agent SDK TypeScript API. What makes this SDK stand out is its httpRequest tool—a powerful way to let agents hit any API endpoint, no custom HTTP code required!

🎬 Demo on YouTube:

Why is this cool?

  • No more boilerplate: Say goodbye to writing fetch/Axios logic. Pass your URLs and let the SDK's agent handle it.
  • AI-powered API handling: The agent interprets your intent, makes the right HTTP calls, and formats the results dynamically.
  • Streamed, engaging responses: Results are shown as they arrive, for a snappy and interactive UX.

How it Works

  1. You prompt the agent (e.g., "What's the weather in Oklahoma City, OK?")
  2. The agent plans & executes the needed HTTP requests using the httpRequest tool.
  3. Responses are processed and streamed as friendly markdown text.

My Example: Weather Forecaster

I ported the Strands Python weather agent to TypeScript with the SDK. Enter a city, get live US weather—easy as that.

👉 See the repo & code

Agent Flow

  1. User sends a natural language query
  2. Agent analyzes and decides what API calls to make
  3. Executes with httpRequest
  4. Processes and formats the results
  5. Returns a clean, human-readable answer

Learn More

Give it a try for your next API-powered project—API calls have never been easier!

Top comments (0)