Repository navigation
Releases
v0.7.3
What's New
Features
- Bedrock prompt caching:
bedrock_model_factorytakes acache_config, andprompt_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-ttlfor 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 fitsmax_new_tokensto the room left in the context each turn. Long multi-turn SGLang rollouts no longer stop withContextWindowOverflowExceptionbefore the context is actually full (#285)
Refactoring
- Evaluation reporters are now a one-method
EvalReporterprotocol,publish(run_dir), called on the finished run directory viaawait evaluator.publish(). One reporter failing doesn't stop the rest.LocalReporterandCompositeReporterare removed:Evaluatorwritesresults.jsonlitself, one row per sample as it completes, and the CLI writesmetadata.json/metrics.json. The--save-intervalflag is gone. Olderresults.jsonlfiles 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
What's New
Features
- Tool results can be cached.
CachedTool(strands_env.core.tool_cache) wraps anyAgentTooland serves the result from cache when the same input, plus a caller-setscope, 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-wideToolCache(bounded by entries and bytes, jittered TTL) and an optionalRayToolCacheshared by every process of a Ray job through a named actor, which also runs each key once job-wide.on_accessreports hit/miss/coalesced, tier, and latency per call for metrics. Wiring is per env; no shipped env wires it yet. (#261) --reasoning-effortnow reaches thebedrockbackend. It was accepted and silently dropped there, so a Converse-served reasoning model ran with reasoning off.ModelConfig.bedrock_request_fields()translates it into theadditionalModelRequestFieldseach model family takes: OpenAI models getreasoning.effort; Claude 5 models get adaptive thinking viaoutput_config.effortwithdisplay: "summarized", so the thinking block carries readable text. Older Claude models (budget-basedthinking.enabled) are unmapped and unchanged.bedrock_model_factorygainsadditional_request_fields, forwarded toBedrockModelas-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/httpcoretransport 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
bytesin the messages (Bedrock's redacted reasoning,reasoningContent.redactedContent) no longer crashLocalReporter; the bytes are written toresults.jsonlas base64. (#259) - When a sample aborts, the evaluator logs the full traceback instead of only the exception message. (#262)
Maintenance
- Dependencies:
harbor0.21.0 → 0.22.0,click8.4.2 → 8.5.0,ruff0.16.4 → 0.16.5 (dev),re-actors/alls-green1.2.2 → 1.3.0 (CI). (#260)
Notes for upgraders
cachetoolsis a new main dependency; it installs with the package.- If you passed
--reasoning-effort(orModelConfig.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. CachedToolis not re-exported fromstrands_env.core; import it fromstrands_env.core.tool_cache. The Ray tier needsrayinstalled.
Full Changelog: v0.7.1...v0.7.2
v0.7.1
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_factorynow returns aBedrockModelsubclass that rewrites such a stop toend_turnbefore the loop sees it, so the turn ends cleanly. v0.7.0 patched the symptom on the read side, inget_final_response; this closes the cause. Bedrock also streams now, the SDK default, instead of thestreaming=Falseoverride the factory used to pass. (#252) - Eval
metadata.jsonno longer repeatsbackendandmodel_idat the top level. Both live inmodel_config, and that is now the only place they appear. (#251)
Maintenance
- Type-checking is stricter for callers.
cache_byis typed withParamSpec, so mypy seesget_client's real parameters andBaseClientreturn instead of(*Any, **Any) -> Any. The Ray actor pool and the slime mlflow logger now type-check on installs whereray/mlflowship stubs; these wereunreachable/arg-typeerrors that only surfaced with those packages installed. No runtime changes. (#253, #248, #247) - Ruff's
fix = trueis actually gone this time, andtarget-versionis pinned topy312. The v0.7.0 notes announced the removal a release early; the setting had been inpyproject.tomlsince the initial commit and maderuff checkexit 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
backendormodel_idfrom an eval run'smetadata.json, take them frommetadata["model_config"]now.
Full Changelog: v0.7.0...v0.7.1
v0.7.0
What's New
⚠️ Breaking Changes
CalculatorEnv→MathEnv, and it no longer has a tool.strands_env.environments.calculator.CalculatorEnvis nowstrands_env.environments.math.MathEnv; the model reasons in text and boxes its answer. The calculator tool was the env's only reason to importstrands-agents-tools, and upstream deprecated it in 0.8.6 — the suggested replacement is the vendedbashtool, a privilege increase not worth making for a math sandbox.MathVerifyRewardis 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
ifevalandagent-world-modelextras are gone. Both pulled unpatchable transitive dependencies:agent-world-model==0.1.0pinsfastapi==0.115.12(holding starlette at 0.46.2 and mcp at 1.27.2 — eight advisories), andlm_eval[ifeval]bringssqlitedict, abandoned since 2022 with an unpatched deserialization RCE. Neither environment loses its install path —agent_world_model/requirements.txtalready carries the pin, and the IFEval benchmark now re-raises with the exact command, surfaced bypython -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. Useuv sync(installs the dev group by default) oruv 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, soget_final_responsereadmessages[-1]and returnedNonefor 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_benchno longer crashes a whole run on a task withoutmemory_mb. It doubledtask_env_config.memory_mbunconditionally, but harbor types the fieldint | None— an absent value raisedTypeErrorinsideload_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.gitignoredid not hold it back. Published sdists were clean (CI builds from a fresh checkout), but a localuv buildplus 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-filesinstead of restating a subset, socodespell,insert-license,slime-casingandconventional-pre-commitare enforced for the first time. Ruff's globalfix = trueis 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_importsapplied to every import, resolving harbor, ray, tau2, wandb and anything reached through them toAny. (#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-tools0.8.6,datasets5.0.1,tiktoken0.13.0,tqdm4.70.0.e2bstays pinned at2.25.1—harbor/e2b.pypatches an SDK internal. (#245, #221, #222, #223, #230, #233)
Documentation
- Agent guidance moved to
AGENTS.md(the filename other coding agents read), withCLAUDE.mdnow a pointer to it. Docstrings became optional (ruff selectsD2/D4, notD1), 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 lasthorizon-rl→strands-rlreferences, 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→MathEnvand update the import path tostrands_env.environments.math. If you relied on the calculator tool, you now need to supply your own. - Replace
pip install -e ".[dev]"withuv sync, andpip install ".[ifeval]"/".[agent-world-model]"with the direct requirement.
Full Changelog: v0.6.7...v0.7.0
v0.6.7
What's New
This release also carries everything from v0.6.6, whose release notes it replaces.
Breaking Changes
-
LLMJudgeReward.get_judge_agentnow takes(task, result)and owns building the whole judge agent, system prompt included. The old signature received an already-renderedsystem_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_promptare unaffected — both are unchanged. A judge that fails to build now reportserror_type: "judge_agent_error", replacingsystem_prompt_errorand covering anything else construction touches (resolving tool schemas, opening a client) that previously surfaced as an indistinguishablejudge_error. The abort path keys onstatus, which is unchanged.
Bug Fixes
- A
Tasksubclass's own fields now survive intoresults.jsonl.EvalSample.taskwas serialized against the baseTask, 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.
LocalReporterserialized samples withensure_ascii=False, so an unpaired UTF-16 surrogate in a model response (models emit these when a surrogate pair is split mid-token) raisedUnicodeEncodeErroratfh.write— inside theasyncio.gatherinEvaluator.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.jsonbehind the reporter's back. The run config was serialized twice into the same directory, andmetadata.jsonalready 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-sglangfloor raised to>=0.6.0, and model auto-detection moved off SGLang's deprecated/get_model_infoto/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.jsonllines are now ASCII-escaped. Content is unchanged throughjson.loads; only code that byte-greps the raw file for literal non-ASCII text would notice.config.jsonis no longer written — readmetadata.jsoninstead.
Full Changelog: v0.6.5...v0.6.7
v0.6.5
What's New
⚠️ Breaking Changes
LLMJudgeReward.__init__no longer acceptssystem_promptormax_model_retries. Pass a per-sample prompt by overridingget_system_promptinstead; dropmax_model_retriesentirely — Strands'ModelRetryStrategyalready retries every judge agent, and ajudge_modellist still round-robins per sample.get_system_promptnow defaults toNone. (#206)- Unscorable samples are now aborted rather than counted.
Evaluator.validate_samplepreviously defaulted to keeping every sample, so a sample with no reward — or one whose reward failed and fell back todefault_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, overridevalidate_sampletoreturn True. (#208)
Bug Fixes
- Judge tools now actually run in structured mode.
LLMJudgeRewarddrives the judge throughinvoke_async(structured_output_model=...), so a judge can gather evidence and return a typed verdict in one invocation — previously, settingjudgment_formatsilently bypassed the event loop and skipped the tool loop. (#206) - Reasoning judges no longer score
default_rewardon correct answers: text extraction reads the last text block with<think>stripped, instead of an empty leadingreasoningContentblock. (#206) - A throttled judge no longer stacks retries. The outer
max_model_retriesloop multiplied against Strands' own 6-attempt backoff (~6 minutes of blocking in the worst case). (#206) WebScraperToolkit.summarizemoves off the deprecatedstructured_output_asynctoinvoke_async, so the summarizer agent's hooks fire and its tools are honored. A missing summary still degrades toNone— no caller-visible change. (#207)
Refactoring
- New
get_judge_agent(system_prompt, name=...)seam onLLMJudgeRewardfor attaching tools, hooks (e.g. aLoopLimiterbudget), or a customretry_strategyto 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 basevalidate_sample;tau2_benchkeeps 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
What's New
Features
TerminationReasonnow distinguishes credential and rate-limit failures: expired/invalid AWS tokens and access-denied errors surface asauth_error, and exhausted throttling quotas asthrottled, instead of collapsing intounclassified_error. Classification walks the exception cause chain and matches the AWS error code as well as the class name, so bareClientErrors from Bedrock are still identified. Observability-only — no scoring or metrics behavior changes. (#205)- Added
start_jittertoHarborConfig— sleeps a randomuniform(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 to0.0, so serial and low-concurrency runs are unchanged. (#204)
Full Changelog: v0.6.3...v0.6.4
v0.6.3
What's New
Features
- Added a pluggable
EvalReporterarchitecture for the eval framework:LocalReporternow streams samples toresults.jsonlincrementally (instead of rewriting the full checkpoint on every save) and writes a newmetadata.jsonwith run-level params/tags.CompositeReporterlets 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_nameandrole_arnare set, fixing cross-account role chains. (#199) - Pinned the
ruffdev 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
litellmoptional 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
What's New
Features
- Bedrock Mantle backend: new
bedrock_mantle_model_factoryand--backend bedrock-mantleCLI 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_prompthook for customizing the judge system prompt (#194); richer error observability when judge calls fail (#197)
Bug Fixes
LLMJudgeRewardnow rejectsmax_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
What's New
⚠️ Breaking Changes
trace_attributesandagent_nameare no longerEnvironmentConfigkeys. Trace attributes (training step, prompt id, rollout n, run id) are inherently per-sample, so they now live on a declaredTask.trace_attributesfield;_rolloutforwards them into the Agent's OTel spans. Environments constructed withtrace_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 typedTasksubclasses. (#189)
Maintenance
- Corrected the declared optional-dependency conflict:
harbor+litellmresolve cleanly (the old conflict was stale); the real incompatibility isharborvsagent-world-model(conflictingfastapipins), now declared to prevent silently corrupting an env that installs both. (#191)
Full Changelog: v0.6.0...v0.6.1