Skip to content
Agents tracked: 444 Releases (7d): 644 Agent status: 4 with issuesSince last limit reset: Claude 30d · Codex 3d Updated Oct 23, 2026
Recipe

Route agent requests between local SLMs and Amazon Bedrock with Strands Agents

An AWS blog walkthrough shows how to build an Adaptive Agentic Intelligence Framework with Strands Agents. A small local model handles routine requests, and complex analysis goes to cloud models on Amazon Bedrock. An IoT monitoring scenario serves as the reference implementation.

The problem

Teams building AI agents often send every request, from simple status checks to complex analysis, to one large and costly model. This can raise API costs, make latency unpredictable and rule out offline operation. Routine queries that could be solved locally still need a network round-trip to a cloud LLM.

Steps

  1. Install Python 3.10+, Ollama, Strands Agents, boto3 and the AWS CLI, and enable Amazon Bedrock model access.
  2. Start the Ollama server and pull llama3.2:1b (orchestrator) and llama3.2-vision (vision).
  3. Define local tools with the @tool decorator: get_device_telemetry (simulated IoT data) and analyze_camera_feed (local vision model).
  4. Add a get_expert_insights tool that calls Amazon Bedrock through boto3 for complex questions.
  5. Configure a Strands Agent using OllamaModel with llama3.2:1b and a system prompt that maps request types to tools.
  6. Run the agent with telemetry, image and strategy prompts, and let the orchestrator choose the local or cloud path.

From the official docs

from strands.models.ollama import OllamaModel

model = OllamaModel(
    model_id="llama3.2:1b",
    host="http://localhost:11434",
    params={"max_tokens": 300, "temperature": 0.3},
)

Results

  • Routine requests such as device status checks and image analysis run locally with low latency and no cloud dependency.
  • Only complex requests reach Amazon Bedrock, and the article says cost savings can come from the roughly 80 percent of traffic that doesn't hit a paid API endpoint.
  • The same design can run on a Raspberry Pi with 8 GB of memory, fully in the cloud, or in a hybrid setup, according to the AWS blog.

As reported by the source (AWS Machine Learning Blog tutorial); AgentGid did not measure these figures.

Takeaway. Use a small local model as a router so routine agent calls stay on-device and only requests needing deeper reasoning go to a paid cloud model.
AgentGid's take

This suits a small team comfortable with Python and the AWS CLI that wants to prototype hybrid routing, since Strands Agents is Free (OSS) and Ollama runs locally. Watch the "roughly 80 percent" savings figure: it comes from the AWS article's IoT scenario, so your own traffic mix may differ, and a 1B router can misroute requests. LangGraph (Free (OSS)) is an alternative if you want more explicit routing control.

The agent used here

Similar use cases