Skip to content

Releases

v0.7.3

Choose a tag to compare

@Lawhy Lawhy released this 02 Oct 03:25
6973cd4

What's New

Features

  • Bedrock prompt caching: bedrock_model_factory takes a cache_config, and prompt_cache_config(model_id, ...) builds one for Claude models. It's on by default for Claude models in the eval CLI (--prompt-cache/--no-prompt-cache, with --prompt-cache-ttl for runs longer than 5 minutes), cutting input-token cost and time-to-first-token on long agent loops and pass@k (#267)

Bug Fixes

  • Requires strands-sglang>=0.6.2, which fits max_new_tokens to the room left in the context each turn. Long multi-turn SGLang rollouts no longer stop with ContextWindowOverflowException before the context is actually full (#285)

Refactoring

  • Evaluation reporters are now a one-method EvalReporter protocol, publish(run_dir), called on the finished run directory via await evaluator.publish(). One reporter failing doesn't stop the rest. LocalReporter and CompositeReporter are removed: Evaluator writes results.jsonl itself, one row per sample as it completes, and the CLI writes metadata.json/metrics.json. The --save-interval flag is gone. Older results.jsonl files still resume (#264)

Documentation

  • The DeepWiki badge in the README now renders (#284)

Maintenance

  • Bumped dependencies and tooling: harbor 0.23.0, aiolimiter, cachetools, tqdm, urllib3, pyjwt, virtualenv, ruff, build, setup-uv and codecov-action (#266, #275, #276, #282, #283)

Full Changelog: v0.7.2...v0.7.3

v0.7.2

Choose a tag to compare

@Lawhy Lawhy released this 04 Sep 23:14
16eb33c

What's New

Features

  • Tool results can be cached. CachedTool (strands_env.core.tool_cache) wraps any AgentTool and serves the result from cache when the same input, plus a caller-set scope, was seen before, so repeat calls across pass@k samples, episodes, and Ray workers stop paying the tool's latency and quota. Wrap only tools whose result is a function of input and scope. Concurrent calls for one key in a process coalesce onto a single run. Two tiers: a process-wide ToolCache (bounded by entries and bytes, jittered TTL) and an optional RayToolCache shared by every process of a Ray job through a named actor, which also runs each key once job-wide. on_access reports hit/miss/coalesced, tier, and latency per call for metrics. Wiring is per env; no shipped env wires it yet. (#261)
  • --reasoning-effort now reaches the bedrock backend. It was accepted and silently dropped there, so a Converse-served reasoning model ran with reasoning off. ModelConfig.bedrock_request_fields() translates it into the additionalModelRequestFields each model family takes: OpenAI models get reasoning.effort; Claude 5 models get adaptive thinking via output_config.effort with display: "summarized", so the thinking block carries readable text. Older Claude models (budget-based thinking.enabled) are unmapped and unchanged. bedrock_model_factory gains additional_request_fields, forwarded to BedrockModel as-is. (#258)

Bug Fixes

  • e2b sandboxes no longer abort on a dropped first connection. At high launch concurrency the e2b gateway closes a small share of fresh envd connections mid-handshake. The error surfaced as a raw h2/httpcore transport error that harbor's own retry does not cover, and the episode died with an empty trajectory. PrebakedE2BEnvironment.ensure_dirs, the first request every sandbox receives, now retries those errors with jittered backoff. On one node at concurrency 500, ramp-period aborts went from 6 to 0. (#263)
  • Eval results with bytes in the messages (Bedrock's redacted reasoning, reasoningContent.redactedContent) no longer crash LocalReporter; the bytes are written to results.jsonl as base64. (#259)
  • When a sample aborts, the evaluator logs the full traceback instead of only the exception message. (#262)

Maintenance

  • Dependencies: harbor 0.21.0 → 0.22.0, click 8.4.2 → 8.5.0, ruff 0.16.4 → 0.16.5 (dev), re-actors/alls-green 1.2.2 → 1.3.0 (CI). (#260)

Notes for upgraders

  • cachetools is a new main dependency; it installs with the package.
  • If you passed --reasoning-effort (or ModelConfig.reasoning) with --backend bedrock, reasoning is now actually on for OpenAI and Claude 5 models on Converse. Expect longer, costlier responses than before, and readable thinking summaries in the record.
  • CachedTool is not re-exported from strands_env.core; import it from strands_env.core.tool_cache. The Ray tier needs ray installed.

Full Changelog: v0.7.1...v0.7.2

v0.7.1

Choose a tag to compare

@Lawhy Lawhy released this 02 Sep 07:45
7b69bd4

What's New

Bug Fixes

  • Bedrock no longer turns a finished answer into an empty tool turn. Bedrock sometimes closes a text-only message with stopReason: "tool_use" while never sending a tool-use block. The Strands agent loop took that at face value: it ran a tool step with zero tool uses, appended an empty user message, and sent the model a request carrying an empty content block, which failed the rollout. bedrock_model_factory now returns a BedrockModel subclass that rewrites such a stop to end_turn before the loop sees it, so the turn ends cleanly. v0.7.0 patched the symptom on the read side, in get_final_response; this closes the cause. Bedrock also streams now, the SDK default, instead of the streaming=False override the factory used to pass. (#252)
  • Eval metadata.json no longer repeats backend and model_id at the top level. Both live in model_config, and that is now the only place they appear. (#251)

Maintenance

  • Type-checking is stricter for callers. cache_by is typed with ParamSpec, so mypy sees get_client's real parameters and BaseClient return instead of (*Any, **Any) -> Any. The Ray actor pool and the slime mlflow logger now type-check on installs where ray/mlflow ship stubs; these were unreachable/arg-type errors that only surfaced with those packages installed. No runtime changes. (#253, #248, #247)
  • Ruff's fix = true is actually gone this time, and target-version is pinned to py312. The v0.7.0 notes announced the removal a release early; the setting had been in pyproject.toml since the initial commit and made ruff check exit 0 on fixable violations. Ruff bumped to 0.16.4. (#246, #250)

Documentation

  • The DeepWiki page plan follows the v0.7.0 rename: CalculatorEnv → MathEnv, described as chat-only. (#249)

Notes for upgraders

  • If you read backend or model_id from an eval run's metadata.json, take them from metadata["model_config"] now.

Full Changelog: v0.7.0...v0.7.1

v0.7.0

Choose a tag to compare

@Lawhy Lawhy released this 20 Aug 03:52
a5890cf

What's New

⚠️ Breaking Changes

  • CalculatorEnv → MathEnv, and it no longer has a tool. strands_env.environments.calculator.CalculatorEnv is now strands_env.environments.math.MathEnv; the model reasons in text and boxes its answer. The calculator tool was the env's only reason to import strands-agents-tools, and upstream deprecated it in 0.8.6 — the suggested replacement is the vended bash tool, a privilege increase not worth making for a math sandbox. MathVerifyReward is unchanged, and none of its seven consumers (the aime, hmmt and simple_math eval hooks, the retool training script) ever put a tool in the loop. (#229)
  • The ifeval and agent-world-model extras are gone. Both pulled unpatchable transitive dependencies: agent-world-model==0.1.0 pins fastapi==0.115.12 (holding starlette at 0.46.2 and mcp at 1.27.2 — eight advisories), and lm_eval[ifeval] brings sqlitedict, abandoned since 2022 with an unpatched deserialization RCE. Neither environment loses its install path — agent_world_model/requirements.txt already carries the pin, and the IFEval benchmark now re-raises with the exact command, surfaced by python -m strands_env.eval --list. (#243)
  • pip install -e ".[dev]" no longer resolves — dev dependencies moved to a PEP 735 [dependency-groups] table, so they stay out of the published metadata. Use uv sync (installs the dev group by default) or uv pip install -e . --group dev. (#218)

Bug Fixes

  • A completed answer followed by blank turns is no longer read as no answer at all. A model can report stopReason: "tool_use" while returning no tool-use block; the agent loop takes the tool branch anyway and appends blank turns, so get_final_response read messages[-1] and returned None for a turn that had answered in full — aborting the sample and, with it, every sample of that prompt. One Bedrock run lost 9 of 254 episodes, one on a 2855-character reply. It now walks back past blank turns. (#216)
  • terminal_bench no longer crashes a whole run on a task without memory_mb. It doubled task_env_config.memory_mb unconditionally, but harbor types the field int | None — an absent value raised TypeError inside load_dataset, taking down the run rather than one sample. All 89 tasks in the current dataset set it, so this had not yet fired. (#224)

Security

  • 67 open Dependabot advisories cleared, 20 of them high. Security updates had never been enabled on this repo, so nothing was pushing a fix; one full lockfile resolve closed 66, and dropping the two extras above closed the rest. The lockfile went from 228 to 166 packages. (#240, #243)
  • The sdist no longer ships the whole repo. With no [tool.hatch.build.targets.sdist], hatchling fell back to including .claude/, .devin/, .github/ and .local/ — the last holding an e2b API key. hatchling reads the filesystem, not git, so .gitignore did not hold it back. Published sdists were clean (CI builds from a fresh checkout), but a local uv build plus manual upload would have published that key. Now an explicit include list. (#228)

Maintenance

  • The lint gate is now real: CI invokes pre-commit run --all-files instead of restating a subset, so codespell, insert-license, slime-casing and conventional-pre-commit are enforced for the first time. Ruff's global fix = true is gone — it rewrote fixable violations in the runner and reported success, then discarded the rewrite with the runner. Every action reference is SHA-pinned, with dependabot bumping them weekly. (#217, #218)
  • mypy no longer waves through unstubbed dependencies — ignore_missing_imports applied to every import, resolving harbor, ray, tau2, wandb and anything reached through them to Any. (#224)
  • Test warnings are now fatal, so a dependency deprecation fails the suite instead of scrolling past. (#226)
  • Dependency bumps: strands-sglang>=0.6.1, strands-agents-tools 0.8.6, datasets 5.0.1, tiktoken 0.13.0, tqdm 4.70.0. e2b stays pinned at 2.25.1 — harbor/e2b.py patches an SDK internal. (#245, #221, #222, #223, #230, #233)

Documentation

  • Agent guidance moved to AGENTS.md (the filename other coding agents read), with CLAUDE.md now a pointer to it. Docstrings became optional (ruff selects D2/D4, not D1), module docstrings were dropped from 120 files, and the previously unwritten Files/Comments/Private-helpers/Tests conventions were written down. (#227, #232, #242)
  • Fixed the dead CI badge (pointed at the removed test.yml), the last horizon-rl → strands-rl references, a stale release checklist that told you to bump a version field that does not exist, and a tagline that said three different things depending on where you read it. (#225, #241, #244)

Notes for upgraders

  • Rename CalculatorEnv → MathEnv and update the import path to strands_env.environments.math. If you relied on the calculator tool, you now need to supply your own.
  • Replace pip install -e ".[dev]" with uv sync, and pip install ".[ifeval]" / ".[agent-world-model]" with the direct requirement.

Full Changelog: v0.6.7...v0.7.0

v0.6.7

Choose a tag to compare

@Lawhy Lawhy released this 13 Aug 11:01
d7062f5

What's New

This release also carries everything from v0.6.6, whose release notes it replaces.

Breaking Changes

  • LLMJudgeReward.get_judge_agent now takes (task, result) and owns building the whole judge agent, system prompt included. The old signature received an already-rendered system_prompt, which made an agentic judge impossible: a judge with tools has to bind per-sample state into those tools, and the sample was not in scope. (#215)

    # before
    async def get_judge_agent(self, system_prompt: str | None, name: str = "LLMJudge") -> Agent: ...
    
    # after — call get_system_prompt yourself if you need it
    async def get_judge_agent(self, task: TaskT, result: RolloutResult) -> Agent: ...

    Subclasses that only override get_judge_prompt / get_system_prompt are unaffected — both are unchanged. A judge that fails to build now reports error_type: "judge_agent_error", replacing system_prompt_error and covering anything else construction touches (resolving tool schemas, opening a client) that previously surfaced as an indistinguishable judge_error. The abort path keys on status, which is unchanged.

Bug Fixes

  • A Task subclass's own fields now survive into results.jsonl. EvalSample.task was serialized against the base Task, so fields declared on typed tasks (HarborTask.task_dir, Tau2BenchTask.domain, MCPAtlasTask.gtfa_claims, ...) were dropped on the way to disk. Scoring and resume were unaffected — the rollout and reward always read the live object — so the loss only hit post-hoc analysis of the results file. (#214)
  • One bad character no longer kills an eval run. LocalReporter serialized samples with ensure_ascii=False, so an unpaired UTF-16 surrogate in a model response (models emit these when a surrogate pair is split mid-token) raised UnicodeEncodeError at fh.write — inside the asyncio.gather in Evaluator.run, taking down every sample still in flight. rewrite() had the same call, where one bad character could take the whole file. (#211)
  • The eval CLI no longer writes config.json behind the reporter's back. The run config was serialized twice into the same directory, and metadata.json already contained every byte of it — so a run configured with a remote-only reporter still got a stray local file in a directory it otherwise never touches. (#209)

Maintenance

  • strands-sglang floor raised to >=0.6.0, and model auto-detection moved off SGLang's deprecated /get_model_info to /model_info (both return identical JSON today; this is a rename ahead of the upstream removal, which would otherwise take the whole integration suite down at once). (#210)

Notes for upgraders

  • results.jsonl lines are now ASCII-escaped. Content is unchanged through json.loads; only code that byte-greps the raw file for literal non-ASCII text would notice.
  • config.json is no longer written — read metadata.json instead.

Full Changelog: v0.6.5...v0.6.7

v0.6.5

Choose a tag to compare

@Lawhy Lawhy released this 12 Aug 09:13
20ebdcd

What's New

⚠️ Breaking Changes

  • LLMJudgeReward.__init__ no longer accepts system_prompt or max_model_retries. Pass a per-sample prompt by overriding get_system_prompt instead; drop max_model_retries entirely — Strands' ModelRetryStrategy already retries every judge agent, and a judge_model list still round-robins per sample. get_system_prompt now defaults to None. (#206)
  • Unscorable samples are now aborted rather than counted. Evaluator.validate_sample previously defaulted to keeping every sample, so a sample with no reward — or one whose reward failed and fell back to default_reward — was folded into the metrics as incorrect. Such samples are now excluded from metrics and retried on resume (the trajectory is still written to the results file). To keep inference-only runs in the metrics, override validate_sample to return True. (#208)

Bug Fixes

  • Judge tools now actually run in structured mode. LLMJudgeReward drives the judge through invoke_async(structured_output_model=...), so a judge can gather evidence and return a typed verdict in one invocation — previously, setting judgment_format silently bypassed the event loop and skipped the tool loop. (#206)
  • Reasoning judges no longer score default_reward on correct answers: text extraction reads the last text block with <think> stripped, instead of an empty leading reasoningContent block. (#206)
  • A throttled judge no longer stacks retries. The outer max_model_retries loop multiplied against Strands' own 6-attempt backoff (~6 minutes of blocking in the worst case). (#206)
  • WebScraperToolkit.summarize moves off the deprecated structured_output_async to invoke_async, so the summarizer agent's hooks fire and its tools are honored. A missing summary still degrades to None — no caller-visible change. (#207)

Refactoring

  • New get_judge_agent(system_prompt, name=...) seam on LLMJudgeReward for attaching tools, hooks (e.g. a LoopLimiter budget), or a custom retry_strategy to the judge agent. The resolved per-sample system prompt is passed in, so an override cannot silently drop it. (#206)
  • Seven benchmarks (simpleqa_verified, sealqa, frames, browsecomp, hle_verified, mcp_atlas, terminal_bench) drop their copy-pasted reward-error checks and inherit the base validate_sample; tau2_bench keeps only the checks the base cannot see (nested NL-judge errors, user-simulator aborts). (#208)

Full Changelog: v0.6.4...v0.6.5

v0.6.4

Choose a tag to compare

@Lawhy Lawhy released this 12 Aug 04:22
64e221d

What's New

Features

  • TerminationReason now distinguishes credential and rate-limit failures: expired/invalid AWS tokens and access-denied errors surface as auth_error, and exhausted throttling quotas as throttled, instead of collapsing into unclassified_error. Classification walks the exception cause chain and matches the AWS error code as well as the class name, so bare ClientErrors from Bedrock are still identified. Observability-only — no scoring or metrics behavior changes. (#205)
  • Added start_jitter to HarborConfig — sleeps a random uniform(0, start_jitter) seconds before starting the sandbox, staggering the burst of concurrent create calls that a self-hosted e2b gateway would otherwise shed (dropped connections killed episodes seconds after launch with empty trajectories). Backend-agnostic and defaults to 0.0, so serial and low-concurrency runs are unchanged. (#204)

Full Changelog: v0.6.3...v0.6.4

v0.6.3

Choose a tag to compare

@Lawhy Lawhy released this 28 Jul 07:03
b211835

What's New

Features

  • Added a pluggable EvalReporter architecture for the eval framework: LocalReporter now streams samples to results.jsonl incrementally (instead of rewriting the full checkpoint on every save) and writes a new metadata.json with run-level params/tags. CompositeReporter lets you fan results out to multiple sinks with error isolation. (#203)

Bug Fixes

  • Fixed AWS role assumption to use the specified profile's credentials (not ambient credentials) when both profile_name and role_arn are set, fixing cross-account role chains. (#199)
  • Pinned the ruff dev dependency floor to 0.16.0 so local formatting matches what CI enforces. (#202)

Refactoring

  • Removed the unused Kimi (Moonshot via LiteLLM) model backend and the litellm optional dependency. (#200)

Maintenance

  • Switched to a local (rather than global) import in one module. (#201)

Full Changelog: v0.6.2...v0.6.3

v0.6.2

Choose a tag to compare

@Lawhy Lawhy released this 17 Jul 23:21
8f7f540

What's New

Features

  • Bedrock Mantle backend: new bedrock_mantle_model_factory and --backend bedrock-mantle CLI option for running GPT models via the Bedrock Mantle OpenAI Responses API, with SDK-native regional routing and per-request SigV4 token auth (#196)
  • LLMJudgeReward improvements: raw think-block access on judge responses and a new get_system_prompt hook for customizing the judge system prompt (#194); richer error observability when judge calls fail (#197)

Bug Fixes

  • LLMJudgeReward now rejects max_model_retries < 1, preventing configurations that would skip judgment entirely (#198)
  • Harbor environment adapted to harbor 0.15, which removed ServiceVolumeConfig (#195)

Full Changelog: v0.6.1...v0.6.2

v0.6.1

Choose a tag to compare

@Lawhy Lawhy released this 07 Jul 01:15
88d8370

What's New

⚠️ Breaking Changes

  • trace_attributes and agent_name are no longer EnvironmentConfig keys. Trace attributes (training step, prompt id, rollout n, run id) are inherently per-sample, so they now live on a declared Task.trace_attributes field; _rollout forwards them into the Agent's OTel spans. Environments constructed with trace_attributes=/agent_name= config must stamp these onto their tasks instead. (#190)

Documentation

  • Root README refresh: the Built-in Environments table now lists all 7 environments (adds tau2_bench), the calculator entry notes its default symbolic-equivalence reward, and the Features section calls out typed Task subclasses. (#189)

Maintenance

  • Corrected the declared optional-dependency conflict: harbor + litellm resolve cleanly (the old conflict was stale); the real incompatibility is harbor vs agent-world-model (conflicting fastapi pins), now declared to prevent silently corrupting an env that installs both. (#191)

Full Changelog: v0.6.0...v0.6.1