Frameworks

AWS Strands Agents Launches Rust SDK With 50ms Cold Starts

The open-source Strands Agents toolkit now has a Rust version. In the team's Lambda test, a Rust agent woke up in 50 milliseconds and used far less memory than the Python and TypeScript versions.

AWS Strands Agents Rust SDK with fast cold starts and low memory use
The Strands Harness and Harness SDK are now available in Rust as a v0.1.0 developer preview.

The team behind Strands Agents, the open-source AI agent toolkit from AWS, has released the Strands Harness and the Strands Harness SDK in Rust. This first release is version 0.1.0 and is labeled a developer preview, so the team expects to keep changing it.

The Strands Harness is a ready-made agent you can start with a few lines of code. The SDK is the set of building blocks underneath it: the agent loop, the tools, and the connections to AI models.

Why Rust for AI agents?

Agents are showing up in places where start-up time, memory, and doing many things at once really matter. Examples include serverless functions that shrink to zero when idle, services that hold thousands of sessions at once, and small devices or robots with little memory.

The team gives three reasons Rust fits. It compiles to a native program, so there is no runtime to boot up. It manages memory without a garbage collector. And it runs async work across all CPU cores using Tokio.

Plain idea: a cold start is the wait when a serverless function wakes up after being idle. A shorter wait means a user sees an answer sooner.

The numbers from the Lambda test

The team ran the same Strands Harness agent in Rust, TypeScript, and Python on AWS Lambda. The setup was arm64 with 1,024 MB of memory, using Amazon Nova on Amazon Bedrock. Each result is the median of 100 runs.

  • Rust: 50 ms cold start, 48 MB peak memory.
  • TypeScript: 635 ms cold start, 195 MB peak memory.
  • Python: 2,428 ms cold start, 192 MB peak memory.

The team says a 50 ms cold start makes scale-to-zero practical even for interactive requests. It also says that at 48 MB, many more agents fit into the same memory.

A research idea for even more agents

The team also mentions Infinity, a research runtime from the Hydro project, a collaboration between AWS and UC Berkeley. It treats an agent like a Rust async function. While the agent waits for a tool, the runtime saves its conversation and pauses it, so an idle agent costs about as much memory as its history.

By that approach, 75,000 agents could run at once in the 8 GB of a Raspberry Pi 5, and a serverless function could exit while a tool runs for hours. The team is still experimenting with adding Infinity to the Rust harness and plans to share more later.

A language that AI agents write well

The second reason is about agents that write code. Rust's compiler checks types, ownership, and thread safety before the program runs, and its error messages usually explain the problem and how to fix it. A coding agent can read that message, change the code, and build again.

Once the code builds, tests run, and any failures go back to the agent as extra context. The team says this quick loop was a big part of how Strands Factory could build the SDK, and you get the same benefit when your own agents write Rust.

Compiled, but still flexible

Is a compiled language too rigid for agents that change what they do at each step? The team says no. Your app and its tools are compiled, but the model decides at runtime what to do with them, just as in Python and TypeScript.

The harness also supports programmatic tool calling. The agent writes a small Python script that chains, loops over, and runs several tools in parallel. The script runs in Monty, a Python interpreter written in Rust by Pydantic. Monty keeps the script isolated: it has no access to the filesystem, network, or environment, so it can only reach the tools the harness hands it.

Your first Rust agent

Start by adding the crates and Tokio with cargo add strands-harness strands and cargo add tokio --features macros,rt-multi-thread. Then write a short main function that calls create_harness, gives the agent a task, and shuts it down. Running cargo run streams the reply to your terminal.

The team's example asks the agent to research the top three vector databases, compare pricing and limits, and write the result to a file called comparison.md. The Rust quickstart walks through the full setup.

What that example run did

  • It took just under two minutes, with 11 model calls and 11 tool calls.
  • The agent fetched several pricing pages at once with one script, so only the printed results entered the context window.
  • Large results were saved as short previews in the context, and the full text was archived. The agent read back only the parts it needed.
  • Prompt caching is on by default, and 80% of the tokens the model processed came from the cache in this run.
  • The session was saved to disk so it can be resumed by id, and six notes went to long-term memory for later conversations.

Custom tools, streaming, and structured output

Tools are async functions

To give an agent something only you know, write an async function and add the #[tool] macro. The macro builds the schema the model sees from the function's parameters and doc comments. Tools from MCP servers also work: list them in the mcp_servers option and the harness connects to them.

Watch the agent work

invoke waits for the final answer, while stream hands you each event as it happens, including text, every tool call, and the final result. That is useful for a user interface or an audit log.

Get data back, not just text

If your code needs the answer as data, define a Rust struct and ask for it. The SDK checks the answer against the schema and asks the model to fix anything that does not match.

What is in the developer preview

Version 0.1.0 includes the whole Strands Harness. Its features include:

  • A tuned system prompt and built-in shell, file, web fetch, and web search tools.
  • Programmatic tool calling, subagents, skills, and a to-do list.
  • Context management, prompt caching, sessions, and long-term memory.
  • Tool approval by a human, a model, or Cedar policies.
  • OpenTelemetry tracing and portable configuration.

The Harness SDK underneath adds:

  • Models: Amazon Bedrock, Bedrock Mantle, Anthropic, OpenAI, and your own models, with routing between them.
  • Agent loop: streaming, structured output, cancellation, interrupts, hooks, plugins, and middleware.
  • Tools: custom tools and MCP tools, plus built-ins such as bash, HTTP requests, notebooks, and a Python REPL.
  • Multiple agents: subagents, and agents used as tools by other agents.
  • State: sessions, conversation managers, long-term memory, pluggable storage, and a pluggable sandbox.

Version note: the team follows semantic versioning. While the version starts with 0, breaking changes come in minor releases such as 0.2.0, and patch releases never break your code.

How the team built it

The Rust version was built with Strands Factory, a software factory the team is also open sourcing this week. Two engineers on the Strands team spent several days designing it with the factory agent, which ran on Claude Opus 5.5 and Claude Fable 5.2. They ended up with a spec of nearly 20,000 words, with 77 design decisions and a 14-phase plan.

The factory built the first version from that spec. Each change went through formatting, strict lint checks, the full test suite, and documentation builds, and each phase was reviewed by three independent reviewer agents.

The factory logged 291 decisions it made on its own or where it changed the spec. People reviewed all of them, and the team revised 24, about 8%, mostly API naming and design choices. The team also validated the result in its own products, including an experimental software factory built by the AWS Quick team.

What It Means for Developers

If you build or run AI agents, the new Rust option changes the trade-offs between start-up time, memory, and ease of writing code.

What It Means for Software Developers

Developers who already know Rust can now build Strands agents in their own language.

  • Expect the same agent behavior as Python and TypeScript, with an idiomatic Rust API.
  • Write tools as async functions with #[tool] and ask for typed answers with structs.
  • Remember it is a 0.1.0 preview, so pin versions and watch for minor-release changes.

What It Means for Backend Developers

Backend teams that run many agent sessions care about memory and concurrency.

  • A 48 MB peak in the test suggests more agents can share the same memory.
  • Streaming, sessions, long-term memory, and OpenTelemetry tracing are included for production-style services.
  • Teams that use Python today can compare it with Rust on their own workload before moving.

What It Means for DevOps Engineers

Cold starts and memory size drive cost and user wait time on serverless platforms.

  • Test Rust agents on AWS Lambda with your own settings, since the 50 ms result came from one arm64, 1,024 MB setup.
  • Use tool approval options (human, model, or Cedar policies) to control what agents may do.
  • Plan for the developer-preview status when you decide how to roll this out.

What to watch next

The announcement points to a few next steps:

  1. Infinity in the harnessThe team is experimenting with this research runtime and will share more soon.
  2. API changesThe API may change as the team gathers feedback on the preview.
  3. Strands FactoryThe team is open sourcing the factory and covers how to run it on your own repositories in a separate post.

Bottom line

The Strands Harness and Harness SDK are now available in Rust as a v0.1.0 developer preview. In the team's own test, the Rust agent started cold in 50 ms and peaked at 48 MB, far below the TypeScript and Python versions.

For developers, it is a new way to run the same Strands agent where start-up time and memory matter most. Because the numbers come from one test setup, try it on your own workload before you decide. You can start with the Strands harness guide.

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author